Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Graphics help

Graphics help

Scheduled Pinned Locked Moved C#
csharpdatabasegraphicsadobedocker
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nooie
    wrote on last edited by
    #1

    Hi, I'm still new to C# so please bear with me. I am trying to write a windows program, and am struggling to find info for the following things :- 1. How to get an event to trigger when the user clicks the mouse button anywhere on the window. I would like a container thats will contain grahics in the end. But when the user clicks the button I would like to get the Co-ors (X/Y) for where the user clicked. 2. I would like to show a flashing icon on the screen at particular X/Y co-ords, then when the Co-Ords have changed it will update and flash in a different place. I would like to have multiple flashes. Be able to add and remove the flashes. I am assuming I would need to create a new class for this object?? Any help or points to articles would be greatly appreciated. Regards Tony

    C 1 Reply Last reply
    0
    • N Nooie

      Hi, I'm still new to C# so please bear with me. I am trying to write a windows program, and am struggling to find info for the following things :- 1. How to get an event to trigger when the user clicks the mouse button anywhere on the window. I would like a container thats will contain grahics in the end. But when the user clicks the button I would like to get the Co-ors (X/Y) for where the user clicked. 2. I would like to show a flashing icon on the screen at particular X/Y co-ords, then when the Co-Ords have changed it will update and flash in a different place. I would like to have multiple flashes. Be able to add and remove the flashes. I am assuming I would need to create a new class for this object?? Any help or points to articles would be greatly appreciated. Regards Tony

      C Offline
      C Offline
      Chris Buckett
      wrote on last edited by
      #2

      Nooie wrote:

      But when the user clicks the button I would like to get the Co-ors (X/Y) for where the user clicked.

      Look at the MouseClick event of the control, e.g. a Form or a Panel control. The e parameter contains e.X and e.Y

      Nooie wrote:

      2. I would like to show a flashing icon on the screen at particular X/Y co-ords

      Why not drop a picture box where you want to paint the control? Or just paint directly to the control (look at the paint event) and make it flash using a timer. Many articles in this[^] section will show you how to paint to a control. Hope that's of use.

      ChrisB ChrisDoesDev[^]

      N 1 Reply Last reply
      0
      • C Chris Buckett

        Nooie wrote:

        But when the user clicks the button I would like to get the Co-ors (X/Y) for where the user clicked.

        Look at the MouseClick event of the control, e.g. a Form or a Panel control. The e parameter contains e.X and e.Y

        Nooie wrote:

        2. I would like to show a flashing icon on the screen at particular X/Y co-ords

        Why not drop a picture box where you want to paint the control? Or just paint directly to the control (look at the paint event) and make it flash using a timer. Many articles in this[^] section will show you how to paint to a control. Hope that's of use.

        ChrisB ChrisDoesDev[^]

        N Offline
        N Offline
        Nooie
        wrote on last edited by
        #3

        Hi Chris, Sorry I thought I had replied. I've had a good play with what you suggested and its getting better. Thats what experience is all about, which is what I get from playing. Again many thanks for your reply. Tony

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups