MDI - not MDI

Discussion in 'Questions (Windows Mobile)' started by Byak@, Jul 1, 2009.

  1. Byak@

    Byak@ Active Member Licensed User

    is it possible to make MDI form as normal form?
     
  2. agraham

    agraham Expert Licensed User

    Please explain what you mean :confused:
     
  3. Byak@

    Byak@ Active Member Licensed User

    for example i have MDIParent form named mainex (mainex.IsMDIparent=true) and MDIChild form f1ex (mainex.makeMDIchild(f1ex.controlref)).
    and now i want do f1ex not MDIchild.i have do f1ex as normal form.how?
    i'm try mainex.IsMDIparent=false:f1ex.show
    but have error (in russian)
     
  4. agraham

    agraham Expert Licensed User

    Try

    f1ex.IsMDIchild = false

    EDIT:- Forget that, it's read only. As we have a bit of heatwave here I am using my EeePC laptop on the summerhouse veranda in the garden and it doesn't have all the reference and help installed :( I'll look later on my main machine.
     
    Last edited: Jul 1, 2009
  5. Byak@

    Byak@ Active Member Licensed User

    Thanks Agraham,I'm wait =)
     
  6. agraham

    agraham Expert Licensed User

    A FormEx is made into an MDI child form by assigning a reference to the MDI parent to it's MdiParent property which is what FormEx.MakeMDIchild does.

    To make a FormEx that is an MDI child a normal form again you need to assign a null reference to its MdiParent property. Unfortunately this is not possible, even using the Door library because the Door library cannot handle null values :(.

    I do have a hugely enhanced Door library for my own use that can do this but I don't want to post it without consulting Erel as I have stolen the Door library source and merged it with my DoorEx library to make a Door library on steroids :). However here is a teeny-weeny library, with source for merging, that can set any property to null as follows. ObjN1 is an ObjectNull.

    Code:
    ObjN1.New1
       ObjN1.Value = FormEx2.ControlRef
       ObjN1.SetPropertyNull(
    "MdiParent")
    I have tested on an MDI child FormEx in FormExDemo program and it seems to work OK transforming the MDI child back to a normal FormEx
     

    Attached Files:

    Last edited: Jul 1, 2009
  7. Byak@

    Byak@ Active Member Licensed User

    big-big-big thanks Andrew!you are a great man! (sorry, i don't know this word in english)
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Exactly the same words I would have used to describe Andrew :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice