![]() |
Function doesnt work!
I have a form and it got 2 buttons on...
:
using System;If i click button1 then messagebox should popup with message "Yo! Man" but if i click button2 then there should be message "Yo! Dude". My problem is that this code example doesnt work. Maybe someone can direct me to right way. |
Did you use an IDE to write this code? Your problem is the lack of a MessageBox in C#. VB has it but in C# you have to make your own.
|
[quote]Your problem is the lack of a MessageBox in C#[quote]
NewsFlash :
using System;I haven't tried it but the problem i think was that Var1 was defined in every function and it existed only inside that function. Now I've declared as a global variable. Also you need to set Var1 to Dude before u call MessageShow(). |
Thank you xavier, it works perfect.
|
| All times are GMT -5. The time now is 1:44 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC