M
Martin G. Brown
I am trying to write a system tray application. I want it to have an
invisible window when it loads, with just an icon in the bottom right of the
screen.
I have placed the following line in the Form_Load event but it doesn't seem
to work.
me.Visible = false
The form just gets displayed anyway, no error messages. The VisibleChanged
event fires twice once when I set the value and again immediately after the
Form_Load event, this second time the value of me.Visible is true.
I have tried putting the code in various events but I get a rather annoying
"flash" of the form before it disappears.
for example
Dim bFirst as boolean = true
Private Sub Form_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
if bFirst then
bFirst = false
me.Visible = false
end if
End Sub
Does anyone have any ideas?
Martin
invisible window when it loads, with just an icon in the bottom right of the
screen.
I have placed the following line in the Form_Load event but it doesn't seem
to work.
me.Visible = false
The form just gets displayed anyway, no error messages. The VisibleChanged
event fires twice once when I set the value and again immediately after the
Form_Load event, this second time the value of me.Visible is true.
I have tried putting the code in various events but I get a rather annoying
"flash" of the form before it disappears.
for example
Dim bFirst as boolean = true
Private Sub Form_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
if bFirst then
bFirst = false
me.Visible = false
end if
End Sub
Does anyone have any ideas?
Martin