Friday, 29 January 2010

How to create a manifest file with code


http://erge32.blogspot.com In this article I do not discuss again what is manifest file functions because of my previous article already exists precisely here, so now the discussion is how to incorporate into a Visual Basic project, so the Manifest file is created automatically if removed.
for those of you who are interested in this tip, please follow the way of making the code below

Step 1

  • create a new standard exe project
  • add module
Step 2
Place the following code in the module project

Option Explicit
Private Declare Function InitCommonControls Lib "Comctl32.dll" () As Long

Sub InitialiseXPControls()
Dim intFreeFile As Integer
Dim lngReturn As Long
Dim strEXEFile As String
Dim strManifestFile As String

strEXEFile = App.Path & "\" & App.EXEName & ".exe"
strManifestFile = strEXEFile & ".manifest"

If Dir(strEXEFile) <> "" And Dir(strManifestFile) = "" Then
intFreeFile = FreeFile()

Open strManifestFile For Output As #intFreeFile
Print #intFreeFile, "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>"
Print #intFreeFile, "<assembly xmlns=""urn:schemas-microsoft-com:asm.v1"" manifestVersion=""1.0"">"
Print #intFreeFile, "<assemblyIdentity"
Print #intFreeFile, " version = ""1.0.0.0"""
Print #intFreeFile, " processorArchitecture = ""X86"""
Print #intFreeFile, " name = ""Microsoft.Winweb.VB_Application"""
Print #intFreeFile, " type=""win32"""
Print #intFreeFile, "/>"
Print #intFreeFile, "<description>GSoftware</description>"
Print #intFreeFile, "<dependency>"
Print #intFreeFile, " <dependentAssembly>"
Print #intFreeFile, " <assemblyIdentity"
Print #intFreeFile, " type=""win32"""
Print #intFreeFile, " name = ""Microsoft.Windows.Common-Controls"""
Print #intFreeFile, " version = ""6.0.0.0"""
Print #intFreeFile, " processorArchitecture = ""X86"""
Print #intFreeFile, " publicKeyToken = ""6595b64144ccf1df"""
Print #intFreeFile, " language = ""*"""
Print #intFreeFile, " />"
Print #intFreeFile, " </dependentAssembly>"
Print #intFreeFile, "</dependency>"
Print #intFreeFile, "</assembly>"
Close #intFreeFile

Shell strEXEFile, vbNormalFocus
End
End If

lngReturn = InitCommonControls()
End Sub


Step 3
Please call InitialiseXPControls in sub main or startup form your project

Now your application will follow the theme of your windows that apply, good luck. If you have any problems please contact me or can you confirm by email, may be useful for you.

23 Komentar: How to create a manifest file with code


yoyok on 29 January 2010 at 21:01 said...

nice post brother

Terima Kasih Sob yoyok Atas Komentarnya.
Rival Aditya on 29 January 2010 at 22:01 said...

wah mantab sob infonya...., thx's y

Terima Kasih Sob Rival Aditya Atas Komentarnya.
management on 29 January 2010 at 22:05 said...

ok bos infonya, susah cari yang seperti ini

Terima Kasih Sob management Atas Komentarnya.
Berita Bola on 29 January 2010 at 22:51 said...

tambah lagi sob infonya

Terima Kasih Sob Berita Bola Atas Komentarnya.
Fashion on 29 January 2010 at 22:52 said...

sip deh ilmunya

Terima Kasih Sob Fashion Atas Komentarnya.
Bang Salom on 29 January 2010 at 22:52 said...

wah pasti ini jago komputer ya, dan jago bahasa inggris juga ya...

Terima Kasih Sob Bang Salom Atas Komentarnya.
HAPIA Mesir on 29 January 2010 at 22:56 said...

wah apa ni..bahasa londo lagi..g paham...wakakakak...

Terima Kasih Sob HAPIA Mesir Atas Komentarnya.
bhogey on 30 January 2010 at 00:30 said...

apa ini gan???
kagak ngarti ,wakakak

Terima Kasih Sob bhogey Atas Komentarnya.
witul4r on 30 January 2010 at 01:06 said...

thanks Erge mantapp banget nich tutor...
ane tunggu2 nich
hehehhhee

Terima Kasih Sob witul4r Atas Komentarnya.
akhatam on 30 January 2010 at 01:57 said...

Wah keren dah triknya

Terima Kasih Sob akhatam Atas Komentarnya.
Galeri on 30 January 2010 at 13:48 said...

Saya belajar komputer baru kemarin2 aja Kang, eehhh... kok ternyata NANG KENE ono Tutorial'e yak, mantraapp Kang. mbo yo sekali-kali pakai bahasa tegalan napa Kang ? jangan pakai boso India mulu, pusing kie kepala.
Okelah kalo bebegitu Kang, Sukses selalu meyertai Sampean Kang. Matur Sembah Nuwun.

