Click here to Skip to main content
15,920,111 members
Home / Discussions / C#
   

C#

 
QuestionPopup shown in backgroundworker thread Pin
PrashantGadhave20-Sep-08 23:40
PrashantGadhave20-Sep-08 23:40 
AnswerRe: Popup shown in backgroundworker thread Pin
PrashantGadhave21-Sep-08 0:38
PrashantGadhave21-Sep-08 0:38 
GeneralRe: Popup shown in backgroundworker thread Pin
Wendelius21-Sep-08 1:09
mentorWendelius21-Sep-08 1:09 
GeneralRe: Popup shown in backgroundworker thread Pin
PrashantGadhave21-Sep-08 1:55
PrashantGadhave21-Sep-08 1:55 
GeneralRe: Popup shown in backgroundworker thread Pin
Wendelius21-Sep-08 3:52
mentorWendelius21-Sep-08 3:52 
GeneralRe: Popup shown in backgroundworker thread Pin
PrashantGadhave22-Sep-08 6:52
PrashantGadhave22-Sep-08 6:52 
GeneralRe: Popup shown in backgroundworker thread Pin
Wendelius22-Sep-08 8:00
mentorWendelius22-Sep-08 8:00 
GeneralRe: Popup shown in backgroundworker thread Pin
Alan N22-Sep-08 8:27
Alan N22-Sep-08 8:27 
Hi,
I'm intrigued. If you have shown the progress form with ShowDialog() as your post suggests, how are you minimising the main form? Is it being done programmatically as I can't see how it could be done by user interaction?

I crafted a little test app which has a main form (Form1), a second form (AboutBox1) and a timer set to 5 seconds the function of which is to minimise and restore the main window. Both forms have the ShowInTaskBar property set to true.

If the app is run with about.Show(this) uncommented the two windows minimise and restore properly as a pair which simulates the action you desire in your app.

However try it when the second form is shown via ShowDialog()and you will find that the second form never reappears once it has been minimised.

I'm not sure why this is the case but the solution to your problem may be as simple as starting the progress form with Show rather than ShowDialog. Use the Show(this) version to ensure that the progress form stays on top of the main form.

public partial class Form1 : Form {
    public Form1() {
      InitializeComponent();
      timer1.Interval = 5000;
      timer1.Enabled = true;
    }

    private void Form1_Shown(object sender, EventArgs e) {
      AboutBox1 about = new AboutBox1();
      about.ShowInTaskbar = true;
      //about.ShowDialog(this);
      //about.Show(this);
    }

    private void timer1_Tick(object sender, EventArgs e) {
      if (this.WindowState != FormWindowState.Normal) {
        this.WindowState = FormWindowState.Normal;
      } else {
        this.WindowState = FormWindowState.Minimized;
      }
    }

  }


Alan.
GeneralRe: Popup shown in backgroundworker thread Pin
PrashantGadhave24-Sep-08 2:19
PrashantGadhave24-Sep-08 2:19 
Questioncan someone help me in this program.. Pin
cutedrew20-Sep-08 21:38
cutedrew20-Sep-08 21:38 
AnswerRe: can someone help me in this program.. Pin
zafersavas21-Sep-08 0:50
zafersavas21-Sep-08 0:50 
AnswerRe: can someone help me in this program.. Pin
Ashfield21-Sep-08 21:41
Ashfield21-Sep-08 21:41 
QuestionSOA & C# Pin
Gil Shimer20-Sep-08 21:14
Gil Shimer20-Sep-08 21:14 
AnswerRe: SOA & C# Pin
Wendelius21-Sep-08 0:41
mentorWendelius21-Sep-08 0:41 
GeneralRe: SOA & C# Pin
Gil Shimer21-Sep-08 23:13
Gil Shimer21-Sep-08 23:13 
GeneralRe: SOA & C# Pin
Wendelius22-Sep-08 7:45
mentorWendelius22-Sep-08 7:45 
GeneralRe: SOA & C# Pin
Gil Shimer22-Sep-08 20:41
Gil Shimer22-Sep-08 20:41 
GeneralRe: SOA & C# Pin
Wendelius23-Sep-08 5:45
mentorWendelius23-Sep-08 5:45 
AnswerRe: SOA & C# Pin
Kevin McFarlane21-Sep-08 5:47
Kevin McFarlane21-Sep-08 5:47 
GeneralRe: SOA & C# Pin
Gil Shimer21-Sep-08 23:20
Gil Shimer21-Sep-08 23:20 
GeneralRe: SOA & C# Pin
Kevin McFarlane22-Sep-08 0:12
Kevin McFarlane22-Sep-08 0:12 
GeneralRe: SOA & C# Pin
Gil Shimer22-Sep-08 0:26
Gil Shimer22-Sep-08 0:26 
QuestionSOAP header Pin
George_George20-Sep-08 20:15
George_George20-Sep-08 20:15 
AnswerRe: SOAP header Pin
Wendelius21-Sep-08 0:48
mentorWendelius21-Sep-08 0:48 
GeneralRe: SOAP header Pin
George_George21-Sep-08 20:57
George_George21-Sep-08 20:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.