Skip to main content
gamedev.net
🔒 Locked

[C++ NetFramework]Which Class?

Started by Illuminate Aug 26, 2006 at 10:51 AM 0 replies 500+ views
Original Post
Illuminate
Illuminate
When I hold left mouse button in a taskbar of a window and move the mouse, the whole windows moves. I want the same thing to happen when I hold the Lmouse button in the client area of the window (in this case is a form). Which class I must use to do this? I am using System::Windows::Forms::Form for creating a form.
______Excited of C++Keen on C++Love C++Bulgarian Pirate :)
JasonHise
JasonHise
You need on handle the mouse events on the form. On mouse down, record the current mouse position and current form position. On mouse move, if the left button is down, find the difference between the current mouse position and the initial mouse position, add it to the initial form location, and update the form to actually be at that location.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.