The new vbAccelerator Site - more VB and .NET Code and Controls
Source Code
1 VB 5 Custom Controls &nbsp


 NOTE: this code has been superceded by the version at the new site.



&nbsp

Using cNewMenu DLL to create SysTray Menus with Icons

cNewMenu in the SysTray

Download the cNewMenu SysTray demonstration project (38kb)

&nbsp UpdatedUpdated! 21 March 2000 &nbsp
&nbsp Added the Win32 API call SetForegroundWindow before showing the SysTray menu - this ensures that the menu dismisses when the user clicks off the menu onto (for example) the desktop, whereas before it used to stick. &nbsp
&nbsp Fixed problem on systems with Large Fonts set. The code hardcoded a twips/pixel value of 15 into the message values responded to from the SysTray. Now the code uses VB's ScaleX method to get the correct message value so it works on all systems. &nbsp
&nbsp Before you Begin &nbsp
&nbsp This project requires the cNewMenu.DLL component. Make sure you have loaded and registered this before trying any project. &nbsp
&nbsp This project requires the SSubTmr.DLL component. Make sure you have loaded and registered this before trying any project. &nbsp

Overview
This sample shows how to use the newly introduced ShowPopupAbsolute method of the cNewMenu ActiveX DLL to implement a icon menu in the SysTray.

The code expands upon the SysTray the Easy Way sample. Essentially this project uses a VB form as a class which exposes an easy to use interface for adding your application to the system tray and responding to SysTray events.




TopBack to top

Source Code - What We're About!Back to Source Code

&nbsp


 NOTE: this code has been superceded by the version at the new site.



 

About  Contribute  Send Feedback  Privacy

Copyright © 1998-2000, Steve McMahon ( steve@vbaccelerator.com). All Rights Reserved.
Last updated: 21 March 2000