Hi,
I want to save the form position when the user close it. I tried to
place the coordinate saving code in my destructor, but it is not
triggered when I assign the form to null.
Where should I place my code to save the coord. when the form close?
Thanks
Marty 7 1952
Have you tried overriding Form.OnClosing ?
--
Adam Clauss
"Marty" <xm******@hotmail.com> wrote in message
news:9KSwe.115382$on1.12298@clgrps13... Hi,
I want to save the form position when the user close it. I tried to place the coordinate saving code in my destructor, but it is not triggered when I assign the form to null.
Where should I place my code to save the coord. when the form close?
Thanks Marty
Hi,
What about using Closing event ?
Where are you saving this info into?
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Marty" <xm******@hotmail.com> wrote in message
news:9KSwe.115382$on1.12298@clgrps13... Hi,
I want to save the form position when the user close it. I tried to place the coordinate saving code in my destructor, but it is not triggered when I assign the form to null.
Where should I place my code to save the coord. when the form close?
Thanks Marty
I want to save in the windows registry, I'll try in the closing event.
Thanks,
Marty
Ignacio Machin ( .NET/ C# MVP ) wrote: Hi,
What about using Closing event ?
Where are you saving this info into?
cheers,
I'll try that, thank you!
Marty
Adam Clauss wrote: Have you tried overriding Form.OnClosing ?
dig in the archives , this was handled before here.
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Marty" <xm******@hotmail.com> wrote in message
news:2YSwe.100371$9A2.72355@edtnps89... I want to save in the windows registry, I'll try in the closing event. Thanks, Marty
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,
What about using Closing event ?
Where are you saving this info into?
cheers,
..NET depends on garbage collector to destroy objects. Only when GC
decides to destroy the object that the destructor is called. That's why
you don't see your destructor being called immediately.
For what you need, you can either put the code in the Closed event or
in the Dispose method of the form.
Suriyanto
Thank you Suriyanto,
I finally used the OnClosing() event and it work.
Have a nice day!
Marty
Suriyanto Lee wrote: .NET depends on garbage collector to destroy objects. Only when GC decides to destroy the object that the destructor is called. That's why you don't see your destructor being called immediately.
For what you need, you can either put the code in the Closed event or in the Dispose method of the form.
Suriyanto This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mahesh Devjibhai Dhola [MVP] |
last post by:
Hi,
User can adjust the size of columns of a table or the position of splitter
in UI. We want these adjustments to be remembered when we restart the
application. Currently, we are saving these...
|
by: ojorus |
last post by:
Hi!
I just wonder how I can save a page's scroll position with javascript. (i'm
not a javascript developer) I have a PHP-page with two columns; the left
contains a lot of thumbnails, and the right...
|
by: Stuart McGraw |
last post by:
I haven't been able to figure this out and would
appreciate some help...
I have two tables, both with autonumber primary
keys, and linked in a conventional master-child
relationship. I've...
|
by: VS Noob |
last post by:
Hello. I'm developing Windows.Forms based applications,
and each will need per-user persistent data consisting of user
preferences, last form size/position, and the like. Is there a
standard or...
|
by: CodeRazor |
last post by:
I'm unfamiliar with image manipulation using c#.
How can i resize a jpg that currently exists in a file and save it resized
as a new file.
The examples i've found have been a bit misleading for...
|
by: Joe Thompson |
last post by:
Hi,
I am new to .net programming but am used to Borland C++ Builder (like Delphi). There are third party components available that you drop on a form and it will save the forms size, position,...
|
by: Luqman |
last post by:
I have created a form using Data Sources in VB.Net 2005, and Binding
Navigator, even I did not write a single line of code and data is
displaying, saving, deleting perfectly with the click of...
|
by: |
last post by:
Is there an automatic way to tell a windows to save its size
and position, or do I have to save these parameters to the
registry when the form quits and then reload them next time?
|
by: =?Utf-8?B?ZWdzZGFy?= |
last post by:
Hello, I'm trying to save data from textboxes that are connected to a
calendarextender and masketeditextender in my SQL db and it is doing it, the
problem is with the date and the money fields in...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |