Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
dan!sh 27-Sep-19 1:09
professional dan!sh 27-Sep-19 1:09 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
#realJSOP27-Sep-19 5:45
mve#realJSOP27-Sep-19 5:45 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661329-Sep-19 20:48
professionalsteve_949661329-Sep-19 20:48 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
dan!sh 29-Sep-19 23:04
professional dan!sh 29-Sep-19 23:04 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
#realJSOP30-Sep-19 1:11
mve#realJSOP30-Sep-19 1:11 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661330-Sep-19 1:44
professionalsteve_949661330-Sep-19 1:44 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
#realJSOP30-Sep-19 2:00
mve#realJSOP30-Sep-19 2:00 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661330-Sep-19 21:27
professionalsteve_949661330-Sep-19 21:27 
Thanks for the sample #realJSOP.

Actually I don't need to save the exact moment the form is closed.
This form is used to give the user the possibility to change the time and/or the date of the device (Windows CE based) on which the app is running and it is not used to change a variable used somewere else in the app.

So I declared an external static class and in this class I declared my form instance:

C#
public static class Cl_Forms
{
  public static FormDateTime Suc3 = new FormDateTime();
}

As you suggest, in this way the form shown in a modal way should be static and should not be disposed until the app is running.

Now I'm testing this solution.
Unfortunately the exception occurred rarely and randomly and it was not easy to reproduce it.
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
dan!sh 30-Sep-19 2:04
professional dan!sh 30-Sep-19 2:04 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661330-Sep-19 1:39
professionalsteve_949661330-Sep-19 1:39 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
#realJSOP30-Sep-19 2:02
mve#realJSOP30-Sep-19 2:02 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661330-Sep-19 2:30
professionalsteve_949661330-Sep-19 2:30 
AnswerRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
dan!sh 27-Sep-19 1:08
professional dan!sh 27-Sep-19 1:08 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661327-Sep-19 1:52
professionalsteve_949661327-Sep-19 1:52 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
dan!sh 29-Sep-19 23:02
professional dan!sh 29-Sep-19 23:02 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661330-Sep-19 2:18
professionalsteve_949661330-Sep-19 2:18 
QuestionHow to press a key with TranslateMessage Pin
Member 1305673426-Sep-19 1:42
Member 1305673426-Sep-19 1:42 
AnswerRe: How to press a key with TranslateMessage Pin
Richard Deeming26-Sep-19 2:02
mveRichard Deeming26-Sep-19 2:02 
GeneralRe: How to press a key with TranslateMessage Pin
Member 1305673426-Sep-19 2:10
Member 1305673426-Sep-19 2:10 
GeneralRe: How to press a key with TranslateMessage Pin
Richard Deeming26-Sep-19 2:14
mveRichard Deeming26-Sep-19 2:14 
AnswerRe: How to press a key with TranslateMessage Pin
OriginalGriff26-Sep-19 2:23
mveOriginalGriff26-Sep-19 2:23 
QuestionChanging many projects from AnyCPU to x64 Pin
Bernhard Hiller24-Sep-19 22:04
Bernhard Hiller24-Sep-19 22:04 
AnswerRe: Changing many projects from AnyCPU to x64 Pin
OriginalGriff24-Sep-19 22:29
mveOriginalGriff24-Sep-19 22:29 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
harold aptroot24-Sep-19 23:33
harold aptroot24-Sep-19 23:33 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
Bernhard Hiller25-Sep-19 0:11
Bernhard Hiller25-Sep-19 0:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.