MDI problem
-
Hi I have a MDI form where i want to display a mdi child. but i want this child to behave like 'modal()' so the user can't get out the form when it is not completed correctly. When i import a dialog in the project and form.show it after pressing a menu item in the mdi parent ... then the dialog is only shown when i minimize the mdi parent. What's the problem here? :s And another little thing I dont' seem to find a method for deleting an entry in a listview. You guys can help? Greetings Jens
-
Hi I have a MDI form where i want to display a mdi child. but i want this child to behave like 'modal()' so the user can't get out the form when it is not completed correctly. When i import a dialog in the project and form.show it after pressing a menu item in the mdi parent ... then the dialog is only shown when i minimize the mdi parent. What's the problem here? :s And another little thing I dont' seem to find a method for deleting an entry in a listview. You guys can help? Greetings Jens
Remove listitem: ListView1.ListItems.Remove(lngI) As for the form: The QueryUnload event has a second parameter called UnloadMode. By testing this mode, the program will know what is causing the form to unload. Then you can decide what you want to do, etc These are the constants and a brief explanation: Select Case UnloadMode Case vbFormControlMenu 'The "X" button or the "Close" menu 'from the form's System menu. Case vbFormCode 'The Unload statement is called from code. Case vbAppWindows 'Windows is shutting down. Case vbAppTaskManager 'The Task Manager is closing the app. Case vbFormMDIForm 'The form is an MDI child and the 'MDI form is closing. Case vbFormOwner 'The form is closing because its 'owner is closing. End Select "Since we don't know where we're going, we have to stick together in case someone gets there." - Ken Kesey 1935 - 2001
-
Remove listitem: ListView1.ListItems.Remove(lngI) As for the form: The QueryUnload event has a second parameter called UnloadMode. By testing this mode, the program will know what is causing the form to unload. Then you can decide what you want to do, etc These are the constants and a brief explanation: Select Case UnloadMode Case vbFormControlMenu 'The "X" button or the "Close" menu 'from the form's System menu. Case vbFormCode 'The Unload statement is called from code. Case vbAppWindows 'Windows is shutting down. Case vbAppTaskManager 'The Task Manager is closing the app. Case vbFormMDIForm 'The form is an MDI child and the 'MDI form is closing. Case vbFormOwner 'The form is closing because its 'owner is closing. End Select "Since we don't know where we're going, we have to stick together in case someone gets there." - Ken Kesey 1935 - 2001
Hi Thanks for the reply. About the form i really meant ... When i want to show a form within an MDI parent (the form has property MDI child: false)... Then that form is not shown within the MDI but apart. I want to be able to show the form nice in the MDI parent without making it MDI child. Because i want to be able to 'DoModal()' the form. I hope you understand my problem :x Greetings Jens
-
Hi Thanks for the reply. About the form i really meant ... When i want to show a form within an MDI parent (the form has property MDI child: false)... Then that form is not shown within the MDI but apart. I want to be able to show the form nice in the MDI parent without making it MDI child. Because i want to be able to 'DoModal()' the form. I hope you understand my problem :x Greetings Jens
You can solve this problem programmatically using the mouseover event. When the mouse escapes the form: put it back on the form. As for the form itself, when you move the non MDI form reset the left and top properties to keep the non mdi form within the MDI form. Hope this helps. Grtz Guus
-
You can solve this problem programmatically using the mouseover event. When the mouse escapes the form: put it back on the form. As for the form itself, when you move the non MDI form reset the left and top properties to keep the non mdi form within the MDI form. Hope this helps. Grtz Guus
Well, i don't move the form myself ... I just show the form that has to be displayed within the MDI parent itself. So it has to behave like an MDI child but it needs to be displayed modally. I'll explain situation. I have a menu in the MDI parent .. When i click a menu option .. i want a form to display that is not mdi child. So the form is not shown within the mdi child, but minimised. Because i don't know well what you meant Greetings Jens