HI
Hope you all are doing fine.
I have been trying to make a sifi look form for my project. it works however it flickers as i scroll it down or up. below mentioned is the code for the same and a image of it is attached.
i have also tried double buffered but it is still flickering.
Code:
Public Class Info_Tab
Private Sub Info_Tab_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.DoubleClick
Me.Close()
End Sub
Private Sub Info_Tab_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim gp As New Drawing2D.GraphicsPath
Dim v As Integer = CInt(Me.Width / 2 * Math.Sin(30 * Math.PI / 180))
Dim A As New Point(50, 500)
Dim B As New Point(50, 50)
Dim C As New Point(100, 50)
Dim D As New Point(130, 80)
Dim F As New Point(420, 80)
Dim Gg As New Point(450, 50)
Dim H As New Point(500, 50)
Dim I As New Point(500, 500)
Dim myPoints As Point() = {A, B, C, D, F, Gg, H, I}
gp.AddPolygon(myPoints)
e.Graphics.FillPath(Brushes.Transparent, gp)
Me.Region = New Region(gp)
End Sub
Private Sub Info_Tab_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
End Sub