Tell you the truth, I don't have a clue how to do this in an input box, but you could call a modal dialog with a text box whose "Password Char" in properties in set to * (or any other character). You could also hide a text box and label on your exsting for and when your magic button is clicked...
If your application needs to know if the current form has focus (either within you application or System-wide) you can use this snippet to decide...
if AmIOnTop(Me) then
...
end if
The following are placed in a Module...
' Returns Handle of OS-Level Window that has the...
Got it, thnks to your inspiration. I am using the GetForegroundWindow API call. It works like a champ.
My code does this:
Private sub TImer1_Timer()
if IAmOnTop(me) then
...
end if
exit sub
The following are placed in a Module...
' Returns Handle of OS-Level Window that has the...
Well, vb5prgrmr, I am totally confused. I have never issues an API call from VB adn frankly I don;t know where to start. Do I need to include a reference to user32.DLL? How do i know what the parameters are? I am lame and lost! Please help if you have the patience...
JerryGoldring
I am developing a VB 6 app that refreshes a display of orders every n minutes. Problem is if I open another app (like outlook or anything else) my VB app does not know that it does not have Windows focus. So when it refreshes the list, it set focus to the grid and causes the VB window to pop...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.