| | |
VB6 form focus
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Sep 2007
Posts: 33
Reputation:
Solved Threads: 1
I can't find out if a form is in focus in my code.
I have a form subclassed to catch an event that the form is being moved, so that I can have a separate form docked to it that moves along with it (without using a timer). But each form has this code in it and when one form moves the other moves as well, causing both FormMove events to fire simultaneously making the movement rough and ugly. I want to use an if statement to check if the form is in focus before running this code but I can't figure it out. I tried making a boolean variable that is set to true when the GotFocus event fires, and set to false when the LostFocus event fires. But it is always false.
Any suggestions?
I have a form subclassed to catch an event that the form is being moved, so that I can have a separate form docked to it that moves along with it (without using a timer). But each form has this code in it and when one form moves the other moves as well, causing both FormMove events to fire simultaneously making the movement rough and ugly. I want to use an if statement to check if the form is in focus before running this code but I can't figure it out. I tried making a boolean variable that is set to true when the GotFocus event fires, and set to false when the LostFocus event fires. But it is always false.
Any suggestions?
![]() |
Similar Threads
- VB6 - Make Tab key also an "Enter" key. (Visual Basic 4 / 5 / 6)
- Moving focus..... (Visual Basic 4 / 5 / 6)
- Run-Time error 5 (Visual Basic 4 / 5 / 6)
- VB6 oRPG game: Book of Souls (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Some help with a VBA solution
- Next Thread: VB6 Timer doesn't work
Views: 1015 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





