How to maximize another program in C#?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Josh Argent
    New Member
    • Dec 2010
    • 28

    #1

    How to maximize another program in C#?

    I know there are loads of posts and articles on how to do this but I still can't get it to work :(
    I just get all kinds of error.

    Can someone maybe give me a simple sample of code to maybe maximize notepad on a button click.
    Thanks in advance :)
  • bentleyw
    New Member
    • Feb 2008
    • 32

    #2
    Out of curiosity, I did a search and found an example of how to do just that. Here is the post with code (replace '& #91;' minus the space, with '[' in a couple of spots):
    http://www.go4expert.com/forums/showthread.php?t=973

    Then just use the SW_MAXIMIZE constant value of 3 instead. It worked for me with Notepad open on Windows XP.

    Comment

    • Josh Argent
      New Member
      • Dec 2010
      • 28

      #3
      Thanks, that work fine! :D

      Comment

      Working...