If I understand the issue correctly, you're trying to access button controls on form2 from code in form1.
Place a button named 'btnTryIt' on Form1.
On Form2, place 5 buttons named 'Button1' through 'Button5', then
Try this in Form1:
Private Sub Btn_Click(sender As Object, e As EventArgs)...
Thank you, John. "controls box" should read ToolBox. ie, the control is compiled and can be placed on the form. The controls.controls.pwButton looked funny to me, too, but being a .net newbie, I don't quite understand how namespaces work. I'll go read some more and see if that's the...
Well, I am unique! :) Since it's no longer a show stopper, I'll continue with my project and hope I find the answer soon. One of the modules in this project (a conversion from VB6 to .net) has over 300 data inputs. I'd like to solve the issue before then, so if anyone has any ideas...
I created a simple class to add a little functionality to a button control:
Public Class pwButton
Inherits System.Windows.Forms.Button
Public Sub New()
MyBase.New()
ForeColor = Color.Indigo
BackColor = Color.LightGray
Height = 10
End Sub
End Class
After building, the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.