thanks but how can you copy the file from resources.
[Vb.net] Write folder with files from resource to..
Add this sub:
Sub SaveResourceImage( ByVal ResourceName As String , ByVal TargetLocAndFilename As String )
Dim obj As Object
Dim Bitmap As Bitmap
obj = My.Resources.ResourceManager.GetObject(ResourceNam e)
Bitmap = obj
Bitmap.Save(TargetLocAndFilename)
End Sub
Then call the sub from where ever you want, like:
SaveResourceImage( "Wikipedia", "C:\wiki.jpg")
'Here Resource Image is Wikipedia which must exist in my resources.
'Here "C:\wiki.jpg" is the location and name where I would save the file extracted from the resource
Hope you got it !
Sub SaveResourceImage( ByVal ResourceName As String , ByVal TargetLocAndFilename As String )
Dim obj As Object
Dim Bitmap As Bitmap
obj = My.Resources.ResourceManager.GetObject(ResourceNam e)
Bitmap = obj
Bitmap.Save(TargetLocAndFilename)
End Sub
Then call the sub from where ever you want, like:
SaveResourceImage( "Wikipedia", "C:\wiki.jpg")
'Here Resource Image is Wikipedia which must exist in my resources.
'Here "C:\wiki.jpg" is the location and name where I would save the file extracted from the resource
Hope you got it !
can you do this for .xml files? and btw thanks 

bump i still need help for .xml file. 

Add This Sub:
Sub SaveXML( ByVal resourcename As String , ByVal location As String )
Dim obj As Object
obj = My.Resources.ResourceManager.GetObject(resourcenam e)
My.Computer.FileSystem.WriteAllText(location,obj, False )
End Sub
Then call it from anywhere:
SaveXML( "ppl2pass", "D:\ppl2pass.xml")
'Here ResourceName is ppl2pass which must exist in my resources.
'Here "D:\ppl2pass.xml" is the location and name where I would save the xml file extracted from the resource.
'Note that if you have an xml file named "ppl2pass.xml" in the resource, you will use it without extension like "ppl2pass", or else it won't work.
Hope this helps
Sub SaveXML( ByVal resourcename As String , ByVal location As String )
Dim obj As Object
obj = My.Resources.ResourceManager.GetObject(resourcenam e)
My.Computer.FileSystem.WriteAllText(location,obj, False )
End Sub
Then call it from anywhere:
SaveXML( "ppl2pass", "D:\ppl2pass.xml")
'Here ResourceName is ppl2pass which must exist in my resources.
'Here "D:\ppl2pass.xml" is the location and name where I would save the xml file extracted from the resource.
'Note that if you have an xml file named "ppl2pass.xml" in the resource, you will use it without extension like "ppl2pass", or else it won't work.
Hope this helps

alright thanks man
This thread is closed for replies.
Similar Threads
Combat Arms Hack Coding / Programming / Source Code[SOURCE CODE]Write File To Disk From Resources[VB.NET]
2 Visual Basic Programming❗ how to save dll from resources to temp folder.? [solved]BL 2 Battlefield Bad Company 2 (BFBC2) HacksExtract Audio files from BC2 folderGA 3 Combat Arms Help🙁 Problem with paint.net and moding DTX filesDE 6 General❓ is it safe to delete files from Temp folder found in Local settings?
13
