Well i want to create a button where it hides bit of my program and when u click that buttton again it unhides it...
how do i do that?
Printable View
Well i want to create a button where it hides bit of my program and when u click that buttton again it unhides it...
how do i do that?
Are you trying to hide your code from the IDE or not run the code while the program is running? Please explain more.
It depends a lot on a lot of specifics, but you hide/show a form with Form.Hide or Form.Show. You can hide all forms with
vb Code:
Dim frm As Form For Each frm in Forms frm.Hide Next
But, this'll hide all of your forms, so the user won't be able to give input to your program again (assuming a simple program here). You can keep from hiding the form that calls this "hide" routine with this:
vb Code:
Dim frm As Form For Each frm In Forms If Not (frm Is Me) Then frm.Hide Next frm
Using my magical skills of telepathy, it sounds like maybe you want this done using a task bar icon? If so these forums have a lot of info on doing that, accessible via a search.
example
1
http://i34.tinypic.com/2wrj6om.jpg
and when u click OPEN (as u cant see there
http://i38.tinypic.com/2h4gidz.jpg
it opens up the sidebar with more info and u can hide that....
change the width property of the form to suit
There is also the visible property of the controls that you can set...
see my attachment
edit:
Code:Private Sub cmdShow_Click()
If cmdShow.Caption = "S H O W" Then
' code to show
cmdShow.Caption = "H I D E"
Else
' code to hide
cmdShow.Caption = "S H O W"
End If
End Sub
You are da man :PQuote:
Originally Posted by jp26198926