| | |
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 .net2008 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic excel exists fade filter forms generatetags html images input insert intel internet listview map mobile module monitor msaccess net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex right-to-left save search searchvb.net select serial settings shutdown soap socket sqldatbase sqlserver survey table temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





