CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: window state

  1. #1
    Join Date
    Sep 2001
    Posts
    8

    window state

    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


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: window state

    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
    [email protected]

    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
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Sep 2001
    Posts
    8

    Re: window state

    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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured