TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Tomas Westerlund
NA
38
32.6k
My new form is being closed automatically
Nov 16 2012 4:30 AM
Hi,
This is from my mainForm:
private void buttonAdd_Click(object sender, EventArgs e)
{
//New ContactForm
ContactForm contactForm = new ContactForm();
}
The ContactForm opens and then I fill in some data and I press the button called Add:
private void buttonAddContact_Click(object sender, EventArgs e)
{
bool isDataOk = false;
isDataOk = contact.AddAddress(textBoxFirstName.Text,
textBoxLastName.Text,
textBoxPhoneHome.Text,
textBoxPhoneCell.Text,
textBoxEmailPrivate.Text,
textBoxEmailBusiness.Text,
textBoxStreet.Text,
textBoxCity.Text,
textBoxZipcode.Text,
comboBoxCountries.Text);
}
And now my Form closes which seems to be logical. However I want that when isDataOk = false (i.e. the input data doesn't look 100%) it should now close.
I'm not sure where and how I should put this. Can anyone please assist me in this?
Best regards,
Tomas
Reply
Answers (
5
)
i have hexa decimal(FFF8F4909a95).
Delete sent mail from recipients inbox