yes , I would like to get window state befor it either minimize or maximize.
I try your code but not working, it always show state after window
resize(even I change by call mybase.winproc at bottom).
I writting a program that when window minimize it will minimize to tray by
using notify icon , when user left click on the notify Icon I suppose to
restore the window state. I had try by using
Me.WindowState = FormWindowState.Normal
this work fine until I found there a bug on it. if window state before
minimize is Normal this code work fine, but if window state maximize it
still work find until after that you click the window to normal. the window
isn't going to normal state but showing window bar only(like those in
linux).
"Nak" <a@a.com> wrote in message
news:en*************@TK2MSFTNGP11.phx.gbl...
is there a way to get form state before resize?
What do you mean exactly? You could trap the windows and intercept the
resizing message to actually find out what "state" the window is in before
it actually get resized.
Const WM_SIZE = &H5
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Call MyBase.WndProc(m)
Select Case m.Msg
Case WM_SIZE
Me.Text = Me.WindowState.ToString
End Select
End Sub
Is this what you wanted?
Nick.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ "No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\