471,317 Members | 2,578 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

problem in display a form normally


I got a problem in display a sub form.
My app contains two form: main and sub.
I want sub form display before main form, to provide some information
to it. I use a NotifyIcon to activity sub form.
In main form's loading event( and doubleclick event of notifyicon ), i
wrote something like:

notifyIcon.Visible = false;
subForm dlg = new subForm();
DialogResult dResult = dlg.DialogResult;
if (dResult == DialogResult.OK){
notifyIcon.Visible = true;

The main forms are hides by:
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;

Then I wrote following in subForm to display it:
private void subForm_Load(object sender, System.EventArgs e)
this.StartPosition = FormStartPosition.Manual;
this.WindowState = FormWindowState.Normal;
this.ShowInTaskbar = false;
but I can't display sub form by double click notify icon. The notify
icon disappear a second, then show again. sub form and main form didn't
Am I miss some thing?

Feb 15 '06 #1
0 1253

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by HartSA | last post: by
2 posts views Thread by Dave | last post: by
2 posts views Thread by COHENMARVIN | last post: by
2 posts views Thread by sorobor | last post: by
2 posts views Thread by =?Utf-8?B?aGVsZmk=?= | last post: by
2 posts views Thread by Oriane | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.