hi every one, i'm new at this things in programing (visual basic 6.0).
And i was wondering if i can make an image grab or attach a label to move it around and place it in another place, with the use of an image, i've tried with the mouse drag/drop and works fine. thanks in advance =).
9 4161
hi every one, i'm new at this things in programing (visual basic 6.0).
And i was wondering if i can make an image grab or attach a label to move it around and place it in another place, with the use of an image, i've tried with the mouse drag/drop and works fine. thanks in advance =).
Hello, neit!
Are you hoping to move labels or snapshots at run time? If so, I am not certain, but it does not seem to be possible. Even though a programmer does not lock the controls, at run time, VB keep us from moving stuff around. That's what I think is happening.
If you are hoping to move labels or snapsots in design mode, just make sure your controls are not locked:
(1) Go to Format, with your form showing
(2) Choose Lock Controls
Note: If button is in Form is therefore locked.
Have fun and welcome!
Dököll
hi every one, i'm new at this things in programing (visual basic 6.0).
And i was wondering if i can make an image grab or attach a label to move it around and place it in another place, with the use of an image, i've tried with the mouse drag/drop and works fine. thanks in advance =).
I'm afraid it is not really clear just what you want to achieve, though it's obviously related to drag and drop. Please try to explain a little more clearly, for those of us who are a bit slow. :)
(Have you checked out the DragIcon property?)
This just in. I snooped around and found vbBeginDrag perhaps this can get you started. Starts up straight away though, perhaps you should look into DragIcon examples...
Hello, neit!
Are you hoping to move labels or snapshots at run time? If so, I am not certain, but it does not seem to be possible. Even though a programmer does not lock the controls, at run time, VB keep us from moving stuff around. That's what I think is happening.
If you are hoping to move labels or snapsots in design mode, just make sure your controls are not locked:
(1) Go to Format, with your form showing
(2) Choose Lock Controls
Note: If button is in Form is therefore locked.
Have fun and welcome!
Dököll
To move Label-control around a form with your mouse try this:
1. Put Label on a form.
2. Paste code below and run your project. -
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
If Button = vbLeftButton Then
-
Label1.Left = Label1.Left + X
-
Label1.Top = Label1.Top + Y
-
End If
-
End Sub
3. Try to move label with your mouse.
Good Luck.
I believe the original question was not so much about dragging, as the use (in some way) of an image.
I believe the original question was not so much about dragging, as the use (in some way) of an image.
The answer was not to original question..... :) DragIcon property is a correct answer.... LOL
The answer was not to original question..... :) DragIcon property is a correct answer.... LOL
Perhaps. We won't know whether it's the correct answer unless neit privdes us some feedback.
Hello, Earth to neit...
Thanks every one for your your replies, but as you know i am a piece of amateur in VB programing, thanks everyone =)
how can i insert an image, so you can see my proyect form? please tell me
The thing that i need, better i should say; the thing i want to do in my proyect is: with the use of an image to be able to "grab" a label, and place it in another label, so i can get the value of the label (right now i'm using "val()" ); i can drag/drop the label into another label by using the property "dragmode-->automatic" with the mouse and with the code -
'example
-
label4.caption=source
-
that way i can get the value of the other label, but because of my lack of knowledge i can't do it the way i want using an image as some kind of " human hand taking a box and place it somewhere else"
i hope you understand me O_o =( thanks everyone
Look how to do it in VB6. Just change Text1.DragIcon property to some *.ico file you like.
http://msdn2.microsoft.com/en-us/library/xz32ty04(VS.80).aspx
I am not sure thou if you can do the same with a label.
Label doesn’t have interactive interface and doesn’t have OleDropeMode Automatic.
To work around it you can make TextBox look like a label.
Try this: -
Private Sub Form_Load()
-
Text1.Appearance = 0
-
Text1.Locked = True
-
Text1.BorderStyle = 0
-
Text1.BackColor = Me.BackColor
-
Text1.TabStop = False
-
End Sub
-
-
-
-
Private Sub Text1_GotFocus()
-
Text2.SetFocus
-
End Sub
Good Luck.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: yihan |
last post by:
Hi,
I made a program to drag and drop the image using mouseevent, it only works
on IE well, not on Netscape. Does anyone has the example suitable for
Netscape? Please help. Thank you very much.
...
|
by: SamSpade |
last post by:
There seems to be two ways to put things on the clipboard ( I don't mean
different formats): SetClipboardData and OleSetClipboard
If I want to get data off the clipboard do I care how it was put...
|
by: Kevin L |
last post by:
I have a Panel control that I currently allow the user to drag and
reposition on a form at runtime.
This Panel control contains a Label control.
I would like to allow the user to drag the PANEL...
|
by: Brad |
last post by:
Okay, I am learning about Drag/Drop operations so I am green when it comes
to this.
I have a form that draws several optional labels that are single-bordered.
I also have a dozen colored labels...
|
by: pamelafluente |
last post by:
Hi,
I have a PictureBox on a form. I wish to drag the image exposed by the
PictureBox through the property "image" to a window of Windows
Explorer. The new file will have a name assigned by the...
|
by: Dawoodmm |
last post by:
Hi
i have a sight problem with detecting the mouse up in a drag-drop outside a form
what i have on my hands is an mdi form with 2 child forms: form1 and form2, both containing a label each. i also...
|
by: arvinds |
last post by:
I have an application in which I have 2 forms.
1.Review Form 2. FilmForm.
Review Form is used for Loading some images and we can transfer the
Images from Review From to FilmForm by Drag-Drop...
|
by: Jeff |
last post by:
Hello,
I am trying to drag and drop a label control from one cell in a
tablelayoutpanel to another (VB2005). There is no problem if both
cells are visible, but i cannot get the tablelayoutpanel...
|
by: GriffinWolf |
last post by:
Hi,
I am using VB6 for a school project. In my program, certain objects (currently Image boxes) need to be dragged to other areas of the screen. If they are placed over another image, they...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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...
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |