Home All Groups Group Topic Archive Search About

how to 'remember' control location

Author
4 Dec 2006 10:03 PM
Marc
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.

Author
5 Dec 2006 5:14 AM
Cor Ligthert [MVP]
Marc,

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

http://www.vb-tips.com/dbpages.aspx?ID=7ffd296f-9e81-47e6-88dc-61641f5c8d9d

Cor

Show quoteHide quote
"Marc" <marc_cro***@hotmail.com> schreef in bericht
news:1165269785.717031.145780@73g2000cwn.googlegroups.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.
>
Author
5 Dec 2006 4:01 PM
Robert Dufour
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
Show quoteHide quote
"Marc" <marc_cro***@hotmail.com> wrote in message
news:1165269785.717031.145780@73g2000cwn.googlegroups.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.
>
Author
5 Dec 2006 7:14 PM
RobinS
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.
-----------------------------------
Show quoteHide quote
"Robert Dufour" <bduf***@sgiims.com> wrote in message
news:%230h$ibIGHHA.536@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" <marc_cro***@hotmail.com> wrote in message
> news:1165269785.717031.145780@73g2000cwn.googlegroups.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.
>>
>
>