Click here to Skip to main content
15,887,361 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Problem with SQL... Pin
Dave Herren22-May-07 10:38
Dave Herren22-May-07 10:38 
AnswerRe: Problem with SQL... Pin
Christian Graus21-May-07 13:02
protectorChristian Graus21-May-07 13:02 
GeneralRe: Problem with SQL... Pin
CCG322-May-07 0:56
CCG322-May-07 0:56 
Questionconvert app from windows to PPC? Pin
amatbrewer21-May-07 10:50
amatbrewer21-May-07 10:50 
AnswerRe: convert app from windows to PPC? Pin
Dave Kreskowiak21-May-07 13:14
mveDave Kreskowiak21-May-07 13:14 
GeneralRe: convert app from windows to PPC? Pin
amatbrewer22-May-07 8:36
amatbrewer22-May-07 8:36 
QuestionActivate a Textbox in a other Program Pin
Beginner_HC21-May-07 9:27
Beginner_HC21-May-07 9:27 
AnswerRe: Activate a Textbox in a other Program Pin
Dave Kreskowiak21-May-07 10:00
mveDave Kreskowiak21-May-07 10:00 
Maybe. It depends on the other program. If it is possible, it's with great difficulty.

You have to find the window handle of the application is question, then traverse the window tree to find the window handle of the textbox in question. Then you can pass that window handle to the Win32 function ShowWindow (I think!) to give it the input focus. Then you can TRY to stuff keystrokes into it with SendKeys.

There is a problem with this though. You cannot guarantee that the focus will stay in that window in the time it takes to go from focusing that window and stuffing the keyboard. You could very well end up stuff those keys into another window!

A better method would be to use the Win32 function SetWindowText to put the string into that window.

But, the hardest part of this is going to be getting the handle of that textbox. You have to be very familiar with the windows in that application (not the visual part you see on the screen, but the parent/child relationship of the variable controls in those windows!

In short, you simply don't have that much control over the visual elements of another application.




A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: Activate a Textbox in a other Program Pin
Dave Herren21-May-07 11:02
Dave Herren21-May-07 11:02 
GeneralRe: Activate a Textbox in a other Program Pin
Dave Kreskowiak21-May-07 13:16
mveDave Kreskowiak21-May-07 13:16 
GeneralRe: Activate a Textbox in a other Program Pin
Dave Herren26-May-07 3:11
Dave Herren26-May-07 3:11 
GeneralRe: Activate a Textbox in a other Program Pin
Dave Kreskowiak26-May-07 6:18
mveDave Kreskowiak26-May-07 6:18 
AnswerRe: Activate a Textbox in a other Program Pin
Dave Herren26-May-07 3:14
Dave Herren26-May-07 3:14 
QuestionHow can I have my program link to MyApp.msi on my website? Pin
furjaw21-May-07 7:44
furjaw21-May-07 7:44 
AnswerRe: How can I have my program link to MyApp.msi on my website? Pin
Dave Kreskowiak21-May-07 16:08
mveDave Kreskowiak21-May-07 16:08 
GeneralRe: How can I have my program link to MyApp.msi on my website? Pin
furjaw21-May-07 19:29
furjaw21-May-07 19:29 
GeneralRe: How can I have my program link to MyApp.msi on my website? Pin
Dave Kreskowiak22-May-07 11:59
mveDave Kreskowiak22-May-07 11:59 
QuestionPersistant DataSet data entry problem Pin
Quecumber25621-May-07 5:41
Quecumber25621-May-07 5:41 
AnswerRe: Persistant DataSet data entry problem Pin
Marcus J. Smith21-May-07 6:17
professionalMarcus J. Smith21-May-07 6:17 
GeneralRe: Persistant DataSet data entry problem Pin
Quecumber25621-May-07 7:06
Quecumber25621-May-07 7:06 
GeneralRe: Persistant DataSet data entry problem Pin
Marcus J. Smith21-May-07 7:35
professionalMarcus J. Smith21-May-07 7:35 
GeneralRe: Persistant DataSet data entry problem Pin
Quecumber25621-May-07 8:08
Quecumber25621-May-07 8:08 
GeneralRe: Persistant DataSet data entry problem Pin
Marcus J. Smith21-May-07 8:28
professionalMarcus J. Smith21-May-07 8:28 
GeneralRe: Persistant DataSet data entry problem Pin
Quecumber25621-May-07 9:21
Quecumber25621-May-07 9:21 
QuestionDeath by obfuscation! Pin
Rich Leyshon21-May-07 5:28
Rich Leyshon21-May-07 5:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.