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

  • Thread starter Thread starter Max Powers
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top