Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Focusing on another window
#1
For an example, my program is focused on another program using if statements etc. on it.
Reply
#2
you want to know if a window is in focus or how to put it in focus?
Reply
#3
frmGAYWINDOW.setfocus
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#4
example..

Code:
On Error Resume Next
    frmMirage.txtMyTextBox.SetFocus
Reply
#5
Would it be possible to set it true or false? Exactly what would happen if you focused on that text box?
Reply
#6
Xerô Wrote:Would it be possible to set it true or false? Exactly what would happen if you focused on that text box?

To unfocus, you'll need to setfocus something else.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#7
if windowblah.visible then
windowblah.setfocus
else
frmmirage.setfocus
end if

or something
Reply
#8
No I mean a whole different program. XD Should've been more clear.
Reply
#9
I think using .Focus will work on any project, because its not an function, its apart of VB.
Reply
#10
yes but that will only work within a single program

Kuja, I think if you want to do that, you have to find out hwnd and all that malarke for the window you want to set in focus so you can do that (Just guessing, that what you need when you want to rearrange window Zorder)

I don't know code for setting focus specifically, but I know code to rearrange window zorder which can also set focus if you want, so its basically the same thing. I'll find it after school if you still want it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)