two actions to one button

digita

Active member
Joined
Jul 8, 2004
Messages
29
Programming Experience
1-3
hi,

I have a very simple question, but i can't figure it out. I have a button and i want to use that button to hide and to show a groupbox. but how do i do that?

I tried this, but that isn't right

VB.NET:
[size=2][color=#0000ff]Private[/color][/size][size=2][color=#0000ff]Sub[/color][/size][size=2] btnTechInfo_Click([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] sender [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Object[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] e [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.EventArgs) [/size][size=2][color=#0000ff]Handles[/color][/size][size=2] btnTechInfo.Click[/size]
 
[size=2]If GroupBox.Hide = True Then[/size]
[size=2]GroupBox.Show[/size]
[size=2]Elseif GroupBox.Show = True Then[/size]
[size=2]GroupBox.Hide
[/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]Sub
 
[/color][/size]

I think it is very simple, but I don't know it.

Edit: Never Mind, i already found the solution it like this
VB.NET:
GroupBox.Visible = Not Groupbox.Visible
 
Last edited:
Top Bottom