Click here to Skip to main content
15,914,289 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how can i use DataGridView Pin
asha_s7-May-08 22:34
asha_s7-May-08 22:34 
AnswerRe: how can i use DataGridView Pin
darkelv7-May-08 17:55
darkelv7-May-08 17:55 
QuestionIME Pin
Jamal Abdul Nasir7-May-08 3:22
Jamal Abdul Nasir7-May-08 3:22 
AnswerRe: IME Pin
Dave Kreskowiak7-May-08 3:35
mveDave Kreskowiak7-May-08 3:35 
QuestionRe: IME Pin
Jamal Abdul Nasir7-May-08 3:47
Jamal Abdul Nasir7-May-08 3:47 
AnswerRe: IME Pin
Dave Kreskowiak7-May-08 4:01
mveDave Kreskowiak7-May-08 4:01 
QuestionTracking a file Pin
Zaegra7-May-08 2:09
Zaegra7-May-08 2:09 
AnswerRe: Tracking a file Pin
Dave Kreskowiak7-May-08 3:31
mveDave Kreskowiak7-May-08 3:31 
Zaegra wrote:
I have my own file format, which is registered in HKEY_CLASSES_ROOT.


No, that's no t accurate. You have registered a file extension that's assigned to your .EXE.


Zaegra wrote:
When the user double-clicks on a file of my filetype, my program will start. But, is there any way to get the path of the file that opened my program, so i can load it?


When a user double-clicks a file, the Shell will look up the extension under HKEY_CLASSES_ROOT and find the command line to use to launch the application. This is usually in the format some.exe "%1". The %1 is replaced with the full path of the file that was double-clicked. So, if the user double-clicked, say, C:\my folder\some folder\some file.ext, the command line executed would be:
some.exe "C:\my folder\some folder\some file.ext"

The file path appears as a command line argument to the .EXE. I'm sure you know what a command-line argument is.

If you're using .NET 2.0 (Visual Studio 2005 or above), you can get at the command line arguments by using My.Application.CommandLineArgs.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: Tracking a file Pin
Zaegra7-May-08 4:37
Zaegra7-May-08 4:37 
QuestionFolder/File locking Pin
scorpion king7-May-08 0:53
scorpion king7-May-08 0:53 
AnswerRe: Folder/File locking Pin
Christian Graus7-May-08 0:53
protectorChristian Graus7-May-08 0:53 
AnswerRe: Folder/File locking Pin
scorpion king7-May-08 0:54
scorpion king7-May-08 0:54 
GeneralRe: Folder/File locking Pin
Christian Graus7-May-08 0:57
protectorChristian Graus7-May-08 0:57 
GeneralRe: Folder/File locking Pin
Dave Kreskowiak7-May-08 3:24
mveDave Kreskowiak7-May-08 3:24 
GeneralRe: Folder/File locking Pin
Christian Graus7-May-08 12:07
protectorChristian Graus7-May-08 12:07 
GeneralRe: Folder/File locking Pin
Dave Kreskowiak7-May-08 14:07
mveDave Kreskowiak7-May-08 14:07 
Questionplz give me quick reply Pin
uday divekar7-May-08 0:43
uday divekar7-May-08 0:43 
AnswerRe: plz give me quick reply Pin
Christian Graus7-May-08 0:52
protectorChristian Graus7-May-08 0:52 
GeneralRe: plz give me quick reply Pin
uday divekar7-May-08 1:03
uday divekar7-May-08 1:03 
GeneralRe: plz give me quick reply Pin
Christian Graus7-May-08 1:07
protectorChristian Graus7-May-08 1:07 
GeneralRe: thanx Pin
uday divekar7-May-08 1:12
uday divekar7-May-08 1:12 
GeneralRe: thanx Pin
Christian Graus7-May-08 1:23
protectorChristian Graus7-May-08 1:23 
QuestionExcel sheet Pin
Tauseef A6-May-08 23:57
Tauseef A6-May-08 23:57 
AnswerRe: Excel sheet Pin
Dave Kreskowiak7-May-08 3:22
mveDave Kreskowiak7-May-08 3:22 
QuestionHow to get All Users Shared Document Path Pin
SebFromFrance6-May-08 22:30
SebFromFrance6-May-08 22:30 

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.