Click here to Skip to main content
15,913,610 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: My break point not working properly Pin
poonams19-Dec-07 1:37
poonams19-Dec-07 1:37 
GeneralImage Class in vb.net 2005 Pin
VB 8.018-Dec-07 1:24
VB 8.018-Dec-07 1:24 
GeneralRe: Image Class in vb.net 2005 Pin
C1AllenS18-Dec-07 3:57
C1AllenS18-Dec-07 3:57 
GeneralRe: Image Class in vb.net 2005 Pin
VB 8.018-Dec-07 18:10
VB 8.018-Dec-07 18:10 
Generalbutton.preformclick Pin
break_day18-Dec-07 0:50
break_day18-Dec-07 0:50 
GeneralRe: button.preformclick Pin
CPallini18-Dec-07 1:07
mveCPallini18-Dec-07 1:07 
GeneralRe: button.preformclick Pin
Luc Pattyn18-Dec-07 3:50
sitebuilderLuc Pattyn18-Dec-07 3:50 
GeneralRe: button.preformclick Pin
Johan Hakkesteegt19-Dec-07 8:29
Johan Hakkesteegt19-Dec-07 8:29 
Although your question does invite ridicule, there is a way to do what you want.

1. Put the code that you want to run when you click the label in a separate sub.
2. call that sub in the click event of your label.
3. also call that sub in the VisibleChanged event of your label:
<br />
Private Sub Label1_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.VisibleChanged<br />
If Label1.Visible = True Then YourSub()<br />
End Sub

4. where you would have called label1.performclick (if it existed, which it doesn't), instead use:
<br />
Label1.Visible = false<br />
Label1.Visible = True<br />


A complete example:
<br />
Private Sub Label1_textChange()<br />
Label1.Text += "bla"<br />
End Sub<br />
<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Label1.Visible = False<br />
Label1.Visible = True<br />
End Sub<br />
<br />
Private Sub Label1_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.VisibleChanged<br />
If Label1.Visible = True Then Label1_textChange()<br />
End Sub<br />


P.S. the VisibleChanged event will also fire when your form loads, so you may want to clear it in the Form's Load event:
<br />
Private Sub YourForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
Label1.Text = ""<br />
End Sub<br />


Good luck,

Johan
My advice is free, and you may get what you paid for.

GeneralProblems with Forms in vb.net Pin
Vimalsoft(Pty) Ltd17-Dec-07 21:48
professionalVimalsoft(Pty) Ltd17-Dec-07 21:48 
GeneralRe: Problems with Forms in vb.net Pin
Christian Graus17-Dec-07 22:10
protectorChristian Graus17-Dec-07 22:10 
GeneralRe: Problems with Forms in vb.net Pin
Vimalsoft(Pty) Ltd17-Dec-07 22:35
professionalVimalsoft(Pty) Ltd17-Dec-07 22:35 
GeneralRe: Problems with Forms in vb.net Pin
Luc Pattyn18-Dec-07 0:44
sitebuilderLuc Pattyn18-Dec-07 0:44 
GeneralRe: Problems with Forms in vb.net Pin
Vimalsoft(Pty) Ltd18-Dec-07 0:46
professionalVimalsoft(Pty) Ltd18-Dec-07 0:46 
GeneralBack and forward buttons Pin
tellytub17-Dec-07 20:23
tellytub17-Dec-07 20:23 
GeneralRe: Back and forward buttons Pin
Christian Graus17-Dec-07 22:11
protectorChristian Graus17-Dec-07 22:11 
GeneralRe: Back and forward buttons Pin
tellytub18-Dec-07 3:46
tellytub18-Dec-07 3:46 
General[Message Deleted] Pin
dspandian17-Dec-07 19:42
dspandian17-Dec-07 19:42 
GeneralRe: please give code for generate report Pin
Vimalsoft(Pty) Ltd17-Dec-07 20:32
professionalVimalsoft(Pty) Ltd17-Dec-07 20:32 
GeneralRe: please give code for generate report Pin
CKnig17-Dec-07 20:33
CKnig17-Dec-07 20:33 
GeneralCompile Error (Visual Basic 6) Someone help!!! Pin
anthoy17-Dec-07 18:06
anthoy17-Dec-07 18:06 
GeneralRe: Compile Error (Visual Basic 6) Someone help!!! Pin
Vimalsoft(Pty) Ltd17-Dec-07 20:28
professionalVimalsoft(Pty) Ltd17-Dec-07 20:28 
GeneralRe: Compile Error (Visual Basic 6) Someone help!!! Pin
anthoy17-Dec-07 20:47
anthoy17-Dec-07 20:47 
GeneralRe: Compile Error (Visual Basic 6) Someone help!!! Pin
CPallini18-Dec-07 0:11
mveCPallini18-Dec-07 0:11 
Questionhow to display database data in datagridview Pin
dspandian17-Dec-07 17:39
dspandian17-Dec-07 17:39 
AnswerRe: how to display database data in datagridview Pin
Vimalsoft(Pty) Ltd17-Dec-07 20:38
professionalVimalsoft(Pty) Ltd17-Dec-07 20:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.