VB Setup Projects File Associations, Port communication, & the .NET compact framework
I have recently acquired the Visual Basic .NET 2003 software (to begin programming, I went through the Visual Basic .NET Step by Step book), and have some questions about VB .NET programming that I could not find answers to in the help files. If anyone can answer these questions, some samples in code would be very helpful too. The questions are:
1. VB Setup Projects File Associations: I have been trying to create file associations (using a setup project) so that when a file is opened via Windows Explorer (say a text file: file1.txt) it will start with my program and the program will show the file chosen. The trouble I am having is that I can't find out how to make the program recognise and open the file selected in Explorer. The only thing that happens when I double click a file is that my program starts, but without showing the file. I think this is something to do with Actions, but where do I put the code, and how do I make it open the file selected??? Basically, what do I do?
Here are the other questions:
2. Port communication: Is there any way to communicate directly with ports (i.e.. the sockets at the back of the computer) that is not too complicated (like I think writing driver software would be)? I am thinking of making an electronic device to be controlled by the computer, so no current software would recognise it.
3. .NET Compact framework: Would the .NET compact framework be suitable for desktop computers where installation size is important? If so, how do I obtain it (for redistribution)?
If this is not descriptive enough, please tell me what else you need to know. I have tried many people, but nobody has been able to help.
Thank you for your assistance.
Console vs. Windows Forms File association
I have got File associations working with Console Applications, but when I try using Command() in the Windows Forms enviroment I get the following error message:
'System.Windows.Forms.Command' is not available in this context because it is 'Private'.
Do you know how to get Command() (or it's equivelant) to work with Windows forms? :confused:
'This is the code I typed above the 'Windows Forms Designer Generated Code' Region
'of Form1 (the startup form)
Dim filename As String = Command()