|
-
May 18th, 2005, 08:29 AM
#1
Thread Starter
Junior Member
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
-
May 18th, 2005, 08:36 AM
#2
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.
-
May 18th, 2005, 08:40 AM
#3
Thread Starter
Junior Member
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
-
May 19th, 2005, 11:34 AM
#4
Thread Starter
Junior Member
Re: buttons leading to same form help
is there a tutorial somewhere? please help
-
May 19th, 2005, 03:55 PM
#5
Thread Starter
Junior Member
Re: buttons leading to same form help
I found something at a website. Is this what i need to do?
VB Code:
Private _CallingForm as Object
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Public Sub New(ByRef CallingForm as Object) 'New Constructor Note the addition of a variable
MyBase.New()
InitializeComponent()
'After initialization do this
me._CallingForm = CallingForm
End Sub
-
May 19th, 2005, 07:28 PM
#6
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|