×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

An vb.net framework 2 question....

An vb.net framework 2 question....

An vb.net framework 2 question....

(OP)
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

 

RE: An vb.net framework 2 question....

You might want to check out Tek-tips.com - a sister to this site.  The computer geeks live over there.

RE: An vb.net framework 2 question....

You might want to start with this: http://msdn.microsoft.com/en-us/library/53ezey2s.aspx

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?

RE: An vb.net framework 2 question....

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources