5 Replies - 277 Views - Last Post: 25 June 2012 - 07:20 AM Rate Topic: -----

#1 KKS21199  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-June 12

Juz want know how to replace a file in vb10

Posted 24 June 2012 - 03:35 AM

Guys i have a little problem.I want to Replace a file with another in vb 10.
The things it need to do is

1)when Anyone click a button it will open a open directory.then it have to replace the file they choose with mine.

2)i need the code please
help me

Dim as new openfiledialog



Is This A Good Question/Topic? 0
  • +

Replies To: Juz want know how to replace a file in vb10

#2 sela007  Icon User is offline

  • D.I.C Addict

Reputation: 138
  • View blog
  • Posts: 838
  • Joined: 21-December 11

Re: Juz want know how to replace a file in vb10

Posted 24 June 2012 - 04:12 AM

use copy file method
Was This Post Helpful? 1
  • +
  • -

#3 KKS21199  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-June 12

Re: Juz want know how to replace a file in vb10

Posted 24 June 2012 - 08:08 AM

View Postsela007, on 24 June 2012 - 04:12 AM, said:

use copy file method



No i want to attach my file to vb or c++ or c# 2010 express so when someone clicks a button it will replace theirs with mine.

Please could anyone help me
Was This Post Helpful? 0
  • +
  • -

#4 KKS21199  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 23-June 12

Re: Juz want know how to replace a file in vb10

Posted 25 June 2012 - 05:13 AM

I finally found it out.
i can add my files to resources.

so anyone can save it


Dim b() As Byte = My.Resources.resourcename   'use the name of the resource instead of resourcename
System.IO.File.WriteAllBytes("C:/users/user1/destkop",B)/>




but i still have problems

it only save the drectory i choose n it says that yo dont have permission to access the path some times

i want a save directory to pop up so they can choose the fle path

can you give me codes please


and for resourcename pt any file name that uploaded
Was This Post Helpful? 0
  • +
  • -

#5 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,499
  • Joined: 16-March 11

Re: Juz want know how to replace a file in vb10

Posted 25 June 2012 - 06:07 AM

Google friend. Stop posting so many threads.
Was This Post Helpful? 0
  • +
  • -

#6 GunnerInc  Icon User is online

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,274
  • Joined: 28-March 11

Re: Juz want know how to replace a file in vb10

Posted 25 June 2012 - 07:20 AM

Nobody is just going to give you code. Do some research on your own (I bet you will find your answers and even code), and when you get stuck, we will help you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1