Click to See Complete Forum and Search --> : window state


sudhakrish
September 4th, 2001, 02:47 AM
Hai all
I had a small application. I created one form. I want if my application is continuously minimised for one or two minmized it should be activated after one minute.
can i do this in visual basic. how can i do this one.
I want to remove icons for minimising and maximing the windows in my form.
I want only the close icon in my form .
can any one help me please
since I need it urgently please help me asap.
Thanking you
Sincerely Yours
sudharsan

Cakkie
September 4th, 2001, 03:40 AM
1)Removing the minimize maximize buttons from the form.Leacing only the close button on the form.
Set the form bordserstyle property to fixed dialog (or anything other fixed).

Restore the form, when minimized for 1 minute.

' add a timer to the form, set it's interval to 1000
private Sub Timer1_Timer()
If me.WindowState = 1 then ' Minimized
iMinCount = iMinCount + 1
If iMinCount = 60 then
me.WindowState = 0
iMinCount = 0
End If
else ' not minimized
iMinCount = 0
End If
End Sub




Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

sudhakrish
September 4th, 2001, 09:42 PM
Hai
thanks for your help,there is another two doubts.
If I set the borderstyle property as fixed dialog. this windowstate program is not working.

2. then i changed the window state property as sizable. but it is working when my vb is activated.
I want to do whichever the applictaion is opened my form should be activated after one min. Can i do this.
if so please help me.

Thanking You.
Sincerely Yours
Sudharsan