Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
App. Visual Studio 6.0
[VB,file di risorse esterno], mi date una mano, p.f. ?
lunedì 27 febbraio 2012 - 08.12
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
Elenco Tags
VB.NET
|
Visual Studio 2010
Zan
Profilo
| Newbie
37
messaggi | Data Invio:
lun 27 feb 2012 - 08:12
[Risolto]
Salve a tutti,
Premetto che prima ho fatto diverse prove ricerche su Google...e, non essendo proprio un genio informatico mi sino arreso ed eccomi qui...
Stavo cercando di fare un codice che mi permettesse di archiviare dei files in una risorsa esterna e,girovangando in rete ho trovato questo esempio che permette la creazione di un file di risorse attraverso VB.
Funziona tutto perfettamente ma avrei bisogno di inserire, oltre alle immagini come da esempio, anche altri tipi di file, .ZIP, .PDF, .DOC etc.
Come potrei fare ?
Il codice dichiara un oggetto immagine, io che tipo dovrei dichiarare per i file menzionati prima ?
'===================================
' Code to Create a Resource.
Dim objImage As Image <=================== ?
Dim strString As String
Dim rsw As ResourceWriter
' objImage is the Image that will be added as a resource.
objImage = Image.FromFile("d:\\lock.png")
' strString is the string that will be added as a resource.
strString = "This is the string from resource"
'Creates a resource writer instance to write to MyResource.resources.
rsw = New ResourceWriter("MyResource.resources")
'Adds the image to the resource.
' "MyImage" is the name that the Image is identified as in the resource.
rsw.AddResource("MyImage", objImage)
'Adds the string to the resource.
' "MyText" is the name that the string is identified as in the resource.
rsw.AddResource("MyText", strString)
rsw.Close()
MessageBox.Show("Resource Is Created.....")
'===================================
Grazie mille in anticipo a tutti quelli che vorranno/potranno aiutarmi
Saluti
R.Zanni
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !