473,396 Members | 1,804 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,396 software developers and data experts.

how to 'remember' control location

Hi Guys,

Is there an easy way to save and reload a controls location somehow?

My controls are draggable and I am struggling to find a way to save the
controls 'last' location since the mouse was clocked.

Dec 4 '06 #1
3 1043
Marc,

Make a user control, make that serializable and serialize and deserialize it
than.

http://www.vb-tips.com/dbpages.aspx?...c-61641f5c8d9d

Cor

"Marc" <ma*********@hotmail.comschreef in bericht
news:11**********************@73g2000cwn.googlegro ups.com...
Hi Guys,

Is there an easy way to save and reload a controls location somehow?

My controls are draggable and I am struggling to find a way to save the
controls 'last' location since the mouse was clocked.

Dec 5 '06 #2
If your're using 2005, use the MY.namespace to store the property in the
config file after you completed a move. get the value from the config file
when you start a move. Haven't tried it but I think it would work.
HTH
Bob
"Marc" <ma*********@hotmail.comwrote in message
news:11**********************@73g2000cwn.googlegro ups.com...
Hi Guys,

Is there an easy way to save and reload a controls location somehow?

My controls are draggable and I am struggling to find a way to save the
controls 'last' location since the mouse was clocked.

Dec 5 '06 #3
You're right; he could save them to the Settings.

My.Settings.form1_button1_left or something like that.

You can save them as System.Drawing.Point, which is a
location-type variable.

Robin S.
-----------------------------------
"Robert Dufour" <bd*****@sgiims.comwrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
If your're using 2005, use the MY.namespace to store the property in the
config file after you completed a move. get the value from the config file
when you start a move. Haven't tried it but I think it would work.
HTH
Bob
"Marc" <ma*********@hotmail.comwrote in message
news:11**********************@73g2000cwn.googlegro ups.com...
>Hi Guys,

Is there an easy way to save and reload a controls location somehow?

My controls are draggable and I am struggling to find a way to save the
controls 'last' location since the mouse was clocked.


Dec 5 '06 #4

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

Similar topics

0
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. ...
2
by: David K. | last post by:
My question concerns C# Windows Forms user controls. I have created navigation user control. It gets the parent control's CurrencyManager to its bindable property. In the control, any change in...
6
by: Bruce | last post by:
I get this error on a line that references any control in the form_load sub: An unhandled exception of type 'System.NullReferenceException' occurred in BC785dProg1.exe Additional...
7
by: BradC | last post by:
(VB.NET 2002, Windows app). I'm going to be provided a two-letter string like "BV" or "TP" that represents a location. I then need to perform some actions on several form controls that have...
9
by: Charles Law | last post by:
I have a form on which user controls are placed at runtime. When a control is added to the form a handler is added for an event that a high-level object raises, which must be handled by the new...
4
by: gsb58 | last post by:
Hi! On a form I have a calendar. The form is rezised to 1024x768 (Don't worry - this is a training case) when loaded. Now I want to center the calendar on the form so that its edges are...
1
by: EricRybarczyk | last post by:
I am starting a rewrite of an existing Classic ASP web site in ASP.NET 2.0. The existing ASP application has several types of users, each with a separate login process (separate login page,...
9
by: timnels | last post by:
I have an issue where I have a user control that is launched into a floating form. At some point later, I allow the user to "unfloat" the user control by reparenting it on a split container in...
22
by: cj | last post by:
I was googling for a way to have my single form application start in the same location on the screen it was in when it was closed. I found this very short article: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...

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.