Click here to Skip to main content
15,890,365 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Newbie here Pin
Daniel132424-Jul-05 17:43
Daniel132424-Jul-05 17:43 
GeneralRe: Newbie here Pin
Nguyen Dinh Quy24-Jul-05 19:39
Nguyen Dinh Quy24-Jul-05 19:39 
GeneralRe: Newbie here Pin
toxcct24-Jul-05 20:50
toxcct24-Jul-05 20:50 
GeneralRe: Newbie here Pin
Nguyen Dinh Quy24-Jul-05 21:01
Nguyen Dinh Quy24-Jul-05 21:01 
GeneralRe: Newbie here Pin
Yulianto.24-Jul-05 21:06
Yulianto.24-Jul-05 21:06 
GeneralRe: Newbie here Pin
Nguyen Dinh Quy24-Jul-05 22:07
Nguyen Dinh Quy24-Jul-05 22:07 
GeneralRe: Newbie here Pin
Yulianto.24-Jul-05 22:23
Yulianto.24-Jul-05 22:23 
GeneralRe: Newbie here Pin
Nguyen Dinh Quy24-Jul-05 22:50
Nguyen Dinh Quy24-Jul-05 22:50 
Dim dlg as New OpenFileDialog
if dlg.ShowDialog() = DialogResult.Ok then
System.IO.File.Copy(dlg.FileName, "C:\a.txt")
EndIf


Yah, this will create a text file in C:\...but what if the user chooses other types of files? (.exe, .pdf) I tried choosing an .exe file, but it creates a .txt file, using notepad to read the .exe file. Frown | :(



Dim dlg as New OpenFileDialog
if dlg.ShowDialog() = DialogResult.Ok then
System.IO.File.Copy(dlg.FileName, "C:\" + dlg.FileName)
EndIf


I tried this, but it gives an error indicating "The given path's format is not supported".
GeneralRe: Newbie here Pin
Yulianto.24-Jul-05 23:06
Yulianto.24-Jul-05 23:06 
GeneralRe: Newbie here Pin
Nguyen Dinh Quy24-Jul-05 23:17
Nguyen Dinh Quy24-Jul-05 23:17 
GeneralRe: Newbie here Pin
Anonymous25-Jul-05 4:06
Anonymous25-Jul-05 4:06 
Generaladd and remove rows in datagrid. Pin
ra-rag24-Jul-05 14:13
ra-rag24-Jul-05 14:13 
GeneralRe: add and remove rows in datagrid. Pin
thealca24-Jul-05 16:35
thealca24-Jul-05 16:35 
GeneralPlatform Invoke Pin
lagumaster24-Jul-05 13:27
lagumaster24-Jul-05 13:27 
GeneralRe: Platform Invoke Pin
Dave Kreskowiak24-Jul-05 15:21
mveDave Kreskowiak24-Jul-05 15:21 
GeneralRemove a Directory and its contents. Pin
Brad Fackrell24-Jul-05 10:44
Brad Fackrell24-Jul-05 10:44 
GeneralRe: Remove a Directory and its contents. Pin
progload24-Jul-05 11:42
progload24-Jul-05 11:42 
GeneralRe: Remove a Directory and its contents. Pin
Brad Fackrell24-Jul-05 12:21
Brad Fackrell24-Jul-05 12:21 
GeneralSniffing "Submit" Buttons in HTML pages Pin
Anonymous24-Jul-05 8:45
Anonymous24-Jul-05 8:45 
GeneralRe: Sniffing "Submit" Buttons in HTML pages Pin
madfiddlerchris24-Jul-05 23:09
madfiddlerchris24-Jul-05 23:09 
Generallocking folder and files Pin
Member 213961924-Jul-05 7:46
Member 213961924-Jul-05 7:46 
GeneralRe: locking folder and files Pin
progload24-Jul-05 11:51
progload24-Jul-05 11:51 
GeneralRe: locking folder and files Pin
Dave Kreskowiak24-Jul-05 15:19
mveDave Kreskowiak24-Jul-05 15:19 
GeneralReply to dave only: locking folder and files Pin
Member 213961925-Jul-05 5:56
Member 213961925-Jul-05 5:56 
GeneralActiveX Exe Registeration Pin
MohammadAmiry24-Jul-05 7:29
MohammadAmiry24-Jul-05 7:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.