Showing results 1 to 9 of 9

Thread: Windows Form Start Position

  1. #1

    Default Windows Form Start Position

    Hello Gents,

    I am using Windows Forms in Sicam230. I would like to open these forms relative to mouse. Any ideas?

  2. #2
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Windows Form Start Position

    just a short question beforehand: what exactly do you want to display in those windows forms? external data or data which are comming from sicam?


  3. #3

    Default Re: Windows Form Start Position

    Quote Originally Posted by herberto View Post
    just a short question beforehand: what exactly do you want to display in those windows forms? external data or data which are comming from sicam?
    Data from Sicam.

  4. #4
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Windows Form Start Position

    can you please tell the reason why to show this data from sicam within a "external" windows formular and not i.e. a a sicam screen type where i.e. variable values are shown in standard controls?
    furthermore: how do you programmatically access the sicam runtime? (using the internal VBA/VSTA interface or from an external application?)

    regards,
    herbert


  5. #5

    Default Re: Windows Form Start Position

    Quote Originally Posted by herberto View Post
    can you please tell the reason why to show this data from sicam within a "external" windows formular and not i.e. a a sicam screen type where i.e. variable values are shown in standard controls?
    furthermore: how do you programmatically access the sicam runtime? (using the internal VBA/VSTA interface or from an external application?)

    regards,
    herbert
    Hi, Using standard Sicam command windows are not sufficient so i implemented already a lot of windows forms in C# and they are working.
    Also the reason to is irrelevant.
    Do you have any idea about my question?

  6. #6
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Windows Form Start Position

    It depends now which version you are using
    1. if you are using version >= 6.51 SP0 Build3 then you can use the event "ElementLeftButtonUp"
    -> check out the help documentation for a sample at Manual -> Programming interfaces -> Object model -> DynPictures -> ElementLeftButtonUp
    -> using this event you also get the x/y position of the element on which it was clicked (its VBA Code there but in VSTA (C#) it is more or less the same method)

    2. if you are using a version <= 6.51 SP0 Build2 then you have to read the mouse pointer using Windows API Events
    -> check out this thread here http://www.copadata.com/forums/showthread.php?t=212

    So this coordinates you then have to hand over to your windows form.

    regards,
    herbert


  7. #7

    Default Re: Windows Form Start Position

    Thank you, i am using the ElementLeftButtonUp event and it is working!

  8. #8

    Default Re: Windows Form Start Position

    Quote Originally Posted by herberto View Post
    It depends now which version you are using
    1. if you are using version >= 6.51 SP0 Build3 then you can use the event "ElementLeftButtonUp"
    -> check out the help documentation for a sample at Manual -> Programming interfaces -> Object model -> DynPictures -> ElementLeftButtonUp
    -> using this event you also get the x/y position of the element on which it was clicked (its VBA Code there but in VSTA (C#) it is more or less the same method)

    2. if you are using a version <= 6.51 SP0 Build2 then you have to read the mouse pointer using Windows API Events
    -> check out this thread here http://www.copadata.com/forums/showthread.php?t=212

    So this coordinates you then have to hand over to your windows form.

    regards,
    herbert
    Hi,
    Thank you for advice i used ElementLeftButtonUp event

  9. #9

    Default Re: Windows Form Start Position

    Thanks!

Similar Threads

  1. Form visual style windows XP/7
    By ippela in forum VSTA
    Replies: 1
    Last Post: 26th September 2011, 00:20
  2. Replies: 1
    Last Post: 3rd August 2010, 10:02
  3. Replies: 0
    Last Post: 12th May 2010, 09:58
  4. Auto start runtime when windows starts
    By craigdouglas in forum zenon Supervisor
    Replies: 5
    Last Post: 12th February 2009, 18:14
  5. Replies: 0
    Last Post: 20th August 2007, 14:14

Posting Rules

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