Buat dulu formnya, simlpe saja seperti gambar di bawah ini :
Setelah itu ketikan listing kodenya berikut ini :
Public Class test2
Private Sub FolderBrowserDialog1_HelpRequest(ByVal sender As
System.Object, ByVal e As
System.EventArgs)
End Sub
Private Sub test2_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.StartPosition
= FormStartPosition.CenterScreen
Me.TransparencyKey
= Color.Fuchsia
End Sub
Private Sub test2_Paint(ByVal
sender As Object,
ByVal e As
System.Windows.Forms.PaintEventArgs) Handles Me.Paint
e.Graphics.Clear(Color.Fuchsia)
End Sub
End Class
Maka setelah di running hasilnya akan seperti gambar berikut :
jika ingin transparan dengan bordernya tinggal tambahkan
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
di dalam formnya. lengkapnya seperti ini
Public Class test2
Private Sub FolderBrowserDialog1_HelpRequest(ByVal sender As
System.Object, ByVal e As
System.EventArgs)
End Sub
Private Sub test2_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.FormBorderStyle
= Windows.Forms.FormBorderStyle.None
Me.StartPosition
= FormStartPosition.CenterScreen
Me.TransparencyKey
= Color.Fuchsia
End Sub
Private Sub test2_Paint(ByVal
sender As Object,
ByVal e As
System.Windows.Forms.PaintEventArgs) Handles Me.Paint
e.Graphics.Clear(Color.Fuchsia)
End Sub
End Class
====== Selamat Mencoba=======
0 komentar:
Posting Komentar