Results 1 to 4 of 4

Thread: System Tray Sample

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    5

    System Tray Sample

    Hi all,

    in the following sample supplied by Mickeysoft you can minimise the application by clicking on the button, but i would like to minimise the application by clicking the minimise button or close button like on messenger

    Sample System Tray

    many thanks

    alex t

  2. #2
    Addicted Member Nigh™a®e's Avatar
    Join Date
    Feb 2002
    Location
    Belgium
    Posts
    175
    To minimize or hide the form with using the buttons,
    use
    Base Class Events - Closing

    Code:
    Private Sub frmMain_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
            Me.Hide()
            Me.WindowState = FormWindowState.Minimized
            e.Cancel = True
        End Sub
    Instread of
    Code:
    Me.Close
    (unloads the form) use Me.Hide[/CODE] to hide to screen or
    Code:
    Me.WindowState = FormWindowState.Minimized
    to minimize the window.

    Use the
    Code:
    e.Cancel = True
    to tell the form that its not allowed to shut down

    To exit the application use the
    Code:
    Application.Exit
    command

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    5

    System tray

    Hi Nigh™a®e,

    it more or less what i am looking for, my first post weren't to weel written

    in the sample you can minimise the application buy pressing the minimise button and then app gets minimised to the task bar as per normal, but i the sample you have a button named "minimised" or "sys tray" and then it gets minimised to the sytem tray

    but what i would like is to have the standard minimise button to minimise the app to the system tray


    hope this explains a bit more

    p.s. how many times can you have the word minimise in your question

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    5
    if i want to have an msgbox displaye when the form is minimised how can i o that

    this shouls help me enough

    many thanks

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