|
Yes, but only if the returning value of MethodName is a nullable object. If not your codition is always true.
Post the snippet of MethodName...
Regards,
Mark
|
|
|
|
|
What is "MethodName" doing?
|
|
|
|
|
|
arkiboys wrote: creates an object
How?
|
|
|
|
|
objectData = MethodName(Name);
if (objectData == null)
{
}
else
{
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
i want to convert button style to appear as circle
or
drawing circle on the form and event these circles
ma_refay
|
|
|
|
|
have to create customised buttons with two images one is for up and another one is for down.
when the user clicks the image need to show the down image.
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
hi
can anyone give me a sample application to create delegate in C#?
|
|
|
|
|
MSDN delegates tutorial[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I have created Button control programatically using
Button btn = new Button();
btn.ID = "btn1";
btn.Text = "Button 1";
Panel1.Controls.Add(btn);
i want to set the enable property for this button to be false.
how do i do it
vasu
|
|
|
|
|
|
sorry i have not given the full scenario.
what i want to do is fetch the property and its value from database.
how do i say [ctrl].[property] = [value]
|
|
|
|
|
sorry i have not given the full scenario.
what i want to do is fetch the property and its value from database.
how do i say [ctrl].[property] = [value]
vasu
|
|
|
|
|
Hello,
I think what you are looking for is reflection!
Have a look at the GetType and GetProperty methods.
All the best,
Martin
|
|
|
|
|
Martin thanks for the lead. will try it out and post the progress
|
|
|
|
|
i think either you are a little confused or i am not getting properly.
you can put check on fetched data it would be kind fo Hard Coding
but i dont think you have any other way to do it
if you have any idea then please let me know . for bettr help please paste a piece of your code
|
|
|
|
|
is there a dll file for audio recording from microphone
|
|
|
|
|
Hello gurus,
I'd like to know how can see if my application already runs or not?
Only 1 instance of my application can run.
How to do that?
Best regards.
Fred.
There is no spoon.
|
|
|
|
|
Hi
You could use this method:
Use the following code on you load or main method
if (PrevInstance())<br />
{<br />
MessageBox.Show("The program is already running");<br />
Application.Exit();<br />
}
This is the method called from your main code
private static bool PrevInstance()<br />
{<br />
if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1)<br />
{<br />
return true;<br />
}<br />
return false;<br />
}
Hope this helps.
|
|
|
|
|
Hello,
Never forget to dispose the instances of the processes.
All the best,
Martin
|
|
|
|
|
ok, it works.
And how can I Activate the main window of the already running application???
Fred.
There is no spoon.
|
|
|
|
|
|
ok!!
I see how to do that
Thanks for the help guys
There is no spoon.
|
|
|
|
|
|
i want when click any control on the form
i have messagebox that contain
control name
control location
control tabindex
ma_refay
|
|
|
|