Hi! I try to show Windows Form but the form is showing for a moment and after that closes itself. Is Someone can help me???
destruct0
7
Junior Poster in Training
Recommended Answers
Jump to PostWould you mind showing us the code? I cannot know what can be wrong.
Jump to PostExplain: What type is a WindowsForm?
When I use a form it is normally derived from the Form class. A class that lives in the System.Windows.Forms namespace.
Jump to PostWindowsForm windowsForm = new WindowsForm();
windowsForm.Show();It shown for a moment after that the form closes itself.
Provide the whole method that is in. I suspect the method ends right after the Show, which makes the variable windowsForm go out of scope, which closes the window.
All 10 Replies
Mitja Bonca
557
Nearly a Posting Maven
destruct0
7
Junior Poster in Training
ddanbe
2,724
Professional Procrastinator
Featured Poster
Momerath
1,327
Nearly a Senior Poster
Featured Poster
yash_shukla
0
Newbie Poster
Mitja Bonca
557
Nearly a Posting Maven
destruct0
7
Junior Poster in Training
sknake
1,622
Senior Poster
Featured Poster
destruct0
7
Junior Poster in Training
sknake
1,622
Senior Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.