|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Custom Toolbar control of VB6clicks a tool button, a second Form pops up just below the button (like a dropdown menu). And when user moves (not click) the mouse on the next button of the toolbar, the first menu disappears and the second menu (another Form) pops up. While the mouse is still over the second button (not clicked), the user moves the mouse to the title bar of the Main form (that is right above the toolbar) with an intention of moving the Main form. When the Main form moves, the second popup menu (a Form) still remains open. How can I make the second menu to disappear when the user clicks on the title bar of the Main From? I have tried the following: Set the Visible property of the second form to False in the GotFocus event of the Main Form. But it did not work. It seems the clicking on the title bar of a form does not get a focus to the form. I did the same in the MouseMove event of the Toolbar. This also did not work. Note that the toolbar does not have LostFocus event. I cannot use the MouseUp event of the Toolbar since the mouse is not clicked on the second button of the toolbar, it is just hovered over the second button. I can do the following but want to avoid doing these two techniques: 1. Place a second control (e.g, a label) in between the toolbar and the title bar of the Main form and use the MouseMove event of that second control: This will make the toolbar look a little ugly 2. Get rid of the title bar of the Main Form using Windows API and create my own custom title bar: Using API’s can sometime cause some other issues depending on the user’s system. Does anyone have any other ideas? Thanks, Nam "Nam" <N**@discussions.microsoft.com> wrote in message Try the Activate event. Gotfocus will not fire on a form if it contains news:BD88A714-DF2D-4DB6-8E9C-F97FC81999F0@microsoft.com... > > Set the Visible property of the second form to False in the GotFocus event > of the Main Form. But it did not work. It seems the clicking on the title > bar > of a form does not get a focus to the form. I did the same in the > MouseMove > event of the Toolbar. This also did not work. controls that can rec'v focus. -- Ken Halter - MS-MVP-VB - http://www.vbsight.com DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm Please keep all discussions in the groups..
3 dimenional control array
Converting decimal to BCD (binary coded decimal)... Transparent Picturebox I must be blind -- what's wrong with this sub? RESET does what? Why can't I test class functions from the Immediate window? advanced tooltip bubbles question Reverse Array order ? Activex Exe convert month to month |
|||||||||||||||||||||||