How to hide a textbox in the main form from another Class

M

Max Powers

Hello, does anyone know how to hide/show a textbox field in the main
form from another class?

I named the main form frmMain and it has a textbox field called
txtOrderName. I then have a public class named clsProcessData. I
would like to create a procedure in this class that will hide the
textbox in the main form. How do I reference the text field from the
new class?

I know that the answer will be quite simple, but I can't seem to find
it.

Thanks.
 
J

Jeff Gaines

Hello, does anyone know how to hide/show a textbox field in the main
form from another class?

I named the main form frmMain and it has a textbox field called
txtOrderName. I then have a public class named clsProcessData. I
would like to create a procedure in this class that will hide the
textbox in the main form. How do I reference the text field from the
new class?

I know that the answer will be quite simple, but I can't seem to find
it.

Thanks.

Can you create an instance of your class:

public clsProcessData(TextBox txtBox)

Then as long as the TextBox modifiers are public/internal you will be able
to do pretty well what you like with it.
 
M

Max Powers

Thanks, I'll give it a try.

Jeff said:
Can you create an instance of your class:

public clsProcessData(TextBox txtBox)

Then as long as the TextBox modifiers are public/internal you will be able
to do pretty well what you like with it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top