AVEVA Community
AVEVA Community
  • Site
  • User
  • Site
  • Search
  • User
PDMS/E3D Forum
  • AVEVA World
PDMS/E3D Forum
PDMS Quick Tips & Customizations C# Form Owner
  • Forums
  • Resources
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Replies 9 replies
  • Subscribers 3 subscribers
  • Views 91 views
  • Users 0 members are here
Options
  • Share
  • More
  • Cancel
Related

C# Form Owner

sivakumar
sivakumar over 9 years ago
 
  • Sign in to reply
  • Cancel

Top Replies

  • sivakumar
    sivakumar over 9 years ago +1
    hi, could anyone help me, how to set pdms main form (Application Window) as owner for windows form. im trying this, beacause every time it is hiding while clicking pdms window. also i tried…
  • sivakumar
    sivakumar over 9 years ago
    hi,

    could anyone help me, how to set pdms main form (Application Window) as owner for windows form.

    im trying this, beacause every time it is hiding while clicking pdms window.

    also i tried topmost = true, but itseems always topfront even in other applications.

    i need window forms like pml form...
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • sivakumar
    sivakumar over 9 years ago
    Dear experts,

    im still waiting for your suggestion, the below is my code, which i have created a simple windows form.





    namespace FINDREPLACE1
    {
       [PMLNetCallable()]
       public class PMLnetMain
       {


           [PMLNetCallable()]
           public PMLnetMain()
           {


           }


           [PMLNetCallable()]
           public void Assign(PMLnetMain that)
           {


           }


           [PMLNetCallable()]
           public void Start()
           {








               Form1 ttt = new Form1();


               ttt.Show();


           }








       }
    }
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • sivakumar
    sivakumar over 9 years ago
    how i can set PDMS application window as owner to windows form.

    also i dont need the form in addin.

    import 'TEST'
    handle (1000,0)
    endhandle
    using NameSpace '[COLOR=#333333]FINDREPLACE1[/COLOR]'
    !main = object PMLnetMain()
    !main.Start()

    The form is opens while the above commands run in pdms,

    when i closed the form again while trying exceptional error is coming..

    please suggest my errors
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ionut Matic
    Ionut Matic over 9 years ago
    Hi, I'm using "TOPMOST", but I read somewhere that it is possible to use messagebox-es as forms. You could give a try. Also, have you tried to create a new form class, inherited from default and add some 'topmost' feature, get the id of the parent window (in this case is the Aveva's main window) and create new form having Aveva as parent?
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ionut Matic
    Ionut Matic over 9 years ago
    Oh, did you remark that you window disappear only if your mouse pointer enters in model view (Aveva's graphical viewport)?!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • PRASHANT PRAKASH UPARKAR
    PRASHANT PRAKASH UPARKAR over 8 years ago
    Try user control form instead of windows form.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Colin Kovalev
    Colin Kovalev over 8 years ago
    [COLOR=#ff0000]using Aveva.ApplicationFramework.Presentation;[/COLOR][COLOR=#333333]

    Form1 ttt = new Form1();[/COLOR]


    [COLOR=#333333]ttt.Show([/COLOR][COLOR=#ff0000]WindowManager.MainForm[/COLOR][COLOR=#333333]);[/COLOR]
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • sivakumar
    sivakumar over 8 years ago
    thanks colin, i got  :)
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Satish
    Satish over 6 years ago
    Colin, its not working.

    I am using WPF form

    [COLOR=#FF0000]WindowManager.MainForm  --> its not compiling[/COLOR]

    [COLOR="silver"]- - - Updated - - -[/COLOR]

    thanks colin, i got  :)


    Have you got solution?
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel