|
-
Sep 6th, 2010, 04:55 PM
#1
Thread Starter
Addicted Member
Help me to run a file from a button
I want to run a file when i press on button 3
Directory of file:
C:/iPhodroid.exe
-
Sep 6th, 2010, 05:02 PM
#2
Lively Member
Re: Help me to run a file from a button
The easiest eay to do this is
shell("C:/iPhodroid.exe")
Hope this helps
Working in VB2005 and SQL2005
-
Sep 6th, 2010, 05:04 PM
#3
Re: Help me to run a file from a button
 Originally Posted by SunshineBH
The easiest eay to do this is
shell(C:/iPhodroid.exe)
Hope this helps
Blasphemy!
He means:
VB.NET Code:
Process.Start("C:\iPhodroid.exe")
Also, make sure you do the correct slashes. You used a forward slash, which isn't used in file paths and would not work.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Sep 6th, 2010, 05:19 PM
#4
Thread Starter
Addicted Member
Re: Help me to run a file from a button
 Originally Posted by weirddemon
Blasphemy!
He means:
VB.NET Code:
Process.Start("C:\iPhodroid.exe")
Also, make sure you do the correct slashes. You used a forward slash, which isn't used in file paths and would not work.
Thank you very much it worked for me
also can you help me to copy fiiles from a directory to a directory and hide it and thx u very much
-
Sep 6th, 2010, 05:22 PM
#5
Lively Member
Re: Help me to run a file from a button
 Originally Posted by weirddemon
Blasphemy!
Sorry 
Been using that command for years and it has been working fine.
How does this differ from Process.Start? And why is this better?
Working in VB2005 and SQL2005
-
Sep 6th, 2010, 05:30 PM
#6
Re: Help me to run a file from a button
 Originally Posted by SunshineBH
Sorry
Been using that command for years and it has been working fine.
How does this differ from Process.Start? And why is this better?
Shell is an outdated method used from VB6. I think it's only in VB.NET for making it easier to convert VB6 apps to VB.NET.
If you're just using the Process Class for launching one item, and nothing else, then there's no difference, I guess. The OP would just be developing bad habits by using Shell.
But, if you read the documentation, there's so much more that can be accomplished with Process.Start.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Sep 6th, 2010, 05:34 PM
#7
Re: Help me to run a file from a button
 Originally Posted by salmawy
Thank you very much it worked for me
also can you help me to copy fiiles from a directory to a directory and hide it and thx u very much
I can't give you the answer, but I'll lead you in the right direction.
The System.IO namespace contains the File Class that will let you manipulate files.
Read up on the documentation and you'll get an idea on what you need to do.
But basically, you'll want to loop through each file in the directory and call the appropriate method to copy or move them to another directory.
Also, don't forget to use Google.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Sep 6th, 2010, 05:58 PM
#8
Frenzied Member
Re: Help me to run a file from a button
You can hide the file Attributes.
=VB.net Code:
File.SetAttributes("C:\vb.txt", FileAttributes.Hidden)
Moving a file is easy just Google it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|