How to show a form without it getting focus?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • inch
    New Member
    • Sep 2007
    • 6

    How to show a form without it getting focus?

    I would like to pop up a small information window (form) while my application is running to remind the user about something. However it should not get focus as this could intefere with what the user is doing in the main part of the application.
    It should work a bit like the pop up messages you get in MSN when a new person comes on line.
    How do I pop up a form without it getting focus? I've tried all sorts, but can't seem to get the result I want.
  • diki k
    New Member
    • May 2008
    • 3

    #2
    Originally posted by inch
    I would like to pop up a small information window (form) while my application is running to remind the user about something. However it should not get focus as this could intefere with what the user is doing in the main part of the application.
    It should work a bit like the pop up messages you get in MSN when a new person comes on line.
    How do I pop up a form without it getting focus? I've tried all sorts, but can't seem to get the result I want.
    I created 2 forms (form1 and form2). form1 has a button called button1
    Code:
    private void button1_Click(object sender, EventArgs e)
    {
         Form2 newForm = new Form2();
         newForm.Show();
         this.Activate();
    }
    This code creates a new form2 instance and shows it, however the syntax this.Activate() will set the focus to form1 so form2 will not have the focus.

    I hope this helps.

    Regards

    diki k

    Comment

    Working...