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
ullas K
NA
55
0
Closing one form while keeping other form open
Dec 2 2012 4:21 AM
Hi,
I have a
Main
Form which is the parent form.I open
Form1
inside the parent form and Form1 has a textbox
textbox1
.On
textbox1_textchanged
event i should open
Form2
and pass a value to it
keeping Form1 opened
.Depending upon that value the
datagridview
on
Form2
gets populated.Up to here it is fine.Now what i need is when i
leave
the
Textbox1
(ie,
textbox1_leave
event) i should close the
Form2
.How can i acheive that
My code for Textchanged event in Form1 is
private void textBox1_TextChanged(object sender, EventArgs e)
{
bookname = textBox1.Text;
Form2 obj = new Form2();
obj.Show();
textBox1.Focus();
}
Thanks in advance
Reply
Answers (
13
)
GRidview Textboxes
constuctor