Showing results 1 to 6 of 6

Thread: Freeze Notepad (text screen) in Runtime

  1. #1

    Default Freeze Notepad (text screen) in Runtime

    Hello,

    I need a notepad screen (like sticky note) in Runtime, where I can put some text. After I have written a text I want to drag that sticky note somewhere in the monitor's screen. Then I want to press a save button and then this screen will be frozen in that place. The operator's name and a saving date of the text should be written in the screen too automatically. No one can change the possition of this notepad screen in the display. It can be done only with log on with the exact administration level.

    Thank you for your help in advance.

    Dario

  2. #2

    Default Re: Freeze Notepad (text screen) in Runtime

    Hi Dario,

    You've set yourself a nice challenge there
    I think it could be done quite nicely, however it would require some VSTA / VBA coding.

    For a start, you could look at the example in the COPA-DATA blog how to move screens without a title bar using VSTA. You could take this sample, and adjust it accordingly, so that the screen (sticky note) can only be moved when the user has sufficient rights. blog entry


    In regard to the text, I would suggest a string variable of the internal driver. You can then use an interlocking to prevent further editing of the text, after it has been entered.

    On entering the text, you execute a vsta macro that writes the current user and and timestamp to two other string variables.

    On creating a new sticky note, you would have to determine which screens are already open, and open the next free sticky note. This could be done in a small macro and utilizing the "screen active" variable.

    So for each sticky note, you would have to predefine one screen, one frame, three internal string variables,and one boolean variable for the screen active. (the variables could e.g. be an Array of a user defined data type)

    Using the runtime profiles function, you can make sure that the position of the sticky notes is saved and can be restored e.g. after restarting the runtime.


    I hope this gives you some ideas

    Cheers,
    Mark

  3. #3

    Default Re: Freeze Notepad (text screen) in Runtime

    Tkanks for your quick reply. You gave me really good ideas.

    Maybe you have a sample project of "how to move screens without a title bar using VSTA", because in the blog I didn't find any sample.

    Dario

  4. #4

    Default Re: Freeze Notepad (text screen) in Runtime

    Hi Dario,

    The sample project used to be linked at the blog entry, if I remember correctly. I've contacted the author of the blog entry to find out why the sample is no longer there.

    Best regards,
    Mark

  5. #5

    Default Re: Freeze Notepad (text screen) in Runtime

    Hi Dario,

    The project backup that was linked to the blog was recovered, and you can find it attached below.

    movefreedefinable.zip

    Please also see this thread that covers the same sample.

    thread move freedefinable

    In order to use this example, you would ideally be using zenon Version 7.00 or 7.10. Or version 6.51 with at least build 9 installed.

    Best regards,
    Mark

  6. #6

    Default Re: Freeze Notepad (text screen) in Runtime

    Thanks for the project.

Similar Threads

  1. Close one screen, opens other screen
    By dario in forum zenon Service Engine Supervisor
    Replies: 3
    Last Post: 14th November 2012, 10:34
  2. DynProperties("Text") of a static text
    By jurijcadez in forum VBA
    Replies: 3
    Last Post: 12th June 2012, 14:09
  3. Screen resolution
    By stephanepilon in forum zenon Service Engine Supervisor
    Replies: 6
    Last Post: 16th May 2008, 15:49
  4. VBA wizards freeze on some computers
    By markclemens in forum VBA
    Replies: 0
    Last Post: 30th November 2007, 10:31

Posting Rules

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