Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    thanks but how can you copy the file from resources.

  2. #17
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by ppl2pass View Post
    thanks but how can you copy the file from resources.
    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 !

  3. The Following User Says Thank You to Hassan For This Useful Post:

    ppl2pass (05-26-2010)

  4. #18
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    can you do this for .xml files? and btw thanks

  5. #19
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    bump i still need help for .xml file.

  6. #20
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by ppl2pass View Post
    bump i still need help for .xml file.
    I have to install VB... Re-Installed windows....Gimme half an hour...

  7. #21
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    alright thanks man

  8. #22
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    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

  9. #23
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547
    Quote Originally Posted by Blubb1337 View Post
    Code:
     Public Sub MoveFiles(ByVal sourcePath As String, ByVal DestinationPath As String)
            If (Directory.Exists(sourcePath)) Then
                For Each fName As String In Directory.GetFiles(sourcePath)
                    If File.Exists(fName) Then
                        Dim dFile As String = String.Empty
                        dFile = Path.GetFileName(fName)
                        Dim dFilePath As String = String.Empty
                        dFilePath = DestinationPath + dFile
                        File.Move(fName, dFilePath)
                    End If
                Next
            End If
        End Sub
    aggain -.-"

  10. #24
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by Major_the_hacker View Post


    aggain -.-"
    Stop spamming please !!!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Help] how to save dll from resources to temp folder.? [solved]
    By blackgaming in forum Visual Basic Programming
    Replies: 2
    Last Post: 08-14-2011, 12:27 AM
  2. Problem with paint.net and moding DTX files
    By dehpwner in forum Combat Arms Help
    Replies: 6
    Last Post: 06-10-2010, 03:09 AM
  3. Extract Audio files from BC2 folder
    By gano95 in forum Battlefield Bad Company 2 (BFBC2) Hacks
    Replies: 3
    Last Post: 03-31-2010, 06:15 PM
  4. [SOURCE CODE]Write File To Disk From Resources[VB.NET]
    By ajvpot in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 2
    Last Post: 03-30-2010, 08:54 PM
  5. Replies: 13
    Last Post: 08-08-2007, 03:03 AM