Question Using a control from another class

Bines

New member
Joined
Aug 29, 2007
Messages
3
Programming Experience
Beginner
I create a new Windows project, by default it produces a class called Form1.
On this form I place a menu bar with a drop down menu item called 'setup'.
When I choose 'setup' I want to display a control to set up a serial port.

I want to encapsulate all code to do with my serial port into a separate class called 'SerPort'. This class will handle setting up, opening, reading, writing and closing the port.

My question is: in my 'SerPort' class, can I place code which will display a control such as a dialog box to enable me to put in parameters such as baud rate, COM port number etc. I would want to bring this up in response to the click event for the 'setup' menu item in the main Form1 class. If so can anyone point me in the right direction as to how.

I might be completely up the creek with my thinking so if I'm asking a silly question please tell me (gently!)

bines
 
little lost

im a little lost,
if u asking how to get another form up u would user .show expamle
Form1 code
Form2.show

that will bring up form2

if u want to know how to get the info need out of the class used in the other form code.

all u do is dim somthing so like
Dim port as new classname ' the class name ur class name.
im sure that how the code goes try it out

if i did not answer u Q at all pst back
 
Back
Top