|
-
Nov 15th, 2005, 12:33 PM
#1
Thread Starter
Hyperactive Member
Is it possible to drag a line control at runtime?
Hi,
Is it possible to drag a line control at runtime similar to picturebox or image? If it is possible then what can be an appropriate strategy? As far as I know, Line control does not have any intrinsic Mouse events in it (Mouse Down/Move/Up etc.) Is it possible to simulate the mouse events with user defined functions in order to implement the drag and drop a Line Control?
-
Nov 15th, 2005, 12:44 PM
#2
Re: Is it possible to drag a line control at runtime?
Yeah, by not using a Line Control at all. You oughta try drawing a line on the UserForm, and using the forms mouse events for that. Of course you are gonna need a Timer or a loop to clear the window, draw, and repeat.
-
Nov 15th, 2005, 03:02 PM
#3
Re: Is it possible to drag a line control at runtime?
How about placing a picture of the line in a Image Control, setting its BoarderStyle to none, and using the Image Controls Events.
-
Nov 15th, 2005, 05:32 PM
#4
Re: Is it possible to drag a line control at runtime?
You can use a label resized to the height of the line thickness you want then size the width to the length you need. Set its backcolor your desired color. Using the Label control to replicate a line will give you the mouse events you need to move it around.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|