i am using a notify icon that is always in the systray and i want that when i double click it will show back the form..(im using C# but i think it's easy to see):
this is the code i've put in the double click of the notify icon...the problem is that i only seem to can put the form back to the maximized state , i cant put it as normal..anyone knows why? it just shows up in systray but i can do nothing with it..
Originally posted by PT Exorcist lol read the post carefully i said i couldnt put normal so i tryed maximized because that was working lol but i want it normal
Did you try the code I posted , it shows your form in normal size . That was your question I guess .
problem is that i only seem to can put the form back to the maximized state , i cant put it as normal..anyone knows why? it just shows up in systray but i can do nothing with it..
Originally posted by Lunatic3 put this.Show(); before
this.WindowState = FormWindowState.Normal;
This won't make any difference. a good technique is to set the properties of a from first and then use show method .
The problem already solved I guess .
We are not talking about a GOOD technique here, we are talking about a method that does not work properly and the solution of it, that for me was putting
this.show;
before
this.WindowState = FormWindowState.Normal;
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
Originally posted by Lunatic3 Did you test what i said?????!!!!!
We are not talking about a GOOD technique here, we are talking about a method that does not work properly and the solution of it, that for me was putting
this.show;
before
this.WindowState = FormWindowState.Normal;
lol...ive already said ive tried that code and still doesnt work..but as u want that i put that again i've put ur code again and still doesnt work..it shows in the tray but the interface of the program itself isnt showed up
Originally posted by Lunatic3 First:
Pirate's code works for me fine
Second:
I am sorry, I was wrong, what i said was about VB.NET and I thought it might be the same for C#, but it wasn't.
Third:
Try this and see what i meant:
VB Code:
Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
If Me.WindowState = FormWindowState.Minimized Then
Me.Hide()
nt1.Visible = True
End If
End Sub
Private Sub nt1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles nt1.MouseDown
Me.Show()
Me.WindowState = FormWindowState.Normal
nt1.Visible = False
End Sub
Your're right Lunatic3 . I was coding in C# when I tried setting the "Normal" method before "show" . That's weird . I thought they are similar but it seems not at least in some controls.