Our social:

Sabtu, 30 Juli 2011

Membuat tampilan VB tampil kereeeen

Terkadang tampilan program yang kita buat terkesan biasa ato standart2 aja meskipun isi dari program kita terbilang program besar,nah untuk melengkapi program yang kita buat bisa tampil lebih kereen dan pastinya bisa menambah daya jual program kita menjadi lebih tinggi,alangkah baiknya kita beri themes ato skins.
berikut tampilan form yang sudah diberi skins..




Gimana?? keren kan?? untuk bisa membuat skin seperti ini silakan anda download programnya disini

Untuk menggunakan skin tersebut kamu harus mengaktifkan act43.ocx dulu pada program VB nah setelah diaktifkan tinggal anda buat form dan masukkan code script sperti dibawah ini

Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Any) As Long
Const EM_UNDO = &HC7
Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)


Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OpenFilename) As Long
Private Type OpenFilename
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As String
nMaxCustFilter As Long
iFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
Flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type
Private Function ShowFileDialog() As String
Dim ofn As OpenFilename
ofn.lStructSize = Len(ofn)
ofn.hwndOwner = hwnd
ofn.lpstrFilter = "Skin files (*.skn)" & Chr$(0) & "*.skn" & Chr$(0) & Chr(0) & Chr(0)
ofn.lpstrFile = String(256, 0)
ofn.nMaxFile = 255
ofn.lpstrTitle = "Open Skin"
ofn.Flags = &H800000 + &H1000 + &H8 + &H4
ofn.lpstrDefExt = "skn" + Chr(0)
GetOpenFileName ofn
If Mid(ofn.lpstrFile, 1, 1) <> Chr(0) Then ShowFileDialog = ofn.lpstrFile
End Function


Private Sub Form_Load()
Skin1.ApplySkin Me.hwnd
Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)

End Sub

Private Sub Form_Unload(Cancel As Integer)
If Me.WindowState <> vbMinimized Then
SaveSetting App.Title, "Settings", "MainLeft", Me.Left
SaveSetting App.Title, "Settings", "MainTop", Me.Top
SaveSetting App.Title, "Settings", "MainWidth", Me.Width
SaveSetting App.Title, "Settings", "MainHeight", Me.Height
End If
End Sub
Selamat mencoba dan berkreasi dengan program program yang lebih kereen...
sumber