Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


WinGetActive Not Getting Active Window

Keywords:   WinGetActive()

Question:

  1. I open a program called "PCphone" and put it in the background.

  2. I run:
       WinActivate("PCphone Pro")
       Delay(2)
       Name = WinGetActive()
       Message("", Name)
    
  3. The progam comes to the foreground :-)

  4. The messagebox is empty - Name == "" :-((
The program can be seen by WinItemize(). WinInfo doesn´t show any title as well.

The focus is on the button I used recently. There is no window to type in, but I can use keystrokes to press buttons - this works.

Note: PCphone seems to be written in VB and has at least parts written in VB2. Problems with that? Thank you for any hints.

Answer:

I suspect there is a blank named Window someplace. After WinActivate where is the window "focus" - what window gets keystrokes if you start typing.

WinBatch has a hard time "seeing" blank-named windows. Using the "Control Manager" extender - downloadable from our download area - you can see windows better - with lots more code.


Article ID:   W13376
Filename:   Use WinGetActive to Get Active Window.txt