Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations pierreick on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

An vb.net framework 2 question....

Status
Not open for further replies.

NXJockey

Automotive
Feb 9, 2009
104
Hi All,

I am currently creating a plugin for a CAD system, which only supports vb.net framework 2!!!!

I need to spawn a task out to '2' command shells, and sendkeys to the individual windows.

eg:-

Dim Test1 as string = shell("cmd.exe", vbnormalfocus)
Dim Test2 as string = shell("cmd.exe", vbnormalfocus)

The Problem which has me scratching my head is, how do i set the focus, so that i send the correct keys to the correct window.

Cheers in advance,

Nxj

 
Replies continue below

Recommended for you

You might want to check out Tek-tips.com - a sister to this site. The computer geeks live over there.
 
You might want to start with this:
I've used it a few times in my NX journals. Stay away from sendkeys if at all possible! Though I have had to resort to sendkeys on at least 1 occasion.

Do you need to interact with the cmd window or are you just sending a command with arguments?
 
Use AppActivate to set focus. It needs the title on the title bar so make sure both your apps do not have the same name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor