Results 1 to 2 of 2

Thread: MagicLibrary Question..

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    Canton, GA
    Posts
    487

    Question MagicLibrary Question..

    I am putting a menu control on my form and using a collection to create the File Menu:

    mnuFile - &File

    Then when I select the Collections property under the mnuFile to add my submenu:

    mnuFileOpen - &Open
    mnuFileExit - &Exit

    I keep getting the following error:

    "Forms that are already visible cannot be displayed as a modal dialog. Set the forms visible property to false before calling ShowDialog."

    #1 where do i set the forms visible property to false?

    #2 Is that why I keep getting the error??

    Any help or suggestions?

    Thanks,

    Anjari

  2. #2
    Junior Member
    Join Date
    Jan 2003
    Location
    Seattle, WA
    Posts
    17
    I get that too, I think its a bug in the code, but I havent had time to look at the source or contact the developer about it.

    I'm just avoiding the problem by generating the control + menu items when the form is first loaded. Alot easyer to make changes too than with the property editor too.

    VB Code:
    1. Dim topMenu As Crownwood.Magic.Menus.MenuControl
    2. topMenu = New Crownwood.Magic.Menus.MenuControl()
    3. topMenu.MdiContainer = Me
    4. Dim MenuFile As MenuCommand = New MenuCommand("&File")
    5. Dim MenuFileOptions As MenuCommand = New MenuCommand("&Options...", ToolbarImgLst, 3, New EventHandler(AddressOf MenuFileOptions_Click))
    6. Dim MenuFileExit As MenuCommand = New MenuCommand("E&xit", Nothing, Nothing, New EventHandler(AddressOf MenuFileExit_Click))
    7. MenuFile.MenuCommands.AddRange(New MenuCommand() {MenuFileOptions, MenuFileExit})
    8. Me.Controls.Add(topMenu)

    For example.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width