winzip icon

Enhanced VB Forms (v2)

Email
Submitted on: 1/20/2015 3:36:00 AM
By: Duncan Jones (from psc cd)  
Level: Advanced
User Rating: By 11 Users
Compatibility: VB 5.0, VB 6.0
Views: 1077
 
     2 controls that vastly extend the cababilities of Visual basic. *** VBEventWindow - provides a simple subclassing control. Events: - ActiveApplicationChanged, fired when your app gains or loses user focus - LostCapture, fired when your app gains or loses the capture - KeyPressed, fired when any of the keys are pressed - LowMemory, fired when the system is running low on memory - Move, fired when the form is moved - VerticalScroll, HorizontalScroll, fired when the form scrollbars are set - WindowsSettingsChanged, WindowsINIChanged , fired when the windows environment settings are changed - NonClientMouseMove,NonClientMouseDown,NonClientMouseUp,NonClientDblClick, fired when a mouse event occurs in the non-client part of your form - MinMaxSize, fired when the OS wants to know what size to make your form either in response to a minimise/maximise command or when the user is dragging the resize box. - MouseOverMenu, fired when the mouse is over a top level menu - WindowMessageFired fired for all the other windows messages Methods: - InvalidateRect, Sets part of the form invalid to indicate that it needs to be repainted Properties: - ClassName, returns the windows class name fo the form - DeviceContext, returns the device contect of the form (for graphical operations) - HorizontalScrollbar, VerticalScrollbar, sets or unsets scrollbars on the form - TopMost sets the form to float over the top of other forms - Transparent, makes the formclient area invisible Use: In the form load... Private Sub Form_Load() Me.VBEventWindow.ParentForm = Me.hWnd End Sub *** VBSysTrayCtl - Provides a simple control to allow your application to use the SysTray Events: - MouseMove, Fired when the mouse moves over the tray icon - MouseDown, Fired when a mouse down event occurs over the tray icon - MouseUp, Fired when a mouse up event occurs over the tray icon - MouseDblClick, Fired when the user double clicks the Tray Icon Methods: - ShowIcon, displays the icon in the system tray area - Hideicon, removes the icon from the system tray area - Refresh, updates the icon displayed in the system tray area Properties: - Tooltip, the tip that is displayed if the user hovers the mouse over your systray icon Use: In the form load.... Private Sub Form_Load() Me.VBSysTrayCtl1.Tooltip = "Merrion Computing" Me.VBSysTrayCtl1.ShowIcon End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) Me.VBSysTrayCtl1.Hideicon End Sub
 

Windows API/Global Declarations:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
'Windows API/Global Declarations for :Enhanced VB Forms (v2)
'**************************************
This source code has examples of a huge number of API calls. It is worth downloading for that alone.
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com


Other 17 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.