Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Minimizing Form on First Load

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    UK
    Posts
    489

    Resolved [RESOLVED] [2005] Minimizing Form on First Load

    Hi

    Right basically my application is going to startup when the computer boots up, however I have got code in the forms Load event handler and I need it to be executed, I want the form to appear for 1 sec and the minimize to the system tray, it already minimizes to the system tray when click though.

    I though of putting this at the end of the form load event

    Code:
        Dim int As Integer = 1
            int += 1
            If int = 2 Then
            me.hide
            End If
    That way the form is only going to minimize the first time it is loaded, bu for some reason it does not minimize

    Help appreciated
    Learning C♯

    Data Binding & Bound Controls - Objects and wizards will never be as intelligent as you, do it yourself! (Unless your Pro)

  2. #2
    Fanatic Member Lerroy_Jenkins's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    661

    Re: [2005] Minimizing Form on First Load

    vb Code:
    1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         Me.WindowState = FormWindowState.Minimized
    3.     End Sub

    Works a charm
    Lerroy

    "η β π", or "Eta Beta Pi" (Eat A Better Pie)

    01001000
    01000101
    01001100
    01010000


    My Own Code - WordCounter

    Useful Forum Links -Reputation - What is it?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    UK
    Posts
    489

    Re: [2005] Minimizing Form on First Load

    Already tried that, still didnt work

    EDIT: Ah just seen a contidion isnt being met in my code, hence why it isnt working lol, thanks anyways.
    Learning C♯

    Data Binding & Bound Controls - Objects and wizards will never be as intelligent as you, do it yourself! (Unless your Pro)

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