Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 Prog in System tray

Status
Not open for further replies.

Dan688

Programmer
Dec 29, 2003
128
0
0
GB
Hello,
I had found some code on : for creating an app, within the system tray. One thing I need to do is right select the icon in the system tray and prompt a small popup box for the user to select "Configure" that loads a separate form or open which loads the main form.

Does anyone have any code?

Cheers
 
Hi,

You can use a popup menu.

I don't have access to VB at the minute to provide you with sample code but a quick keyword search for Popup Menu turns up several threads, including thread222-920672

Hope this helps

Harleyquinn

---------------------------------
For tsunami relief donations
 
Sure. Create a menu and name it mnuPopup. Create a menu-item and give it a caption Configure. Name it mnuConfigure. You will have a picture on your form which is used as icon in the system tray. Suppose it is called Picture1. Then place the following code in your form:

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Hex(X) = "1E3C" Or Hex(X) = "1E0F" Or Hex(X) = "1E2D" Then ' right mouseclick
PopupMenu mnuPopup, vbRightButton, , , mnuConfigure
End If

End Sub


That should do it.

Herman

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top