|
out and ref keywords in C#
11/13/2009 4:37:22 PM
(Total replies: 1)
|
| Could anyone explain in detail with an example the difference between out and pass by reference keywords?
<br />
<br />
Thanks in advance! |
|
|
|
Button event when button click released
11/4/2009 11:32:07 AM
(Total replies: 1)
|
| Hi,
<br />
<br />
Does anyone know the property of button event when the button click is released? Which data member is applicable for this type of an event? |
|
|
|
Re: Button event when button click released
11/4/2009 1:22:18 PM
(Total replies: 1)
|
| When the button is pressed the code is not executed until the button is released.
<br />
<br />
I need to execute two commands one when the button is kept pressed and the other when it is released.
<br />
<br />
Is there a propery to be set for button? |
|
|
|
|
|
|
Event handling in C#
11/3/2009 10:06:05 AM
(Total replies: 1)
|
| Dear ALL,
<br />
<br />
I have created an event where I am calling a method to access the hardware and also sending a command to jog the machine. When this button is clicked the event is triggered and the motors connected to that hardware moves with the command given.
<br />
<br />
The problem here is that when I release that button it continues to move the motors and the command argument does not get updated so as to stop the motors from moving.
<br />
<br />
There is however a ... |
|
|
|
accessing global variable from a class
11/2/2009 2:50:10 PM
(Total replies: 1)
|
| Hi,
<br />
<br />
I have made a class called Globals. I am declaring few variables to use them throughout my solution.
<br />
<br />
Following is the class:
<br />
<br />
public class Globals
<br />
{
<br />
public static PCOMMSERVERLib.PDeviceClass Turbo;
<br />
public static int device_number;
<br />
string command;
<br />
}
<br />
<br />
PCOMMSERVERLIB has already been added under references so all the COM libraries are ... |
|
|
|
Re: accessing global variable from a class
11/2/2009 3:08:44 PM
(Total replies: 0)
|
| I already had this on top of the file as:
<br />
<br />
PDeviceClass Turbo = new PDeviceClass();
<br />
<br />
It is still pointing to the line:
<br />
Globals.Turbo.Open(Globals.device_number, out Success); |
|
|
|
|
|
|
Re: accessing global variable from a class
11/2/2009 3:57:30 PM
(Total replies: 1)
|
| Hi,
<br />
<br />
If I have a method called Turbo.GetResponse(int dwDevice, string question, bool bAddLF, out string pAnswer, out int pstatus);
<br />
<br />
And I declare each of these variables as separate names in my Globals class, can I access them using Globals.Turbo.GetResponse(Globals.device_number, Globals.command, Globals.false, out Globals.response, out Globals.status)
<br />
<br />
|
|
|
|
Re: accessing global variable from a class
11/2/2009 5:29:31 PM
(Total replies: 1)
|
| I am unable to access string variables from my Globals. It only shows Globals.device_number.
<br />
<br />
I have even made my string variables public. Still cannot access them in the solution. |
|