Terima Kasih Sob Galeri Atas Komentarnya.
eRGe on 30 January 2010 at 15:03 said...

@Galeri .. Wekekekeke

oke lah kalau begitu ... hehehehehe
makasih mas iyang

Bunglon Blog on 30 January 2010 at 20:08 said...

wkwkw...Nice info brow
VB project with english based. steady!!

Terima Kasih Sob Bunglon Blog Atas Komentarnya.
Omyo on 31 January 2010 at 20:31 said...

manifest file maksudnya apa ya? hehe
lu kan makan tidur diatas VB hahaha
piss

Terima Kasih Sob Omyo Atas Komentarnya.
denadnan on 1 February 2010 at 00:30 said...

mantap.....

Terima Kasih Sob denadnan Atas Komentarnya.
Beben on 1 February 2010 at 17:24 said...

Ma quande lingues coalesce, li grammatica del resultant lingue...(aku tidak paham)

Terima Kasih Sob Beben Atas Komentarnya.
den-adnan on 1 February 2010 at 17:44 said...

berkunjung...

Terima Kasih Sob den-adnan Atas Komentarnya.
link:www.thenoock.com/2010/01/astagacom-lifestyle-on-net.html on 1 February 2010 at 23:00 said...

mampir,gann...

Terima Kasih Sob link:www.thenoock.com/2010/01/astagacom-lifestyle-on-net.html Atas Komentarnya.
javabis99 blog bisnis online & hobby on 2 February 2010 at 17:46 said...

good share friend, thanks

Terima Kasih Sob javabis99 blog bisnis online & hobby Atas Komentarnya.
lin on 26 May 2010 at 07:31 said...

性愛自拍,美女寫真,亂倫,戀愛ING,免費視訊聊天,視訊聊天,成人短片,美女交友,美女遊戲,18禁,三級片,自拍,後宮電影院,85cc,免費影片,線上遊戲,色情遊戲,日本a片,美女,成人圖片區,avdvd,色情遊戲,情色貼圖,女優,偷拍,情色視訊,愛情小說,85cc成人片,成人貼圖站,成人論壇,080聊天室,080苗栗人聊天室,免費a片,視訊美女,視訊做愛,免費視訊,伊莉討論區,sogo論壇,台灣論壇,plus論壇,維克斯論壇,情色論壇,性感影片,走光,色遊戲,情色自拍,kk俱樂部,好玩遊戲,免費遊戲,貼圖區,好玩遊戲區,中部人聊天室,情色視訊聊天室,聊天室ut,成人遊戲,免費成人影片,成人光碟,ut聊天室

Terima Kasih Sob lin Atas Komentarnya.
鳳梨酥Blue on 6 June 2010 at 19:46 said...

徵信社,尋人,偵探,偵探社,徵才,私家偵探,徵信,徵信社,徵信公司,抓猴,出軌,背叛,婚姻,劈腿,感情,第三者,婚外情,一夜情,小老婆,外遇,市場調查,公平交易法,抓姦,債務,債務協商,應收帳款,詐欺,離婚,監護權,法律諮詢,法律常識,離婚諮詢,錄音,找人,追蹤器,GPS,徵信,徵信公司,尋人,抓姦,外遇,徵信,徵信社,徵信公司,尋人,抓姦,外遇,徵信,徵信社,徵信公司,尋人,抓姦,外遇,徵信,徵信社,徵信公司,尋人,抓姦,外遇,徵信社

Terima Kasih Sob 鳳梨酥Blue Atas Komentarnya.
myDisha on 15 December 2010 at 07:31 said...

wah nice bang erge ...
visit blog ku ya
http://mydisha.blogspot.com

Terima Kasih Sob myDisha Atas Komentarnya.
ozy69 on 9 April 2012 at 09:31 said...

Maaf Gan,tutorial ini belum berjalan dengan baik,aQ pake metode Co-Pas sich..udah aQ buat module n aQ Co-Pas nich sourcecode,tapi gak membuahkan hasil,ada syarat apa lagi selain 2 hal diatas? (standart project dan module)
aQ pake VB 6 SP 6 gan..
nice info n moga sukses selalu,thanks ya..

Terima Kasih Sob ozy69 Atas Komentarnya.

Tanggapan Sobat

Zona Bebas Komentar tapi jangan nyepam.

Kalo nyepam minta maaf nih, dengan terpaksa dilaporkan pada kantor polisi terdekat dihapus, monggo sobat silakan komentar jangan malu-malu.

ABOUT ME

Empu Blog ini

SUPPORT BLOG INI




Submit

Display Pagerank Yahoo bot last visit powered by MyPagerank.Net

IKUTI VIA EMAIL

Enter your email address:

Delivered by FeedBurner

5 Komentar Terbaru