473,402 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

(moving objects in a form) - reloaded

hello i try to add this code to (mouse down) event of a picturebox1:

picturebox1.location = new point(e.x,e.y)

but i doesnt work, because the picture box sets its location to the mouse
cursors position on the screen, not the position inside the form... how can
ido that? how can i move the picturebox in a form by holding down the left
mouse button and move it and then after release the mouse button?? like
drag&drop but i dnot want to move a data, i want to move a picturebox???
Nov 15 '05 #1
1 1460
You try using ScreenToClient method?

Nick Harris, MCP, CNA, MCSD
Director of Software Services
http://www.VizSoft.net
"Serdar C." <se*****@interaktif.gen.tr> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
hello i try to add this code to (mouse down) event of a picturebox1:

picturebox1.location = new point(e.x,e.y)

but i doesnt work, because the picture box sets its location to the mouse
cursors position on the screen, not the position inside the form... how can ido that? how can i move the picturebox in a form by holding down the left
mouse button and move it and then after release the mouse button?? like
drag&drop but i dnot want to move a data, i want to move a picturebox???

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: A.Kelly | last post by:
Two problems that I'm having (due to being a n00bie) are: The form I'm using is the basic form with a username, email address etc.. the two that I'm most concerned about are the Gender, and...
9
by: F. Da Costa | last post by:
Hi, Does anybody know why IE5+ does *not* honour array objects (like a table) across a session? Example: Frame A contains a var tableVar which is set via form Frame B (on init) using...
2
by: Daniel | last post by:
Hi I have a datagrid on a web form and when a user double clicks on an item they are redirected to a details form. When they click on a link on the details form to return to the original form...
2
by: Shapper | last post by:
Hello, I have in my page a few Asp:ImageButtons and a few Asp:Panels. When a button is pressed the function Show_Hide is called and a panel visibility is set to true or false. The problem...
2
by: Diogo Alves - Software Developer | last post by:
Greetings I would like to knowhow can I put a sliding panel... I've done this: if (panel1.Width < 300) { while (panel1.Width < 300) { panel1.Width = panel1.Width + 40;
2
by: (PeteCresswell) | last post by:
I've got a form that has a TreeView in the upper part of the form and a TabControl in the lower. When processing a Resize event, the TabControl does not need tb resized - just moved so that the...
1
by: windandwaves | last post by:
Hi Gurus, I want to get a new xml datasheet when a user submits a form, rather than reloading the page with the new xml sheet hardwired into it. I have no idea how to do this. Can you give me...
1
by: Wagz | last post by:
Hi, I'm trying to save the state of a form in VB 2005 to a file so that the next time the program starts up the form will be reloaded to it's last state. I did a bit of searching and it seemed...
4
by: szimek | last post by:
Hi, I've already posted an email with this problem, but this time I think I got a bit more info. The app I'm currently working on works like this: when user clicks on a clickable element, it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.