Create Visual Basic Form Interesting and Unique
Are you boring of your Visual Basic Form appearance? I have tried to change skin of Visual Basic Form. I use Active Skin software to change Visual Basic Form like above.
1. First you download Active Skin and get patch of this software and install it.2. Open Microsoft Visual Basic 6 and create a form with a command button.
3. Add Active Skin component by press "Ctrl + T". On the Components window you click browse and find actskin4.ocx file in "C:\Windows\system32" and then open it. Click Apply on Components window and close that window. Active Skin component will be added onto Toolbox. Click skin and apply it on your form.
4. Click View Code on Project Explorer type code below or you can download this project.
'-------------------------
Option Explicit
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 Command1_Click()
Dim filename As String
filename = ShowFileDialog
If filename <> "" Then
Skin1.LoadSkin filename
Skin1.ApplySkin Me.hWnd
End If
End Sub
'---------------------------------
5. Click Load skin to load and apply skin to the form. Find skin in C:\Program Files\ActiveSkin 4\Skins
is this can be used in VB.Net?
ReplyDelete@myresearch:
ReplyDeleteI've tried it in vb 6 but not in vb.net. You can try this one: http://www.freedownloadscenter.com/Best/active-skin.html