Showing results 1 to 2 of 2

Thread: How to implement a Windows form in the zenon ProjectAddIn?

  1. #1
    Join Date
    23.11.2009
    Posts
    22

    Default How to implement a Windows form in the zenon ProjectAddIn?

    Good morning,
    how can I get an instance of Zenon project in a windows form that I want to show during runtime?

    I understand how to do it in the workspaceaddin but in the projectaddin?

    It's correct to replace:
    IApplication with IProject
    this.Application with this.Project?

    Thanks

  2. #2
    Join Date
    20.08.2009
    Posts
    293

    Default Re: How to implement a Windows form in the zenon ProjectAddIn?

    Hi,

    yes this should work like this:

    A short example from my side:

    In ThisProject.cs I've got the following code:

    public void MyFormSample()
            {
                Form1 myForm;
                try
                {
                    myForm= new Form1(this.Project);
                    myForm.Show();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error: " + ex.Message.ToString() + " " + ex.Source.ToString());
                }

    In the Form1.cs I have:

    ...
    public partial class Form1 : Form
    {
        zenOn.IProject myProject;
    ...
    
    }
    ...


    and

    ...
    public Form1(zenOn.IProject _myProject)
    {
                InitializeComponent();
                myProject = _myProject;
    }
    ...
    Last edited by bernhardf : 3rd August 2010 at 10:04

Similar Threads

  1. Replies: 3
    Last Post: 27th October 2011, 09:58
  2. ZenOn 6.20 on Windows 7
    By gralex in forum Editor and Runtime Setup
    Replies: 1
    Last Post: 31st May 2010, 11:58
  3. Replies: 0
    Last Post: 12th May 2010, 09:58
  4. NEC Builtin PC - for Zenon with Windows CE
    By rolindo in forum zenon Operator
    Replies: 7
    Last Post: 21st January 2010, 00:32
  5. Windows CE 6.0 and zenOn
    By sebastiank in forum zenon Operator
    Replies: 0
    Last Post: 19th September 2007, 07:49

Posting Rules

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