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.
The time you enjoy wasting is not wasted time. Bertrand Russell
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
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
Last edited by jp26198926; Oct 19th, 2008 at 10:27 AM.
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