Showing results 1 to 2 of 2

Thread: Openig popup in specify place on screen via VBA

  1. #1
    maro80 Gast

    Default Openig popup in specify place on screen via VBA

    Hello,

    Is there an easy way in VBA to open popup (template picture in specyfy window location)

    I have a same 20 valves on main screen in different places.
    When I click on the valve symbol, there is a popup display which shows some informations, open command, close command, status etc. I would like to have this popup be displayed in the same distance from each valve symbol.

    For example if
    ValveSymbol 1 is on screen at StartPoint X = 500 , Y = 600, I would like to have a popup opened at StartPoint X = 550, Y = 650.
    ValveSymbo 2 is on screen resolution StartPoint X = 100 , Y = 50, popup should automaticaly opened at X = 150, Y = 50,

    Another words it is need for popup to be displayed by offset 50 + starting valve symbol position.

    Is it possible to made it in via VBA script?

    Thanks for answer
    Maro

  2. #2
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Openig popup in specify place on screen via VBA

    Using standard functionalities of zenOn 6.22 you can configure at the template (which is used for the popup picture) at which position the popup should be opened:

    embedded help:
    This property allows the relative positioning of pictures. When loading a picture, it can be positioned relative to the current position of the mouse cursor.
    use absolute position: The pictures of the template are opened as defined in the position of the template.
    left: The left margin of the picture is set to the current position of the mouse cursor.
    right: The right margin of the picture is set to the current position of the mouse cursor.
    top: The top margin of the picture is set to the current position of the mouse cursor.
    bottom: The bottom margin of the picture is set to the current position of the mouse cursor.
    centered: The center of the picture is set to the current position of the mouse cursor.
    left top: The top left corner of the picture is set to the current position of the mouse cursor.
    left bottom: The bottom left corner of the picture is set to the current position of the mouse cursor.
    right top: The top right corner of the picture is set to the current position of the mouse cursor.
    right bottom: The bottom right corner of the picture is set to the current position of the mouse cursor.

    ATTENTION: For automatic loading of pictures, the absolute position is always used, because in this case, there is no information available for relative positioning.



    With zenOn versions < 6.22 it is possible to do this via VBA.

    Please let us refer to the VBA Help documentation which can be downloaded from the Copa-Data forums: http://www.copadata.com/forums/showthread.php?t=37
    At this VBA Help documentation choose "DynPicture" and at the very bottom of this page you will find a VBA example about this.

    Be aware that giving an offset in pixel within VBA can not be directly be done. VBA itself calculates in so called twips.
    Such a calculation can be found in following thread within the Copa-Data forum: http://www.copadata.com/forums/showthread.php?t=212

    Regards,
    Herbert

Similar Threads

  1. Replies: 2
    Last Post: 17th December 2008, 09:09
  2. Installation on Touch Screen using DOM
    By tauhien in forum Editor and Runtime Setup
    Replies: 2
    Last Post: 26th September 2008, 02:56
  3. Screen resolution
    By stephanepilon in forum zenon Supervisor
    Replies: 6
    Last Post: 16th May 2008, 15:49
  4. screen template
    By stephanepilon in forum zenon Supervisor
    Replies: 6
    Last Post: 24th April 2008, 08:00
  5. Monitor administration and screen resolution
    By markclemens in forum zenon Supervisor
    Replies: 0
    Last Post: 14th September 2007, 07:13

Posting Rules

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