|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Launch a program and a function by File TypeHi,
I have created a program which opens up ".pcfs" files, a kind of text file unique to my program. I want to be able to click on these files and have the program launch AND load the contents of the clicked file. I have been able to do the first half. I can click on a .pcfs file and the program comes up. But how do I make the program "see" the clicked file and load it? I'm not even sure what this action is called, and so I haven't found any resources on an internet search. Anybody know how to do this? Thanks in advance. "bidalah" <bida***@yahoo.com> schrieb: Add the code below to an empty ".vb" file, then select 'Sub Main' as startup > I have created a program which opens up ".pcfs" files, a kind of text > file unique to my program. I want to be able to click on these files > and have the program launch AND load the contents of the clicked file. > I have been able to do the first half. I can click on a .pcfs file and > the program comes up. But how do I make the program "see" the clicked > file and load it? object in the project properties. 'OpenFile' can be replaced with your logic used to open and display the file's content. \\\ Public Module Program Public Function Main(ByVal Args() As String) As Integer If Args.Length > 0 Then OpenFile(Args(0)) End If End Function End Module /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> bidalah wrote:
Show quoteHide quote > Hi, You need to look at the command line arguments when your program > > I have created a program which opens up ".pcfs" files, a kind of text > file unique to my program. I want to be able to click on these files > and have the program launch AND load the contents of the clicked file. > I have been able to do the first half. I can click on a .pcfs file and > the program comes up. But how do I make the program "see" the clicked > file and load it? > > I'm not even sure what this action is called, and so I haven't found > any resources on an internet search. Anybody know how to do this? > > Thanks in advance. > launches. The filename and path will be passed in that way. So you just have a function to open the file when it sees a file. Do a search on "vb.net commandline arguments" and you'll get a lot of examples.
Web activation
Using Classes as List Items i can't round SystemIndexOutOfRangeException error using Generics dynamically (?) File upload to website and rezise at the same time ADO.NET 2.0 TableAdapter Configuration Wizard Using a delegate FileSystemWatcher UNC Path Invalid what to use to play sound? |
|||||||||||||||||||||||