Change Frame Size

Change Frame Size

I am trying to dynamically change the frame size in my SCADA project. One of the solutions I attempted is using an add-in with the following code:
  1. namespace AddInProjectService1
  2. {
  3.     /// <summary>
  4.     /// Description of Project Service Extension.
  5.     /// </summary>
  6.     [AddInExtension("Your Project Service Extension Name", "Your Project Service Extension Description", DefaultStartMode = DefaultStartupModes.Auto)]
  7.     public class ProjectServiceExtension : IProjectServiceExtension
  8.     {
  9.         #region IProjectServiceExtension implementation

  10.         public void Start(IProject context, IBehavior behavior)
  11.         {
  12.             // enter your code which should be executed when starting the service for the SCADA Service Engine
  13.             var frame = context.FrameCollection["Overview"];

  14.             if (frame != null)
  15.             {
  16.                 frame.Width = 3840; // before is 1920
  17.                 frame.Save();
  18.             }
  19.         }

  20.         public void Stop()
  21.         {
  22.             // enter your code which should be executed when stopping the service for the SCADA Service Engine
  23.         }

  24.         #endregion
  25.     }
  26. }

However, the frame width does not change when running the project. Do you have a better approach for dynamically modifying the frame size? Or is there an alternative solution to achieve this?

Looking forward to your guidance.

    Disclaimer

    This document governs the use of our Community Forum. By registering and using the platform, you accept these conditions.

    The COPA-DATA Community Forum serves to encourage the exchange of information and experience about the zenon software between forum users respectively zenon users.

    Please mind that any published information on the Community Forum is the subjective opinion and view based on the experience and the level of knowledge of the author. COPA-DATA does not overtake any responsibility for the content and the accuracy of the shared information.

    Users of the Community Forum are encouraged to share only well-founded experiences and to point out any risks associated with the implementation of proposed solutions to problems. COPA-DATA at its absolute discretion, reserves the right to moderate the forum. In this connection COPA-DATA may remove any information containing false facts, potentially dangerous solutions, bad language or content that may insult, degrade or discriminate others. COPA-DATA may block a non-complying user from forum access if the user violated this provision.

    COPA-DATA reserves the right to change this document from time to time at own discretion.


    Ing. Punzenberger COPA-DATA GmbH
    Karolingerstraße 7b · 5020 Salzburg · Austria
    www.copadata.com