473,402 Members | 2,050 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,402 software developers and data experts.

Snap Control to grid

Hi,

Anyone know how I can have my drag and drop form controls 'snap' to a
grid like in windows desktop?

Nov 25 '06 #1
1 2306
Divide your window (or whatever you are dragging the controls to) up into a
grid based on the size of grid elements and store these in an array (either
two dimensional or use a structure). When the user drops the control onto
your window, determine the x,y nearest in your grid to where the control is
dropped then change the location of the control to that x,y.
--
Dennis in Houston
"Marc" wrote:
Hi,

Anyone know how I can have my drag and drop form controls 'snap' to a
grid like in windows desktop?

Nov 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Norm | last post by:
Does anyone know a fix to this problem? In the Windows Form Designer, I have set my snap-to grid setting to false. However, the controls on the form still snap to the grid. I have tried setting...
2
by: Rhonda | last post by:
Using AccessXP I have lost snap to grid on my system. New or existing databases do not snap to grid for forms and reports in design view. Anyone have an idea on how to get it back?? Thanks. ...
6
by: MLH | last post by:
You know, snap to grid when dragging a new command button or other object? If you used autocad (command line DOS) YOU know exactly what I mean. I want to size my objects - not be forced to snap...
1
by: Rob Richardson | last post by:
Greetings! I see from the group archives that a lot of people don't like how Snap to Grid works when placing controls on forms. I am now among that number. When I had the Windows Forms Designer...
2
by: SStory | last post by:
I have a picture that I allow the user to move around and would like to offer grid support like VB and other apps so that it will snap to the nearest point. How can I offer grid support so that...
1
by: Sam | last post by:
Hi guys I'm writing a small drawing program which has "snap to grid" mode and I want to display something (some kind of shapes for example a small square or circle which indicate the current...
1
by: Marc Gravell | last post by:
For a bespoke control, how can I implement my own designer snap lines in VS2005? I remember finding an MS article once, but I now can't re-locate it. Basically, I have a custom-control that...
0
by: Brian Henry | last post by:
Ok I've never implemented a snap location before so I dont really know what im doing wrong here... anyways, I am making a custom slider control that takes dates as its values instead of integers......
4
by: MangroveRoot | last post by:
A few years ago, I worked on a project in which I designed some tables, queries, forms, and reports. I'm reasonably certain that when I was designing the forms for that project, I set the...
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?
0
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...
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
agi2029
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,...
0
isladogs
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...

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.