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. Visual Basic
  4. OnPaint

OnPaint

Scheduled Pinned Locked Moved Visual Basic
helpquestion
6 Posts 4 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.
  • M Offline
    M Offline
    microuser_2000
    wrote on last edited by
    #1

    hellow to all .. can i load OnPaint More than one time at the same forum ? let say i wanna load OnPaint when i click on a button ? i am trying to do so , but i recive an error .. help please .. thxxx

    G R 2 Replies Last reply
    0
    • M microuser_2000

      hellow to all .. can i load OnPaint More than one time at the same forum ? let say i wanna load OnPaint when i click on a button ? i am trying to do so , but i recive an error .. help please .. thxxx

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      What do you mean by "load OnPaint"? What is the code that you used, and what error message do you get?

      --- b { font-weight: normal; }

      M 1 Reply Last reply
      0
      • G Guffa

        What do you mean by "load OnPaint"? What is the code that you used, and what error message do you get?

        --- b { font-weight: normal; }

        M Offline
        M Offline
        microuser_2000
        wrote on last edited by
        #3

        i do not get error message .. but what i wanna do is to be able to call OnPaint , can i call it let say from a button click when i click on the button ?

        G 1 Reply Last reply
        0
        • M microuser_2000

          hellow to all .. can i load OnPaint More than one time at the same forum ? let say i wanna load OnPaint when i click on a button ? i am trying to do so , but i recive an error .. help please .. thxxx

          R Offline
          R Offline
          Rizwan Bashir
          wrote on last edited by
          #4

          me.refresh() forces the form to redraw .. hopes this helps.. also me.invalidate() I think this also do the same thing.. not sure for this option

          Rizwan Bashir ALM Soft[^]

          T 1 Reply Last reply
          0
          • R Rizwan Bashir

            me.refresh() forces the form to redraw .. hopes this helps.. also me.invalidate() I think this also do the same thing.. not sure for this option

            Rizwan Bashir ALM Soft[^]

            T Offline
            T Offline
            Thomas Stockwell
            wrote on last edited by
            #5

            me.invalidate will repaint the entire control.

            Regards, 1tg46 Check out 3D Game Development with Dark Basic Professional [^]programming.

            1 Reply Last reply
            0
            • M microuser_2000

              i do not get error message .. but what i wanna do is to be able to call OnPaint , can i call it let say from a button click when i click on the button ?

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              microuser_2000 wrote:

              i do not get error message ..

              What did you mean by "but i recive an error", then?

              but what i wanna do is to be able to call OnPaint , can i call it let say from a button click when i click on the button ?

              You could, but that is not the proper way of redrawing a control. Call the Invalidate method of the control, that will put a message in the queue that tells the message pump that the Paint event has to be called to redraw the control.

              --- b { font-weight: normal; }

              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