Results 1 to 7 of 7

Thread: [2005] How to link 2 GUI's??

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    63

    Question [2005] How to link 2 GUI's??

    Hey!
    I need to link 2 GUI's through the pressing of a button. How do we code the button so that it open another GUI when clicked.

    please advise


    cheers
    Abhilash
    Last edited by Abhilash007; May 8th, 2007 at 12:30 AM.

  2. #2
    Lively Member
    Join Date
    Oct 2006
    Posts
    88

    Re: [2005] How to link 2 GUI's??

    If you want to show another form, use
    vb Code:
    1. Form.Show()

    If you want to show an application (MS Word, etc), use
    vb Code:
    1. Process.Start("Application path")
    or
    vb Code:
    1. Process.Start("Application path","File to open")
    if you want to open a file with the application

  3. #3
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    675

    Re: [2005] How to link 2 GUI's??

    In the button click:
    Dim f as New NameOfYourFormHere
    f.Show (or f.ShowDialog)
    VB.Net 2008
    .Net Framework 2.0

    "Must you breathe? 'Cause I need heaven..."

  4. #4

    Thread Starter
    Member
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    63

    Re: [2005] How to link 2 GUI's??

    Hey guys!
    thx.. your info helped a lot..


    cheers
    Abhilash

  5. #5

    Thread Starter
    Member
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    63

    Question Re: [RESOLVED] [2005] How to link 2 GUI's??

    HI Guys!
    I hav another thing i want to ask since i am not able to figure it out myself...

    I have to open a new form when the user selects a particular data from a dropdown box and clicks on a button.

    Now i can open the new form using the above method which is :

    Dim f as New "myformname"
    f.show

    But my problem is that i have to use the data that was selected by the user in the dropdown box in the previous form. How do i carry that information into the new form. can i store it in some variable and use it in the new form.

    Please advise.

    Cheers
    Abhilash

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2005] How to link 2 GUI's??

    A form is an object. How do you normally pass data to an object? The answer is that you either set a property or pass a parameter to a method. If that's how you do it for objects and a form is an object then that's how you do it for forms. Declare a property in your form and assign your data to it, or else declare a method in your form and call it, passing your data as a parameter.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Member
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    63

    Re: [2005] How to link 2 GUI's??

    Hey!
    I am not sure on how to declare a property and assign the data to it.. cud u please gimme an example or something..

    I am not even sure of how to get the data selected by the user in the dropdownbox. Is it something like dropdownbox1.selectedtext or something.

    thx
    Abhilash

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