Results 1 to 6 of 6

Thread: buttons leading to same form help

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2005
    Posts
    20

    Exclamation buttons leading to same form help

    Ok i have 3 buttons and they all lead to the same form, which i want them to but the problem is that i want certain results to show up depending on which of the 3 buttons is clicked. i hope i explained well enough. thanks

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: buttons leading to same form help

    Give your Results form an overloaded constructor that takes a parameter. Each of the buttons should pass in a different parameter. Your form should use the parameter to decide what results to show.
    I don't live here any more.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2005
    Posts
    20

    Re: buttons leading to same form help

    im a beginner so how do i do that? you don't have to show me the whole thing, just get me started. Thanks for replying

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Feb 2005
    Posts
    20

    Re: buttons leading to same form help

    is there a tutorial somewhere? please help

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Feb 2005
    Posts
    20

    Re: buttons leading to same form help

    I found something at a website. Is this what i need to do?


    VB Code:
    1. Private _CallingForm as Object
    2. Public Sub New()
    3.         MyBase.New()
    4.         InitializeComponent()
    5.         End Sub
    6.  
    7. Public Sub New(ByRef CallingForm as Object) 'New Constructor Note the addition of a variable
    8.         MyBase.New()
    9.         InitializeComponent()
    10.          'After initialization do this
    11.          me._CallingForm = CallingForm
    12.         End Sub

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

    Re: buttons leading to same form help

    Constructors are a fairly fundamental part of object oriented programming. Read this explanation of their usage on the MSDN library: http://msdn.microsoft.com/library/de...Guidelines.asp

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