Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


C# - Problem moving process window


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 fractor   Members   -  Reputation: 804

Like
0Likes
Like

Posted 30 July 2011 - 03:38 PM

Hello! I'm trying to move the window of a process I create in my windows forms application. Here is my code:


    

[DllImport("user32.dll", SetLastError = true)]
private static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
       
         helpProcess = new Process();
                helpProcess.StartInfo.FileName = "Help\\help.chm";
                helpProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
                helpProcess.Start();

                MoveWindow(helpProcess.MainWindowHandle, 600, 600, 100, 100, true);





Thank you!



Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9673

Like
0Likes
Like

Posted 30 July 2011 - 03:47 PM

So what exactly is the problem? Compile error? Runtime error?

#3 fractor   Members   -  Reputation: 804

Like
0Likes
Like

Posted 30 July 2011 - 11:34 PM

Hi! Let me explain a little better. I'm trying to open a .chm file through my application. For that I'm creating a new process. I am able to open the process and show the .chm file on the screen, no problems. However, I would like to move the .chm process window to another location than its default one. There is no compile error, or runtime error, the window just does not move.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS