Reproducing "on focus" when minimizing another window on a context menu strip click
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Reproducing "on focus" when minimizing another window on a context menu strip click

  1. #1
    Join Date
    Sep 2014
    Posts
    4

    Reproducing "on focus" when minimizing another window on a context menu strip click

    Greetings,

    I would like to reproduce the "on focus" behavior when you minimize an application on a context menu strip, let me explain why:

    When you minimize a window, the focus will be restored to the previous application that was used last, it's what I want to reproduce, basically, when I press on a selection on the context menu strip, I would like that application that was previously focused get the focus back so I don't have to click on it again.

    Is there any way to achieve that?

    I tried to play This.WindowState = this.WindowState = FormWindowState.Minimized; to make the program think it's getting minimized but it did not recreate the behavior I am expecting.

    Thanks a lot for your time and help.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,486

    Re: Reproducing "on focus" when minimizing another window on a context menu strip cli

    By context menu strip, are you referring to the system taskbar (i.e the one that contains the start menu button)?

  3. #3
    Join Date
    Sep 2014
    Posts
    4

    Re: Reproducing "on focus" when minimizing another window on a context menu strip cli

    Greetings,

    The context menu strip is when you right click on an icon in the system tray (bottom right of the screen), basically the right click on the notify icon.

    Context menu strip is the name of the control in VS2013.

    Thanks a lot again for your time and help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center