We help IT Professionals succeed at work.

Save/load formsize/position when using multiple forms. Part3

Peter Kiers
Peter Kiers used Ask the Experts™
on
Hi,

A few days ago I have asked how to save and load the size and position when using
multiple forms.

I received a good solution from Idle_Mind. Only it contains an error:

690, 361 is not a valid value for Int32 at the line:

"sticky.Location = (Point)converter.ConvertFromString(Location);"

in the OpenSticky methode.

I have now made a little example. When you press on the toolbarbutton the StickyNotes form appears. When you put in the textbox lblTitle a title and in the rtbContent some text.
After pressing the ok-button the text will be written to the listview. The problem is when you doubleclick on the icon of the listview to display the StickyNotes-form again, then the error appears.

I hope now someone can find my bug in my little example.
I have even put a button on the toolbar to display the listview
in detail-view to actually see what is written to the columns.

Because I have difficulty to add my little example as attachment on EE.
I have put it on my own site:

http://members.home.nl/peterkiers/

On the right you see an icon with a tree in it. DoubleClick on it
an you will download my little example.

I hope someone can help me.

Greetings,

Peter Kiers
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
Commented:
The test project works perfectly on my system.  I added multiple notes and changed their sizes/locations.  When I double click the entries the notes are opened in the same size/location that they were last open in with no errors...   =\

I'm running VS2010 on Win 7 Pro x64.
Peter KiersOperator

Author

Commented:
Oke. thanks for testing.

Greetings, Peter Kiers