Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 20, 1997

Easy-to-Implement Status Bar with Spyworks

The SBCEasy custom control that comes with Desaware's SpyWorks-VB can be used to update a status bar whenever the mouse moves over any control or form in your application. All you need to do is set the MouseTransit property to start tracking the mouse with SBCEasy. SBCEasy receives a MouseEnter and MouseExit event each time the mouse enters and exits a control or form. You can add code in these events to update your status bar with the appropriate help text. The Tag property of a control is one possible place to store the status bar help text. During a MouseEnter event, you can retrieve the string from the Tag property of the control the mouse is currently in and update the status bar. SBCEasy's TransitHctl property contains the VB control handle of the control the mouse is currently in. You can then pass the TransitHctl to the dwGetPropertyValue function to retrieve the Tag property. Here's an example:
 SBCEasy1_MouseEnter(...) 
dim iresptr%, tagstr$ 
: 
tagstr$ = dwGetPropertyValue(SBCEasy1.TransitHctl, _ 
"Tag", iresptr%) 
If iresptr% = 0 Then StatusBar.Caption = tagstr$ 
: 
: 
End Sub 
Dan Appleman
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date