|
-
Mar 8th, 2001, 04:25 AM
#1
Thread Starter
Junior Member
I want to call and send a parameter to a form
because normally a form have no parameters
How can I modify a form so it can accept a parameter ?
-
Mar 8th, 2001, 05:03 AM
#2
PowerPoster
Privida, the easier way is declare a public/global variable. Set the data into this variable before you load the form.
In the form, then you juz read the data from this variable will do.
As myself also wanna to know how to make a form to accept parameter passing.
-
Mar 8th, 2001, 08:46 AM
#3
Lively Member
I have always used private member variables in the form and then written a new function like show2 in the form
i.e. code for form
Option Explicit
Private m_sMyString as String
Public Sub Show2(ByVal sParam as String)
m_sMyString = sParam
Me.Show
End Sub
-
Mar 8th, 2001, 11:28 PM
#4
Thread Starter
Junior Member
Form's Parameter
Thank's a lot
Btw, I want to know if I can use API function to do that ?
-
Mar 9th, 2001, 03:38 PM
#5
Member
I just always use Public varables on the form for the pieces I was to use. that way I initalize them before I show the form and then use the normal event structure. You can also use this to pass data back to the calling process.
PUBLIC sPassedName as String
Private Sub Form_Load()
if (me.sPassedname = "Babelfish") then
Msgbox "You are awsome!!!"
Endif
End Sub
public sub Main()
form1.sPassedName = "Babelfish"
form1.show vbmodal
end sub
-- Why would you want to do that with an API? Just Wondering.
babelfish.
[email protected]
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
|