honeybee
Jul 28th, 2000, 06:30 AM
I think this is my first post on the API forum. Anyway.
I have a form with some controls like listbox, textbox etc. I want to allow the user to move the controls around the form anyway he likes. For this purpose, what I want to do is whenever the user right-clicks on a control, the control becomes moveable and I want to position the mouse pointer on the left-top corner of the control. For this I used SetCursorPos API, passing the Control.Left and Control.Right as parameters. It positions the cursor somewhere else, but it is outside the form. Is this position relative to the active form or the screen?
Also I used GetCursorPos API to track the position of the mouse pointer. It gives an error 'User defined type not defined'. What is wrong? I have pasted the declaration from the API viewer.
Thanks in advance for help/no help.
I have a form with some controls like listbox, textbox etc. I want to allow the user to move the controls around the form anyway he likes. For this purpose, what I want to do is whenever the user right-clicks on a control, the control becomes moveable and I want to position the mouse pointer on the left-top corner of the control. For this I used SetCursorPos API, passing the Control.Left and Control.Right as parameters. It positions the cursor somewhere else, but it is outside the form. Is this position relative to the active form or the screen?
Also I used GetCursorPos API to track the position of the mouse pointer. It gives an error 'User defined type not defined'. What is wrong? I have pasted the declaration from the API viewer.
Thanks in advance for help/no help.