| | |
How to check if a button was clicked ?
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
take a look at this... see if it helps.
http://www.daniweb.com/forums/thread90292.html
or
http://www.dreamincode.net/forums/showtopic35240.htm
http://www.daniweb.com/forums/thread90292.html
or
http://www.dreamincode.net/forums/showtopic35240.htm
Last edited by PsychicTide; Aug 9th, 2008 at 9:36 am.
•
•
Join Date: Mar 2008
Posts: 20
Reputation:
Solved Threads: 0
Please anyone help,
I have a button named "cmdOne" and i want to know if it was clicked.
I created a boolean:
Dim clicked As Boolean = False
If (clicked == True) .... ????
How do I finish this ? Please Advice, I can't go on with my program without knowing how to do this and I have been stuck trying to do it over 7 hours...
I have a button named "cmdOne" and i want to know if it was clicked.
I created a boolean:
Dim clicked As Boolean = False
If (clicked == True) .... ????
How do I finish this ? Please Advice, I can't go on with my program without knowing how to do this and I have been stuck trying to do it over 7 hours...
Somewhat correct. But you have to declare the variable at Form level not inside Click Event Handler
VB.NET Syntax (Toggle Plain Text)
Dim bBtnClicked As Boolean = False Private Sub cmdOne_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOne.Click If bBtnClicked = True Then MessageBox.Show("This button is clicked already ....") Else MessageBox.Show("This button is clicked First time ....") End If bBtnClicked = True End Sub
KSG
![]() |
Similar Threads
- tool strip button (VB.NET)
- count how often a button is clicked python/tk (Python)
- Textboxs not staying disabled after browser back button clicked (JavaScript / DHTML / AJAX)
- Change Button Name (C#)
- Next control gets turned on when previous button is clicked (VB.NET)
- command button (Visual Basic 4 / 5 / 6)
- Button Select Checkbox (HTML and CSS)
- Disable Web Control Button (ASP.NET)
- Buttons problem (Java)
Other Threads in the VB.NET Forum
- Previous Thread: Time Input
- Next Thread: using multiple forms
| Thread Tools | Search this Thread |
.net .net2005 30minutes 2005 2008 access account arithmetic array basic binary bing button buttons c# center check code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dropdownlist excel file-dialog folder ftp generatetags google gridview hardcopy image images inline insert intel internet listview mobile monitor ms net networking output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project reports" save savedialog searchbox searchvb.net select serial server soap sql table tcp text textbox timer toolbox trim update updown user usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





