|
|
|
Author |
Message |
Martin Hooper
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
I am looking to create a simple program that pops up a balloon on startup.
What I want to do is hide the form1 that is created. How do I do it
I can use the notifyicon for displaying the balloon no problem.
Visual Studio Express Editions44
|
|
|
|
|
tattoo
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
Hello Martin,
I haven't tried this myself but maybe Me.Hide()
hope it works
tattoo
|
|
|
|
|
Shady9399
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
Try this
Private Sub Form1_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged
Me.Hide()
End Sub
or
Private Sub Form1_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged
Me.Visible = false
End Sub
|
|
|
|
|
SJWhiteley
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
You may have to take a few extra steps, since just 'hiding' the form may cause it to flicker: Set the opacity to zero, so it's completely transparent (and perhaps set showintaskbar false).
|
|
|
|
|
Martin Hooper
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
|
Try this
Private Sub Form1_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged
Me.Hide()
End Sub
or
Private Sub Form1_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged
Me.Visible = false
End Sub |
|
Already tried Me.Hide and just tried me.visible and that doesn't work either...
|
|
|
|
|
ReneeC
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
|
|
|
Martin Hooper
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
The form is still open on the desktop. It needs to be hidden from view. Not too bothered about it being in the taskbar though.
|
|
|
|
|
SJWhiteley
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
Did you try setting the opacity
|
|
|
|
|
DMan1
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
| The form is still open on the desktop. It needs to be hidden from view. Not too bothered about it being in the taskbar though.
|
|
Me .WindowState = FormWindowState.Minimized
|
|
|
|
|
Martin Hooper
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
Ahh That would work... Although I used sendkeys to minimize it. ;)
|
|
|
|
|
Chris Dunaway
|
Posted: Visual Basic Express Edition, How do I hide a form? |
Top |
If you do not want the form to be visible, then don't show it!! That is the easiest way to accomplish what you want.
You can instantiate the form if you need to without showing it.
Chris
|
|
|
|
|
|
|