Hi
I have a label which has text that changes dependent on user input using the paint command. Say it says 'Hello World'.
When I drag the form around such that any part of the label goes offscreen, when the label returns to the screen it wants to constantly repaint itself as it returns meaning that, dependent on how fast you drag it back, the label can read 'He He He He Hello World' or 'HHHHHHello World' etc
Is this a known issue and is there a way to prevent it?
The label is simply painted using
In order to get it to change appearance it is invalidated when the user clicks a button to tell it to change to some new value. I'm assuming though that there's some core VB process within the painteventargs that triggers when the item gets back to the visible screen that is the root cause of this as all other labels return to the screen just fine.
Thanks!
I have a label which has text that changes dependent on user input using the paint command. Say it says 'Hello World'.
When I drag the form around such that any part of the label goes offscreen, when the label returns to the screen it wants to constantly repaint itself as it returns meaning that, dependent on how fast you drag it back, the label can read 'He He He He Hello World' or 'HHHHHHello World' etc
Is this a known issue and is there a way to prevent it?
The label is simply painted using
Code:
Private Sub MyLabel_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyLabel.Paint
Thanks!
Comment