RE: Opening multiple files with my applicaton
- From: Family Tree Mike <FamilyTreeMike@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 26 Dec 2007 08:10:00 -0800
"kimiraikkonen" wrote:
Hi,
I have an app which has a listbox and when i double click an
associated fileS, i want their paths to be added into listbox in my
application.
This code works good when i try to open a "single" file with my app
which works to get commandline arguments to get file paths:
Dim cla As String() = Environment.GetCommandLineArgs()
If cla.Length > 1 Then
ListBox1.Items.Add(cla(1))
End if
But this doesn't work while opening more than one files at the same
time.
You are only adding the first item from the command line. Change your code
to:
Dim cla As String() = Environment.GetCommandLineArgs()
Dim idx as Integer
If cla.Length > 1 Then
for idx = 1 to (cla.Length-1)
ListBox1.Items.Add(cla(idx))
next idx
endif
.
- Follow-Ups:
- Re: Opening multiple files with my applicaton
- From: kimiraikkonen
- Re: Opening multiple files with my applicaton
- References:
- Opening multiple files with my applicaton
- From: kimiraikkonen
- Opening multiple files with my applicaton
- Prev by Date: Re: a little help in bluetooth
- Next by Date: Re: Help.ShowHelp(Me, tempFileFullPath, "Shortcuts.htm") does not work
- Previous by thread: Re: Opening multiple files with my applicaton
- Next by thread: Re: Opening multiple files with my applicaton
- Index(es):
Relevant Pages
|