Results 1 to 3 of 3

Thread: [2005] help controlling another program

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Location
    Toledo, OH
    Posts
    785

    [2005] help controlling another program

    I want to Control another programs two textboxes. Im currently having trouble with checking to see if the Window Caption is the right window by searching the window caption for "DR" I was very famliliar with the Mid() instr() right() left() functions for vb6 however it's been a year or two since i've palyed with it and dont know how to use these functions in .net. I know that you shouldn't or can't use those functions in .net so what should be used? i've tried the .substring which I can get it to only give me the handles for application windows captions that have a "[" at the beginning but now I need to search within those windows for specific words or letters.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: [2005] help controlling another program

    Substring is the typical replacement for those other functions, though the other functions can still be used in .NET.

    It sounds like you are talking about substrings of substrings, but that may not be the best way to do things. Take a look at the String.Contains and String.IndexOf methods. Contains is pretty much a replacement for InStr, while Substring can replace the Mid, Left, and Right functions. The IndexOf method is similar to Contains, but returns the location of the specified text, which allows it to be used for iterative searches, or for use with substring to work like Mid.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Location
    Toledo, OH
    Posts
    785

    Re: [2005] help controlling another program

    ok thank you, is there any documentation on how to use this. seems my MSDN copy for 2008 express doesn't seem to find much on topics.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width