473,394 Members | 1,867 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,394 software developers and data experts.

Draging Images or Controls...

Ali Rizwan
925 512MB
Hi all,
I have a small problem. How can i drag controls in a form?
I want to do same as in explorer that we can drag any icon or folder anywhere in the window..

Thanx
>> ALI <<
May 9 '08 #1
6 1151
lotus18
866 512MB
Hi Ali

What kind of control? How about Drag and Drop Method?

Rey Sean
May 10 '08 #2
Ali Rizwan
925 512MB
Hi Ali

What kind of control? How about Drag and Drop Method?

Rey Sean
Thanx for replying.
As you have experienced on your desktop that you can drag any icon any where on the desktop. I want to do same as that but with my image controls and label controls.

Thanx
>> ALI <<
May 10 '08 #3
daniel aristidou
491 256MB
Thanx for replying.
As you have experienced on your desktop that you can drag any icon any where on the desktop. I want to do same as that but with my image controls and label controls.

Thanx
>> ALI <<
hi ali....is this in vb6?
Jun 2 '08 #4
jamesd0142
469 256MB
Its messy but here what i did for something simular...

to move a label:
1. add a timer to your form (intervals 10)
2. on the label mouse down event, start timer
3. on the mouse up event stop timer.

Timer code: (something like):
label1.top = mouse position x
label1.left = mouse position y

I can remember exaclty how the code went, but im sure you get my idea?

edit: i found this which should help Windows.Forms.Cursor.Position.Y (vb2005)

James
Jun 2 '08 #5
Ali Rizwan
925 512MB
hi ali....is this in vb6?
Yes this is in vb6.

Thanx
>> ALI <<
Jun 3 '08 #6
Ali Rizwan
925 512MB
Its messy but here what i did for something simular...

to move a label:
1. add a timer to your form (intervals 10)
2. on the label mouse down event, start timer
3. on the mouse up event stop timer.

Timer code: (something like):
label1.top = mouse position x
label1.left = mouse position y

I can remember exaclty how the code went, but im sure you get my idea?

edit: i found this which should help Windows.Forms.Cursor.Position.Y (vb2005)

James
Ok
By the way i have made my code for dragging. That was not different than yours but in vb6 nstead of mouse position.... i write x and y only.

Thanx
>> ALI <<
Jun 3 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Jason | last post by:
Hi, I wish to create a little game where you drag pieces onto a board. I have been playing around with a picture box: Private Sub Picture1_DblClick() Picture1.Left = Picture1.Left + 50 End...
4
by: Kevin Myers | last post by:
Hello, Please forgive my reposting of this note with hopefully a more relevant subject line. On an Access 2000 form under Windows 2000 I would like to use a Kodak Image Edit Control to...
2
by: Curtis Wellborn | last post by:
Hey, I have come into a bit of a problem. When Flatsyle is on system it will not show my images that i have set in image list or just in image. Also somethings i have found online do not work...
13
by: moondaddy | last post by:
Happy Holidays All! I want to load a datagrid with images and text (Image, text, image, text, etc...). The data for this datagrid will be coming from sql server and the images are stored as files...
2
by: David | last post by:
I am creating a control (an image) on the server and Adding it to a Panel's Controls collection. On the client side I want to drag the control to a new location using the ondrag event to modify the...
1
by: John | last post by:
I am using the ItemDataBound event on the datagrid to place relevant images in the grid. However, when I press any button on the form which fires a postback the state of the grid is kept but the...
12
by: John Kotuby | last post by:
Hi all, Maybe this is a simple problem found in ASP.NET 2.0 course 101, but I must have missed it. When I create a page in Visual Web Developer and use URLs like "/images/picture.gif " or a link...
1
by: blueheelers | last post by:
I have been researching for several hours on the best way to display images in continous forms in Access 2003. For example, I want to display employee name, email, phone, and picture for each...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.