Add code during runtime
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts
Page 1 of 1
Hello,
First, I am using this code: viewtopic.php?f=38&t=1998
Now, I need to know how to do something like:
NewButton.Code = Textbox1.Text
I know that won't work, but I really want to know! Please somebody help me!
~GoodGuy17
First, I am using this code: viewtopic.php?f=38&t=1998
Now, I need to know how to do something like:
NewButton.Code = Textbox1.Text
I know that won't work, but I really want to know! Please somebody help me!
~GoodGuy17

Code: Select all
...
AddHandler z.Click, AddressOf oneClicked
Controls.Add(z)
..
Private Sub oneClicked(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim cause As Button = sender
cause.Text = Textbox1.Text
End Sub
Im sorry, but I need to do this:
When you click a button, it adds the code in textbox1 to the created button(like a msgbox), then when you click the button, it makes a msgbox.
That's what I need.
When you click a button, it adds the code in textbox1 to the created button(like a msgbox), then when you click the button, it makes a msgbox.
That's what I need.
What do you mean by code? The event?
You can just set it with AddHandler.
You can just set it with AddHandler.
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023