Click here to Skip to main content
15,894,362 members
Home / Discussions / C#
   

C#

 
QuestionBiometric Standards Pin
Adriaan Davel7-Jan-10 21:00
Adriaan Davel7-Jan-10 21:00 
AnswerRe: Biometric Standards Pin
Jimmanuel8-Jan-10 5:15
Jimmanuel8-Jan-10 5:15 
GeneralRe: Biometric Standards Pin
Adriaan Davel10-Jan-10 19:12
Adriaan Davel10-Jan-10 19:12 
GeneralRe: Biometric Standards Pin
Jimmanuel11-Jan-10 2:58
Jimmanuel11-Jan-10 2:58 
GeneralRe: Biometric Standards Pin
Adriaan Davel11-Jan-10 20:31
Adriaan Davel11-Jan-10 20:31 
Questionhow can i release objects....... Pin
koolprasad20037-Jan-10 20:23
professionalkoolprasad20037-Jan-10 20:23 
AnswerRe: how can i release objects....... Pin
Roger Wright7-Jan-10 20:55
professionalRoger Wright7-Jan-10 20:55 
GeneralRe: how can i release objects....... Pin
Luc Pattyn8-Jan-10 2:02
sitebuilderLuc Pattyn8-Jan-10 2:02 
Hi Roger,

if your app keeps a reference to a hidden Form, the Form stays alive, and you can use myForm.Show() to show it again. That is normal. And your app always keeps such reference, see Application.OpenForms, unless you either call Close() or Dispose() on said Form.

Here is some test code to confirm that:
public override void Test(int arg) {
    using (Form f=new Form()) {
        f.Text="my latest form";
        f.Show();
        listForms("Form shown");
        f.Hide();
        listForms("Form hidden");
        // f.Close();                     // optional
        // listForms("Form closed");      //
    }
    GC.Collect();
    listForms("Collected");
}

private void listForms(string title) {
    log("List of forms: "+title);
    int i=0;
    foreach (Form f in Application.OpenForms) {
        log("    Form "+i+" text="+f.Text);
        i++;
    }
    log("Found "+i+" forms");
}


Smile | :)

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

Happy New Year to all.
We hope 2010 soon brings us automatic PRE tags!
Until then, please insert them manually.


GeneralRe: how can i release objects....... Pin
Roger Wright8-Jan-10 12:48
professionalRoger Wright8-Jan-10 12:48 
GeneralRe: how can i release objects....... Pin
Luc Pattyn8-Jan-10 13:09
sitebuilderLuc Pattyn8-Jan-10 13:09 
AnswerRe: how can i release objects....... Pin
dojohansen8-Jan-10 0:21
dojohansen8-Jan-10 0:21 
AnswerRe: how can i release objects....... Pin
Adriaan Davel11-Jan-10 20:46
Adriaan Davel11-Jan-10 20:46 
QuestionAccessing Exchange Server Pin
satsumatable7-Jan-10 20:13
satsumatable7-Jan-10 20:13 
Questionbutton click event Pin
anishkannan7-Jan-10 19:33
anishkannan7-Jan-10 19:33 
AnswerRe: button click event Pin
kpeter67-Jan-10 21:12
kpeter67-Jan-10 21:12 
AnswerRe: button click event Pin
OriginalGriff7-Jan-10 22:25
mveOriginalGriff7-Jan-10 22:25 
GeneralRe: button click event Pin
dojohansen8-Jan-10 0:35
dojohansen8-Jan-10 0:35 
GeneralRe: button click event Pin
OriginalGriff8-Jan-10 0:41
mveOriginalGriff8-Jan-10 0:41 
GeneralRe: button click event Pin
Luc Pattyn8-Jan-10 2:09
sitebuilderLuc Pattyn8-Jan-10 2:09 
Questionall form problem? [modified] Pin
miss YY7-Jan-10 19:27
miss YY7-Jan-10 19:27 
AnswerRe: all form problem? Pin
OriginalGriff7-Jan-10 22:32
mveOriginalGriff7-Jan-10 22:32 
QuestionHow to get The Url in the browser's address bar by c#(winform) [modified] Pin
SrhLj7-Jan-10 18:24
SrhLj7-Jan-10 18:24 
AnswerRe: How to get IE address by c#(winform) Pin
Dimitri Witkowski7-Jan-10 19:07
Dimitri Witkowski7-Jan-10 19:07 
GeneralRe: How to get IE address by c#(winform) Pin
SrhLj7-Jan-10 20:25
SrhLj7-Jan-10 20:25 
AnswerRe: How to get The Url in the browser's address bar by c#(winform) Pin
SrhLj7-Jan-10 21:49
SrhLj7-Jan-10 21:49 

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.