JoneLee's Q&A profile
Visual Basic Geting info (prossesor usage and network usage)
How would I get the amount of network usage and how would I get the amount of usage of the processor. take a look in regards to the usage of processor, performance counter. http://msdn2.microsoft.com/en-us/library/system.diagnostics.performancecounter.aspx so perhaps try something like this, place a timer on your form, and a label, and set the timer interval to say 300milliseconds and enable/start it on form load: public class MyClass Dim theCPUCounter as new System.Diagnostics.PerformanceCounter("Processor", "% Processor Time", "_Total") private sub Timer1_Tick(byval sender as object, byval e as EventArgs) handles Timer1.Tick &nb ...Show All
Visual Studio Team System Why not property in C# and VB.NET is different?
Dear All: I use C# create FXCOP rule add in vs2005,The rules is test property,but test In VB.NET is different from C#,who can tell me why In C# string gstrOrigEmpID = ""; public string OrigEmpID { get { return gstrOrigEmpID; } set { gstrOrigEmpID = value; } } In VB.NET Dim gstrOrigEmpID As String = "" Public Property OrigEmpID() As String Get Return gstrOrigEmpID End Get Set(ByVal Value As String) Me.gstrOrigEmpID = Value End Set End Property In C# Property ,OrigEmpID is property,but in VB.NET,OrigEmpID is Field.I don’t known why ,can you help me thanks! --Tiny ...Show All
SQL Server ALTER TABLE ALTER COLUMN [access-id] failed because one or more objects access this column
Hi when I'm upgrading table schema with alter statement I'm getting error like this ALTER TABLE ALTER COLUMN [access-id] failed because one or more objects access this column can Anybody tell the solutiuon plz. Thank u . vizai Hi mani Thanks fo the reply. How can I use schemabinding to drop the views / udf / indexed views using SMO. How can I generate the drop script alone for all the views / udf / indexed views / constraints. Can u help me in this ...Show All
Windows Forms Writing Help for .Net windows forms application...
We are starting up a .Net 2.0 windows forms project and needs to also write a good help system for it. Do you have any preferences when it comes to writing the help texts. Help & Manual is a tool I know about and it seems nice, but are there any other favourites that I should take a look at Thank in advance. Harald You can try HelpStudio - Lite version is free for use and you can find it in Visual Studio 2005 SDK. Regards, Rasinec Ninoslav www.ApplicationAspect.com nras....@ApplicationAspect.com (please, replace dots with appropriate letters) ...Show All
SQL Server Management Studio Very slow to open
Hi, I've had this problem with a VM and now on the Live box. I installed Windows Server 2003 SP1, then install SQL server 2005 and applied service pack 1. As an administrator Management Studio takes approximately 2 seconds to open. However, if I log in to windows with any other local user account Manangement Studio takes approximately 1.5 minutes to open. The whole interface is slow unless I use the administrator account to log into windows. If anyone has a solution I would be very greatful as this is a new build for our production environment. Thanks in advance. Iain Thanks very much for post. I'm teaching it on XPsp2 machines and the timeout was about 10 mins. Very annoying and this fix ...Show All
Visual C++ static const member variable initialization
Hi, I want to initialize a member variable of a class by calling RegisterWindowMessage and i want to keep this variable as static so that this variable is initialized only once during the execution of the program. When i declare the variable as static, i am getting an error which says that only const static variables can be initialized within a class. When i make the variable as static const, i get the following error - Error 11 error C2057: expected constant expression I think this is because the value i am assigning to the variable is the value which the function RegisterWindowMessage will return and this will not be a const value. Could anyone please suggest a way out of this. Thanks in Anticipation, With regards, ...Show All
SQL Server Are we not able to edit stored procedures in SQL express?
Have sql 2005 express installed. Running a database for a DotNet Nuke site Opened Microsoft SQL Server Management Studio Express. Navigated to CASPORTAL\Databases\DotNetNuke\Programmability\Stored Procedures\dbo.AddUser Right clicked dbo.AddUser and selected "modify" This allowed me to paste the additional code into the right hand window/pane, however when I try and save this it wants to save it a seperate file /query. Is there something I don't understand am I not able to edit the original stored procedure Hi, thats a common minsunderstanding. Hitting the disc symbol will save the data, what you will have to do is to execute the stored procedure within this pane. T ...Show All
.NET Development About the finalizer thread and thread-safety
I'm using C++/CLI. I have some classes that control some native resources (objects from an unmanaged 3rd library). In the finalizer, before deleting the native objects, I need to call a native method of the library to "de-attach" them (remove them from a list, etc.). The problem is that this library is not thread-safe and, since finalization happens on a separate thread, it's my understanding that random crashes may happen during the lifetime of the application. Is this correct Is there a way to have the finalization thread blocked/not executed when execution is inside unmanaged context (or have finalization at the same thread as the application's ) Is requiring from the user to call Dispose the only solution for cleaning up resources, in ...Show All
Visual C++ 24Bits Bit-field Alignment error under VC++
Hi, I wrote code to interact with some netrork device. One of the network structures contains a 24-bits field. Everything is packed to "1" (byte). struct test { char bob0; char bob1; short bob2; char bob3; unsigned long bob4 : 24; unsigned long bob5; }; int main() { test tt; tt.bob0 = 0; tt.bob1 = 1; tt.bob2 = 2; tt.bob3 = 3; tt.bob4 = 4; tt.bob5 = 5; unsigned long * ptr; ptr = (unsigned long *)&tt; printf("%08X\n", ptr[0]); printf("%08X\n", ptr[1]); printf("%08X\n", ptr[2]); printf("%08X\n", ptr[3]); printf("%08X\n", ptr[4]); return 0; } Under Visual Studio (2003 and 2005), the result is: 00020100 00000403 000005CC <-- CC Packing is at 1, there s ...Show All
Visual Studio Express Editions Find and replace for textboxes!
Hi, I'm fairly new to Visual Basic. I'm making a simple text editor, and I want to make atleast a Find box. Here a screenshot of the find form I've designed: any and all help is extremely appreciated! Dim textbox1 = Form1.TextBox1 textbox1.FindForm.Text.replace("me") how do i tell it to select the text in main textbox based on the text in the find form I dont understand your answer ...Show All
.NET Development Init a variable - best location
Hi I have a question about the location of the init. Lets say I have a class MyClass and it contains an instance of a hash table. Now , I have 2 options where to init the instance of the hash table. Lets say I need the hash from the start of the class. The first is in the constructor and the second is at the same row as the decleration like Class MyClass { Hashtable ht = new Hashtable(); MyClass(){} } What is the difference between the 2 and what is the best way Thanks Avi I'm not sure about this but the best practice is to use only new whenever you actually start working on your object, but in other words you ask about the lifetime of the objects or hashtable ...Show All
Visual C# Can anybody explain an Internal Compiler Error where the "likely culprit is 'EMITIL'"
I am using csc.exe to build a very large project. It contains over 1700 source files which average about 300K in size per file. After letting the build run for over an hour, I invariably get an internal compiler error such as the following: error CS0583: Internal Compiler Error (0xc0000005 at address 5E3A2BE0): likely c ulprit is 'EMITIL'. An internal error has occurred in the compiler. To work around this prob lem, try simplifying or changing the program near the locations listed below. Lo cations at the top of the list are closer to the point at which the internal err or occurred. Errors such as this can be reported to Microsoft by using the /erro rreport option. Does anybody have any information on this 'EMITIL ...Show All
Game Technologies: DirectX, XNA, XACT, etc. DirectX10 and Direct Sound10
The rumors circling the internet are everywhere, Windows vista is supposed to support directx 10 only which begs the question, what of direct sound As a beginning game audio programmer, I beg the question, How much diffrent is directSound 10 from directSound9 I have heard that none of the ds9 programs will be able to be used by 10, thus rendering it completely unbackwards compatable. However through my deep search into the internet, i have found no hide nor hair of direct sound 10. Whats diffrent and how will i be able to port from 9 to 10 without rebuilding P.S should this post be placed in the wrong area, please move it. There is no DirectSound10, there is DirectSound8 which hasn't changed signifi ...Show All
Visual Basic Inserting a Variable into a statement
First off its been a while since I programed, so im relearning the slight abilities I had years ago. my question is, how do I insert a variable into a statement for example, here is what I have. For X As SByte = 1 To Form_Main.NumberOfPlayers tempplayer.PlayerName=FORM_newgame.TextBox_Player"X" Form_Main.Players.add(TempPlayer,TempPlayer.PlayerName) Next What I want to be able to do is take the names from Textbox_player1, Textbox_Player2, TextBox_Player3, etc, and add them into a collection. among other information. I can add them manually with a case statement based on the number of players, but that takes alot of code, if I could use a for statement that would be alot cleaner. ...Show All
Visual Studio Shadow Folder Problem
i have a problem with shadow folders. i use source safe to develop a asp.net web site in a team. i want the website to be shadow copied to inetpub to be live just in time when somebody checks in a file in visual studio. but when checking in a file in visual studio the shadow folder file is not updated iis and source safe are installed on the same machine, so i think that the impersonation is not the matter. when i open source safe admin and open shadow folder config then everything is updated, but that's not what shadow folders are for ;) the problem only occurs when checking in via visual studio integrated check in... any suggestions thanks in advance, regards, daniel I am working with a client having the same ...Show All
