skip to main
|
skip to sidebar
home
FORUM
File
Total Kategori
Kategori
*Application By ARBI Blog's
(9)
*Dasar Visual Basic
(2)
CommandButton
(2)
Context Menu
(2)
File
(2)
Folder
(2)
Form
(23)
Keyboard
(2)
Label
(4)
ListBox
(2)
ListView
(3)
Menu
(1)
Mouse
(2)
MS.EXCEL
(3)
Registry
(2)
String
(1)
Textbox
(10)
TreeView
(1)
Windows XP
(5)
Show All Kategory
Archive
►
2012
(1)
►
Januari
(1)
►
2011
(11)
►
November
(2)
►
September
(1)
►
Juni
(1)
►
Maret
(4)
►
Februari
(3)
►
2010
(5)
►
Oktober
(2)
►
September
(2)
►
Februari
(1)
▼
2009
(59)
►
Desember
(1)
▼
November
(33)
Memeriksa Apakah Mouse Terinstall
Memasukkan Gambar Pada ImageList
Cara Mendapatkan Kode ASCII Keyboard
Keyascii Codes
tes
3D Text In Label
Gradient BackColor Label
Animasi Form Load & Unload (Explode \ Implode Effect)
Gradient Forms (Using API)
Gradient Forms
3D Form
Menampilkan Form Dalam Form
Mendeteksi Form Sedang Di Load Atau Tidak
Unload Semua Form
Gradient TitleBar Form
Membuat TitleBar
Menggerakan Form Tanpa TitleBar
Menampilkan Dan Menyembunyikan TitleBar Form
Flash Title Bar
Menambahkan Minimize Button
Menonaktifkan Tombol X pada Form
Form Tidak Dapat Di Close
Lock Move Form
Center Caption Form
Transparent Forms
Merubah Ukuran Form Menjadi Full Screen
Align Right Menu
Menambahkan New Menu Pada System Form
Mendapatkan Drive System
Minimize Semua Jendela Window
Mendapatkan Nama Komputer
Mendapatkan Username Yg Aktif
Membuat Multi Directory
►
Oktober
(14)
►
September
(11)
Recent Comments
Blogroll
Materi Kuliah Api
Contoh Aplikatif : Word and Excell Generator
16 tahun yang lalu
DevPage
VB Helper: Tips, Tricks, & Example Programs for Visual Basic Developers
VBTown - Visual Basic Tutorial
Member
Sabtu, 07 November 2009
Transparent Forms
DESKRIPSI
Efek transparent hanya terjadi pada form dan tidak mentransparent control2 lain.
Nb: Tambahkan Beberapa control utk melihat hasil efeknya.
Masukkan souce ini ke dalam Form
Private Sub Form_Resize() TransparentForm Me End Sub
Masukkan souce ini ke dalam Module
Option Explicit Private Declare Function CreateRectRgn Lib "gdi32" (ByVal X1 As Long, _ ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long Private Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As _ Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal _ nCombineMode As Long) As Long Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As _ Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long Public Sub TransparentForm(frm As Form) frm.ScaleMode = vbPixels Const RGN_DIFF = 4 Const RGN_OR = 2 Dim outer_rgn As Long Dim inner_rgn As Long Dim wid As Single Dim hgt As Single Dim border_width As Single Dim title_height As Single Dim ctl_left As Single Dim ctl_top As Single Dim ctl_right As Single Dim ctl_bottom As Single Dim control_rgn As Long Dim combined_rgn As Long Dim ctl As Control If frm.WindowState = vbMinimized Then Exit Sub ' Create the main form region. wid = frm.ScaleX(frm.Width, vbTwips, vbPixels) hgt = frm.ScaleY(frm.Height, vbTwips, vbPixels) outer_rgn = CreateRectRgn(0, 0, wid, hgt) border_width = (wid - frm.ScaleWidth) / 2 title_height = hgt - border_width - frm.ScaleHeight inner_rgn = CreateRectRgn(border_width, title_height, wid - border_width, _ hgt - border_width) ' Subtract the inner region from the outer. combined_rgn = CreateRectRgn(0, 0, 0, 0) CombineRgn combined_rgn, outer_rgn, inner_rgn, RGN_DIFF ' Create the control regions. For Each ctl In frm.Controls If ctl.Container Is frm Then ctl_left = frm.ScaleX(ctl.Left, frm.ScaleMode, vbPixels) _ + border_width ctl_top = frm.ScaleX(ctl.Top, frm.ScaleMode, vbPixels) + title_height ctl_right = frm.ScaleX(ctl.Width, frm.ScaleMode, vbPixels) + ctl_left ctl_bottom = frm.ScaleX(ctl.Height, frm.ScaleMode, vbPixels) + ctl_top control_rgn = CreateRectRgn(ctl_left, ctl_top, ctl_right, ctl_bottom) CombineRgn combined_rgn, combined_rgn, control_rgn, RGN_OR End If Next ctl 'Restrict the window to the region. SetWindowRgn frm.hWnd, combined_rgn, True End Sub
0 komentar:
Posting Komentar
Posting Lebih Baru
Posting Lama
Beranda
Langganan:
Posting Komentar (Atom)
Logo
Sumbangan
Yahoo! Messager
Jimmy
Facebook
Jimmy
Pasang Link Banner :
Kumpulan Source VB
VISITOR
View shoutbox
About Me
Abe Kaz
rieb
---
| Registry Blog |
| FORUM |
------------------ Jangan lupa kasih Komentar yah ------------------
| Yahoo!Messager |
| Facebook |
---
0 komentar:
Posting Komentar