moving form by holding mouse on picture
moving form by holding mouse on picture
moving form by holding mouse on picture
moving form by holding mouse on picture
moving form by holding mouse on picture
moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture
moving form by holding mouse on picture moving form by holding mouse on picture
moving form by holding mouse on picture
Go Back  Xtreme Visual Basic Talk > > > moving form by holding mouse on picture


Reply
 
Thread Tools Display Modes
  #1  
Old 12-23-2003, 11:45 PM
henszey's Avatar
henszey henszey is offline
Junior Contributor
 
Join Date: Aug 2002
Location: Nebraska, USA
Posts: 239
Default moving form by holding mouse on picture


I want to be able to hold the left button on the mouse down while over a picture and then move the mouse and have the form follow the mouse

i tried using PictureBox1_MouseDown and watching for when the mouse was moving, but i couldnt get it :S
__________________
Tiuq = Henszey
Henszey = Tiuq
Reply With Quote
  #2  
Old 12-24-2003, 01:14 AM
reboot's Avatar
rebootmoving form by holding mouse on picture reboot is offline
Keeper of foo

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Graceland
Posts: 15,614
Default

Are you using .Net?
Reply With Quote
  #3  
Old 12-24-2003, 04:33 AM
iamwaqas iamwaqas is offline
Freshman
 
Join Date: Dec 2003
Location: Pakistan
Posts: 34
Default

use "sendmessage" in API
__________________
....::: WaQas lal :::....
iamwaqas.cjb.net
computerssoft.cjb.net
Reply With Quote
  #4  
Old 12-24-2003, 07:12 AM
Machaira's Avatar
Machairamoving form by holding mouse on picture Machaira is offline
Jedi Coder

* Expert *
 
Join Date: Aug 2002
Location: Abingdon, MD
Posts: 3,438
Default

Why? Try:

Code:
Private m_x As Integer Private m_y As Integer Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown If e.Button = MouseButtons.Left Then m_x = e.X m_y = e.Y End If End Sub Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove If e.Button = MouseButtons.Left Then Me.Left = Me.Left + (e.X - m_x) Me.Top = Me.Top + (e.Y - m_y) End If End Sub
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
disable print preview from xlDialogPrint w_seyller Excel 9 12-11-2003 12:20 PM
Moving Form with Mouse jeremyrharris General 2 05-20-2003 01:43 PM
mouse down / mouse up xmen64 Interface and Graphics 5 10-09-2002 11:36 AM
Disable Mouse Scroll in Sub Form nickg96 Database and Reporting 16 10-04-2002 12:12 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
moving form by holding mouse on picture
moving form by holding mouse on picture
moving form by holding mouse on picture moving form by holding mouse on picture
moving form by holding mouse on picture
moving form by holding mouse on picture
moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture moving form by holding mouse on picture
moving form by holding mouse on picture
moving form by holding mouse on picture
 
moving form by holding mouse on picture
moving form by holding mouse on picture
 
-->