sama aja koq, di VB jg bs. tinggal apply sekali "InitCommonControls" di sub
main() sblm smua form ditampilkan...
ato klo mo gampang, coba pakai module XPStyle (ngopi-paste dr vbcode.com),
yang akan meng-generate otomatis file .manifest - ini listing nya. silakan
di-copy ke module tersendiri :
--------------- beginning of code : xpmanifest.bas ------------------------
Option Explicit
Private Declare Function InitCommonControls Lib "comctl32.dll" () As Long
'NOTE: JANGAN LUPA TAMBAHKAN BARIS INI DI SUB MAIN, SEBELUM FORM.SHOW
' InitCommonControls
' XPStyle
'
'KALO ENGGAK, PROGRAM BAKAL ERROR EN GA MAU JALAN SAMA SEKALI LOOO....
Public Function UnStyle() As Boolean
On Error Resume Next
Dim strManifest As String
strManifest = AppPath & "\" & App.EXEName & ".exe.manifest"
SetAttr strManifest, vbNormal
Kill strManifest
If Err.Number = 0 Then UnStyle = True
End Function
'This function will automatically write a small XML file (manifest) in your
program folder
'Which carries some info about your program and let windows draw your
application.
'It won't be affected by the exe name.
'
' Written by: Voodoo Attack!!
' E-Mail: [EMAIL PROTECTED]
'
Public Function XPStyle(Optional AutoRestart As Boolean = False, _
Optional CreateNew As Boolean) As Boolean
InitCommonControls
On Error Resume Next
Dim XML As String
Dim ManifestCheck As String
Dim strManifest As String
Dim FreeFileNo As Integer
If AutoRestart = True Then CreateNew = False
'(put the XML in a string)
XML = ("<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?> " &
vbCrLf & _
"<assembly " & vbCrLf & " xmlns=""urn:schemas-microsoft-com:asm.v1""
" & vbCrLf & _
" manifestVersion=""1.0"">" & vbCrLf & "<assemblyIdentity " &
vbCrLf & _
" processorArchitecture=""x86"" " & vbCrLf & "
version=""EXEVERSION""" & vbCrLf & _
" type=""win32""" & vbCrLf & " name=""EXENAME""/>" & vbCrLf &
_
" <description>EXEDESCRIPTION</description>" & vbCrLf & "
<dependency>" & vbCrLf & _
" <dependentAssembly>" & vbCrLf & " <assemblyIdentity" &
vbCrLf & _
" type=""win32""" & vbCrLf & " name=""
Microsoft.Windows.Common-Controls""" & vbCrLf & _
" version=""6.0.0.0""" & vbCrLf & "
publicKeyToken=""6595b64144ccf1df""" & vbCrLf & _
" language=""*""" & vbCrLf & "
processorArchitecture=""x86""/>" & vbCrLf & _
" </dependentAssembly>" & vbCrLf & " </dependency>" & vbCrLf &
"</assembly>" & vbCrLf & "")
'don't be confused.. i did not write this by hand!
'i made a special text coverter for cases like this. :D
strManifest = AppPath & "\" & App.EXEName &
".exe.manifest" 'set the name of the manifest
ManifestCheck = Dir(strManifest, vbNormal + vbSystem + vbHidden +
vbReadOnly + vbArchive) 'check the app manifest file.
If ManifestCheck = "" Or CreateNew = True
Then 'if not found.. make a new
one
XML = Replace(XML, "EXENAME", App.EXEName &
".exe") 'Replaces the string "EXENAME"
with the program's exe file name.
XML = Replace(XML, "EXEVERSION", App.Major & "." & App.Minor & "." &
App.Revision & ".0") 'Replaces the "EXEVERSION" string.
XML = Replace(XML, "EXEDESCRIPTION", App.FileDescription)
'Replaces the app Describtion.
FreeFileNo =
FreeFile
'get the next avilable file
If ManifestCheck <> "" Then
SetAttr strManifest, vbNormal
Kill strManifest
End If
Open strManifest For Binary As #(FreeFileNo) 'open the file
Put #(FreeFileNo), , XML 'uses 'put' to set the file
content.. note that 'put' (binary mode) is much faster than 'print'(output
mode)
Close #(FreeFileNo) 'close the file.
SetAttr strManifest, vbHidden + vbSystem
If ManifestCheck = "" Then
XPStyle = False 'return false.. this means
that the file does not exist
Else
XPStyle = True
End If
Else
'the manifest file exists.
XPStyle = True
'return true.
End If
End Function
--------------- end of
xpmanifest.bas----------------------------------------
cara panggilnya, di sub main() kasih code sprti ini nih
sub main()
xpstyle
'blablabla... code mu yg laen...
end sub
silakan coba bikin exe dr project mu trus jalanin... (klo cuman jalan di IDE
VB kyanya ngga ngefek deh perubahannya...)
--
regards,
Rizky Prihanto
~~~~~~~~~~~~~~~~~~~
Office : PT Lintang Kawuryan Malang (http://www.linkar.co.id)
Personal : http://www.software-arsitek.web.id
[Non-text portions of this message have been removed]