|
-
Apr 22nd, 2003, 01:29 AM
#1
Thread Starter
New Member
I need a vb6 to vb.net translation dictionary
I need a vb6 to vb.net translation dictionary
in vb 6, i was able to control object of form from other forms. ex:
form1 obj:
label
text box
button
form2 obj:
label
text box
button
while in form 2:
form1.testbox.text = "sdfasjfla"
while in form 1:
form2.testbox.text = "sdfasjfla"
how do you do that is vb .net
-
Apr 22nd, 2003, 12:46 PM
#2
PowerPoster
-
Apr 22nd, 2003, 03:24 PM
#3
-
Apr 22nd, 2003, 04:21 PM
#4
Thread Starter
New Member
Here's what i am actually trying to do. i have form1 as a menu. calling form 2 on a biutton click. there is a media player on form1 that starts play on exec. i have it stopping when i open form2. but i need a way to start the player back up. it isn't really passing data form to form, it is more like doing a method on a parent form.
-
Apr 22nd, 2003, 04:24 PM
#5
PowerPoster
You need to make the method public. Then you still need a reference to the form your calling the method on. Then you just do myForm.Method()
-
Apr 22nd, 2003, 08:52 PM
#6
Thread Starter
New Member
not to sound dumb, but how do you make a method public
-
Apr 22nd, 2003, 09:04 PM
#7
PowerPoster
No such thing as a dumb question...
Here is a private method:
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
Here is a public method:
VB Code:
Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
Notice the first word in the method. It is the access modifier. It can be private, which means only available to the class itself, or public which means it can be accessed from other objects as well as the class itself. There are other ones like friend, but you probably don't need it now, but you might want to look it up later.
-
Apr 22nd, 2003, 09:15 PM
#8
Thread Starter
New Member
even if it is a pre rpogramed method like player.play() or player.stop()?? i am using a windows media player control if that helps
-
Apr 22nd, 2003, 10:23 PM
#9
PowerPoster
Post your code, I will look at what your doing and show you how to do it.
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
|