Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 18th, 2003, 08:09 AM
Authorized User
 
Join Date: Dec 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Resize controls at run time using mouse

How to resize a control using mouse at run time in vb 6.0?
 
Old December 19th, 2003, 02:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

At the MouseDown event, check if the mouse position is in a corner of the control. If yes save mouse coordinates and change the cursor to vbSize (or something like that).
Do the resizing in the MouseMove event, changing the size based on the current mouse coordinates minus the saved ones. Terminate the sizing in the MouseUp.

This should be enough to get you started.
Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
Control resize and positioning at run time. VB.Net TechNik .NET Framework 2.0 5 November 14th, 2008 09:00 AM
How to resize a control using mouse at run time in geetha VB How-To 1 November 6th, 2006 03:36 PM
Copying controls at run time aspadda Excel VBA 0 November 12th, 2003 01:07 PM
Adding controls at run-time !! kishore_peddi C# 0 October 13th, 2003 06:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.