Results 1 to 7 of 7

Thread: How do i change a property of a control in another app?

  1. #1

    Thread Starter
    Lively Member astroanu2004's Avatar
    Join Date
    Jan 2008
    Location
    Sri Lanka
    Posts
    108

    How do i change a property of a control in another app?

    i have two apps written in vb. when the user has typed the correct user name and pass i want to send that info to the 2nd app which will email tat to a given address.

    how do i do this.
    i tried this with timers and registry it didnt work nicely.

  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: How do i change a property of a control in another app?

    There are many ways how apps can communicate. Some more, some less efficient.

    For example. You can use Winsock component. One app can open a socket and listen to it. The other one then sends a message.

    Btw... you cannot change Control's Property from another app directly. You can however use some APIs but is quite complicated.

  3. #3

    Thread Starter
    Lively Member astroanu2004's Avatar
    Join Date
    Jan 2008
    Location
    Sri Lanka
    Posts
    108

    Re: How do i change a property of a control in another app?

    ok how do i do it with API. ive been told i can do it that way. any links or samples?

  4. #4
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: How do i change a property of a control in another app?

    Quote Originally Posted by astroanu2004
    i have two apps written in vb. when the user has typed the correct user name and pass i want to send that info to the 2nd app which will email tat to a given address.

    how do i do this.
    i tried this with timers and registry it didnt work nicely.
    You could modify the second app to that it uses the Command$ function to accept input parameters (in this case the name and password). You could then Shell the second app from the first.

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: How do i change a property of a control in another app?

    Here's an example:

    App2.exe contains

    Code:
    Private Sub Form_Load()
    
    Text1.Text = Command$
    
    End Sub
    App1 does this

    Code:
        Shell "C:\temp\app2.exe hi there"
    When you do that, App2 will show up with hi there in text1.text

  6. #6

    Thread Starter
    Lively Member astroanu2004's Avatar
    Join Date
    Jan 2008
    Location
    Sri Lanka
    Posts
    108

    Re: How do i change a property of a control in another app?

    yeah this will work only when the app loads. what about after it loads? i want to do his when both the exes are loaded on to memory.

  7. #7
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: How do i change a property of a control in another app?


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