Click here to Skip to main content
16,005,437 members
Home / Discussions / C#
   

C#

 
GeneralRe: AccessViolationException when using the qapuiek.dll Pin
Luc Pattyn20-May-09 6:42
sitebuilderLuc Pattyn20-May-09 6:42 
QuestionWindows service apps Pin
saeidfarahi20-May-09 3:11
saeidfarahi20-May-09 3:11 
AnswerRe: Windows service apps Pin
PIEBALDconsult20-May-09 3:25
mvePIEBALDconsult20-May-09 3:25 
QuestionRemoving AutoIncrement from Access database column Pin
Eduard Keilholz20-May-09 2:51
Eduard Keilholz20-May-09 2:51 
Questionfroms in MDI Pin
sachees12320-May-09 2:42
sachees12320-May-09 2:42 
AnswerRe: froms in MDI Pin
musefan20-May-09 2:48
musefan20-May-09 2:48 
GeneralRe: froms in MDI Pin
sachees12320-May-09 3:17
sachees12320-May-09 3:17 
AnswerRe: froms in MDI [modified] Pin
musefan20-May-09 3:24
musefan20-May-09 3:24 
OK so you are basically saying that you only want one child form open at a time?

Well when you open a child form, you need to keep a reference to it somewhere, like in you main form you have a global variable like...

Form openForm;


... then when you open a new child form (by clicking one of the links) then you test to see if one is open already, close it if so, then open the new child form like so...


void ButtonClick(object sender, EventArgs e)
{
  if(!(openForm == null || openForm.IsDisposed))
  {
     openForm.Close();
  }
  openForm = newChildForm();
  openForm.Show();
}


Life goes very fast. Tomorrow, today is already yesterday.

modified on Thursday, May 21, 2009 5:54 AM

GeneralRe: froms in MDI Pin
sachees12320-May-09 23:45
sachees12320-May-09 23:45 
QuestionWhy Printing events not fired Pin
svt gdwl20-May-09 2:32
svt gdwl20-May-09 2:32 
AnswerRe: Why Printing events not fired Pin
Manas Bhardwaj20-May-09 2:38
professionalManas Bhardwaj20-May-09 2:38 
AnswerRe: Why Printing events not fired Pin
musefan20-May-09 2:52
musefan20-May-09 2:52 
GeneralRe: Why Printing events not fired Pin
svt gdwl20-May-09 3:04
svt gdwl20-May-09 3:04 
GeneralRe: Why Printing events not fired Pin
harold aptroot20-May-09 3:09
harold aptroot20-May-09 3:09 
GeneralRe: Why Printing events not fired Pin
musefan20-May-09 3:12
musefan20-May-09 3:12 
QuestionRegex for MM/YYYY date format Pin
Mninawa20-May-09 2:11
Mninawa20-May-09 2:11 
AnswerRe: Regex for MM/YYYY date format Pin
Michael Bookatz20-May-09 2:17
Michael Bookatz20-May-09 2:17 
GeneralRe: Regex for MM/YYYY date format Pin
Nagy Vilmos20-May-09 2:32
professionalNagy Vilmos20-May-09 2:32 
GeneralRe: Regex for MM/YYYY date format Pin
Michael Bookatz20-May-09 2:37
Michael Bookatz20-May-09 2:37 
GeneralRe: Regex for MM/YYYY date format Pin
Nagy Vilmos20-May-09 3:01
professionalNagy Vilmos20-May-09 3:01 
AnswerRe: Regex for MM/YYYY date format Pin
musefan20-May-09 2:35
musefan20-May-09 2:35 
AnswerRe: Regex for MM/YYYY date format Pin
PauloCastilho20-May-09 4:39
PauloCastilho20-May-09 4:39 
GeneralRe: Regex for MM/YYYY date format Pin
Mninawa20-May-09 20:16
Mninawa20-May-09 20:16 
GeneralRe: Regex for MM/YYYY date format Pin
deepakaitr123455-Jul-13 3:44
deepakaitr123455-Jul-13 3:44 
AnswerRe: Regex for MM/YYYY date format Pin
Pete O'Hanlon20-May-09 4:52
mvePete O'Hanlon20-May-09 4:52 

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.