>I am not sure how to apply any one of these, because I am not using a
> webpage yet. It is just a windows application program.
Then you should being saying form and not page. Form is for Windows Desktop
form application and page is for a Web application a Web page. Also, Onclick
kind of means Web Page. You should be saying Click event for a Windows form.
A form is a class just like any other class. You pass the control in the
form's constructor, so that the other form will use the control.
This is a simple C#.Net solution, but VB.Net you can do the same thing, use
Goggle and find the VB.Net equivalent.
<http://www.c-sharpcorner.com/UploadFile/alindag/HowToPassValuesBetweenWindowsFor
ms.htm02242006061520AM/HowToPassValuesBetweenWindowsForms.htm.aspx?ArticleID=519
479e8-d064-44a1-84b1-5ffc033dbbf3>
This is C# but you'll be close to doing some similar in VB this is passing a
value, but instead of passing a value, you are passing a control.
public Form2(cntrl DataGridView)
{
InitializeComponent();
// Please don't this to heart and continue to do this but
you would a DGV created on the second form.
// you can do this.
dgv = cntrl;
}
Then you can work with dgv on the second form, but like I said find the
VB.Net example using Google or dogpile.com. I am not going look it for it. I
think I am pointing to what you have to do to get the solution.