C
Christian O'Connell
Hi, still learning VB.Net and have this very simple question.
Why does my console debug window never display "TestOnPaint" ?
Chris
Public Class Form1
Inherits System.Windows.Forms.Form
'[+] Windows Form Designer generated code
Private Class SCListBox
Inherits ListBox
Protected Overrides Sub OnPaint(ByVal e As _
System.Windows.Forms.PaintEventArgs)
Debug.WriteLine("TestOnPaint")
MyBase.OnPaint(e)
End Sub
End Class
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim f As New SCListBox
f.Text = "ff"
Me.Controls.Add(f)
f.Visible = True
f.Refresh()
End Sub
End Class
Why does my console debug window never display "TestOnPaint" ?
Chris
Public Class Form1
Inherits System.Windows.Forms.Form
'[+] Windows Form Designer generated code
Private Class SCListBox
Inherits ListBox
Protected Overrides Sub OnPaint(ByVal e As _
System.Windows.Forms.PaintEventArgs)
Debug.WriteLine("TestOnPaint")
MyBase.OnPaint(e)
End Sub
End Class
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim f As New SCListBox
f.Text = "ff"
Me.Controls.Add(f)
f.Visible = True
f.Refresh()
End Sub
End Class