Click here to Skip to main content
14,360,959 members
   

C#

 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
lw@zi 27-Sep-19 2:09
professional lw@zi 27-Sep-19 2:09 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
#realJSOP27-Sep-19 6:45
mve#realJSOP27-Sep-19 6:45 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661329-Sep-19 21:48
professionalsteve_949661329-Sep-19 21:48 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
lw@zi 30-Sep-19 0:04
professional lw@zi 30-Sep-19 0:04 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
#realJSOP30-Sep-19 2:11
mve#realJSOP30-Sep-19 2:11 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661330-Sep-19 2:44
professionalsteve_949661330-Sep-19 2:44 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
#realJSOP30-Sep-19 3:00
mve#realJSOP30-Sep-19 3:00 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661330-Sep-19 22:27
professionalsteve_949661330-Sep-19 22: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:

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
lw@zi 30-Sep-19 3:04
professional lw@zi 30-Sep-19 3:04 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661330-Sep-19 2:39
professionalsteve_949661330-Sep-19 2:39 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
#realJSOP30-Sep-19 3:02
mve#realJSOP30-Sep-19 3:02 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661330-Sep-19 3:30
professionalsteve_949661330-Sep-19 3:30 
AnswerRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
lw@zi 27-Sep-19 2:08
professional lw@zi 27-Sep-19 2:08 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661327-Sep-19 2:52
professionalsteve_949661327-Sep-19 2:52 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
lw@zi 30-Sep-19 0:02
professional lw@zi 30-Sep-19 0:02 
GeneralRe: [VS2008 - Compact Framework] How to prevent a closed form from been disposed Pin
steve_949661330-Sep-19 3:18
professionalsteve_949661330-Sep-19 3:18 
QuestionHow to press a key with TranslateMessage Pin
Member 1305673426-Sep-19 2:42
memberMember 1305673426-Sep-19 2:42 
AnswerRe: How to press a key with TranslateMessage Pin
Richard Deeming26-Sep-19 3:02
mveRichard Deeming26-Sep-19 3:02 
GeneralRe: How to press a key with TranslateMessage Pin
Member 1305673426-Sep-19 3:10
memberMember 1305673426-Sep-19 3:10 
GeneralRe: How to press a key with TranslateMessage Pin
Richard Deeming26-Sep-19 3:14
mveRichard Deeming26-Sep-19 3:14 
AnswerRe: How to press a key with TranslateMessage Pin
OriginalGriff26-Sep-19 3:23
protectorOriginalGriff26-Sep-19 3:23 
QuestionChanging many projects from AnyCPU to x64 Pin
Bernhard Hiller24-Sep-19 23:04
memberBernhard Hiller24-Sep-19 23:04 
AnswerRe: Changing many projects from AnyCPU to x64 Pin
OriginalGriff24-Sep-19 23:29
protectorOriginalGriff24-Sep-19 23:29 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
harold aptroot25-Sep-19 0:33
memberharold aptroot25-Sep-19 0:33 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
Bernhard Hiller25-Sep-19 1:11
memberBernhard Hiller25-Sep-19 1: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.