Results 1 to 9 of 9

Thread: (drawEllipse) draw an Ellipse at mouse position [UNSOLVED]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2016
    Posts
    80

    (drawEllipse) draw an Ellipse at mouse position [UNSOLVED]

    (I'm using Windows10 @64bit)

    Hello,

    I'm using the apiguide sample: GetWindowDC

    The sample (see attachement) will draw an Ellipse at the mouse position on the active window.

    I'm watching a youtube video (using Firefox) and it works fine. But when compiling the *.vbp project
    to an *.exe the Ellipse at the mouse position will disappear after an half second.

    How can I prevent the ellipse from disappear?

    6c api guide sample.zip
    Last edited by vb_elmar; Apr 8th, 2017 at 05:25 AM.

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,905

    Re: (drawEllipse) draw an Ellipse at the mouse position

    This is because the window is repainted.
    The same happens on every window you resize. Or hide and make visible again.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2016
    Posts
    80

    Re: (drawEllipse) draw an Ellipse at the mouse position

    >>This is because the window is repainted
    but when the project is NOT compiled the Ellipse at the mouse position will stay.

    How can I prevent the ellipse from disappear when the project is compiled?

  4. #4
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,905

    Re: (drawEllipse) draw an Ellipse at the mouse position

    I have tested it also from the IDE and the circles disappeared when a window was repainted.
    I tested it on a browser, on outlook, every form repaint makes the circles disappear, which is logical because the owner of the windows does not know anything about the drawn circles.
    I'm using Win7 (32bit)

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2016
    Posts
    80

    Re: (drawEllipse) draw an Ellipse at the mouse position

    as the (attached) picture shows, dozens of ellipses are remaining, when the project is NOT compiled (I'm using Firefox, and Windows10 @64bit).

    -What must I do to prevent the ellipses from disappearing when the project is compiled?
    Name:  shibuya.jpg
Views: 108
Size:  52.5 KB

  6. #6
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,905

    Re: (drawEllipse) draw an Ellipse at the mouse position

    Before I step out of this discussion, what is your goal?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Sep 2016
    Posts
    80

    Re: (drawEllipse) draw an Ellipse at the mouse position

    I want to make a project drawing Ellipses on youtube live streams.

    My problem is: when the project is compiled the ellipses at the mouse position will NOT stay. Unfortunately
    the ellipses disappear within a half second (when the project is running in the VB-IDE all the ellipses remain).

    Now I want to know what I have to do to prevent the ellipses from disappearing at the mouse position
    when the project is compiled.

  8. #8
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,905

    Re: (drawEllipse) draw an Ellipse at the mouse position

    Then you have to store the coordinates of all mouse clicks/movements and draw all circles up until the current moment.

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Sep 2016
    Posts
    80

    Re: (drawEllipse) draw an Ellipse at the mouse position

    No, I don't have to store the coordinates of all mouse clicks/movements. There must be another (simpler) solution
    to be able to draw ellipses on youtube live stream windows. -The youtube shibuya website e.g. is such a live stream window.

    My project is working fine so far. But how can I prevent the ellipses from disappearing at the mouse position
    when the project is compiled??

Posting Permissions

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



Click Here to Expand Forum to Full Width