Hello,
I have a situation in which I will be moving painted graphics around on a form. Is there a way to change the z-order of painted graphics like you do controls?
Just a sample..
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
VB Code:
Dim g As Graphics = Me.CreateGraphics() Dim str As String = "135" g.FillRectangle(Brushes.Black, 15, 5, 25, 17) g.DrawString(str, New Font("Arial", 10, FontStyle.Regular, GraphicsUnit.Point), Brushes.White, 15, 5) g.Dispose()
How can I switch the DrawString and FillRectangle so that one happens before the other (other than just changing the code order of when they are drawn)?
Thanks!
End Sub




Reply With Quote