Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there some thinge like this "OnCreateComplete"

Status
Not open for further replies.

Wolf67

Programmer
Mar 18, 2005
11
SE
Hello!

Is there something like "OnCreateComplete". What I want to do is when the Windows form i loaded an displayed I want to check a if a textbox contains text. How do i do that, is there any event that i could use?
 
I put most of that sort of stuff in the Load event of the form.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Yes I tried that too but in I open another form and init a class in the code and I get error that say's something like this "Object has no reference..." I trie that if i have the "base form" created already the error disapear.

 
Why wouldn't you put that validation in a method that you call at the end of your constructor?


private void CheckForText()
{
if (textbox1.Text != "")
{
//there is text
}
}


public Yourclass()
{
InitializeComponents();
CheckForText();
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top