Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. MDI problem

MDI problem

Scheduled Pinned Locked Moved Visual Basic
helpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • A Anonymous

      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

      J Offline
      J Offline
      jimpar
      wrote on last edited by
      #2

      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

      J 1 Reply Last reply
      0
      • J jimpar

        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

        J Offline
        J Offline
        JensB
        wrote on last edited by
        #3

        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

        G 1 Reply Last reply
        0
        • J JensB

          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

          G Offline
          G Offline
          gpa2000
          wrote on last edited by
          #4

          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

          A 1 Reply Last reply
          0
          • G gpa2000

            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

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups