Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2006
    Messaggi
    562

    [VB6]Mettere form nella tray

    Ciao a tutti,
    ho trovato questo programma che mi fa mettere un form in tray:

    Private Sub Form_Load()

    ' hide this form so that only the tray icon is visible
    Me.Hide
    ' get te picture that will be used for the tray icon.
    SavePicture Me.Icon, "temp.icx"
    ' Set the tray properties.
    Tray1.SetPicture = "temp.icx"
    Tray1.SetTip = "Tray Control Example"
    ' Then load it into the system Tray!
    Tray1.Add


    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    ' clean things up before we exit.
    ' delete the icon out of the tray.
    Tray1.Delete
    ' delete the temp icon file
    Kill "temp.icx"

    End
    End Sub


    Private Sub Tray1_MouseClick(Button As Integer)
    ' we want to look for a right single click .. button = 4
    If Button = 4 Then PopupMenu traymenu

    End Sub


    Private Sub traymenu_exit_Click()

    Unload Me
    End Sub



    però c'è un prob, quando metto in tray il form scompare, allora ho levato me.hide, e il form me lo fa vedere mentre è in tray, però io voglio che il form me lo fa vedere mentre sta nella tra ma che non sia aperto nella barra delle applicazioni.
    Come faccio?

  2. #2
    Utente di HTML.it L'avatar di oregon
    Registrato dal
    Jul 2005
    residenza
    Roma
    Messaggi
    36,480
    Ma la domanda qual e'?

    Hai usato come oggetto di questa richiesta "Mettere form nella tray" ma, se ho capito, non c'entra nulla ...

  3. #3
    Utente di HTML.it
    Registrato dal
    Sep 2006
    Messaggi
    562
    Hai ragione per il titolo, la domanda è:
    come faccio a fare in modo che il form sia visualizzato sul desktop e nella tray senza però essere visualizzato nella barra applicazioni.

  4. #4
    Nella finestra di progettazione form imposta la proprietà ShowInTaskbar del form a False.
    Amaro C++, il gusto pieno dell'undefined behavior.

  5. #5
    Utente di HTML.it
    Registrato dal
    Sep 2006
    Messaggi
    562
    Perfetto grazie mille.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.