473,763 Members | 6,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File Association with my WinForms application

Hi Everyone,

I have a backup application I'm working on that saves backups with an
extension of .ABF.

I have figured out how to make the association change with PInvoke/shell32,
but would like some advice on how to handle the file passed as an arguement
to my WinForms application.

I was thinking about changing the application to a console application with
something like main( args()) as the entry point, testing to see if the args
passed were null and proceeding from there by either showing the main form
or showing the restore form.

Is there a better way of doing this somewhere using the application events
of my WinForms application?

Thanks in advance.

Chris
Aug 30 '06 #1
1 1864
Hi Everyone,

It looks like I found a solution with a little bit of digging:

http://www.vbdotnetheaven.com/Upload...mFileType.aspx

or

http://www.planet-source-code.com/vb...4962&lngWId=10
Chris

"Chris" <co***********@ nospam.yahoo.co mwrote in message
news:%2******** *******@TK2MSFT NGP05.phx.gbl.. .
Hi Everyone,

I have a backup application I'm working on that saves backups with an
extension of .ABF.

I have figured out how to make the association change with
PInvoke/shell32, but would like some advice on how to handle the file
passed as an arguement to my WinForms application.

I was thinking about changing the application to a console application
with something like main( args()) as the entry point, testing to see if
the args passed were null and proceeding from there by either showing the
main form or showing the restore form.

Is there a better way of doing this somewhere using the application events
of my WinForms application?

Thanks in advance.

Chris

Aug 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
486
by: Justin F | last post by:
I have set up file association for my application (VB.Net). I'm having problems getting the filename that was double-clicked. On my machine at work, if the filename being passed in to the application has spaces in any of the folder names, they get split up at every space. This happens regardless if I use a Sub Main(ByVal args() as String) or use System.Environment.GetCommandLineArgs(). For example, if I launch a file that's on my...
2
2133
by: Mark | last post by:
I have a windows 2000 PC and it does not know what a hta file is. any ideas. Mark
4
2613
by: Rob | last post by:
I have an Access application that allows users to open up certain files from within Access (.doc files with automation, .pdf's with a pdf viewing form). Other formats, we want to use Internet Explorer to show, using a plug-in). THis works fine as long as they have the plug-in installed. If they don't have the plug-in, when I try to open the file with IE, it gives the old "Would you like to OPEN this file or SAVE it to disk?" and it...
1
4475
by: JerryP | last post by:
Hi Experts, from my program I offer the user to launch different files from a directory (normaly in this directory are .txt files) - but sometimes other files may be in there - so if my program receives the "no program associated" I would like to launch the standard Windows dialogue that pops up when double clicking a file in windows explorer that has no association. Thanks for any hints !
1
4433
by: Allen | last post by:
I have installed the Updater Application Block, and then I should Deploy the QuickStarts. " Install the QuickStarts After you install the Updater Application Block, you should install the QuickStart applications by using the Deploy QuickStarts option on the QuickStarts submenu. This creates the Web folders required by the QuickStart samples. You can remove the QuickStarts from your computer by using the Uninstall QuickStarts option on...
6
1766
by: Nak | last post by:
Hi there, I am implementing file association from within my application, association that occurs after installation. Anyway, I remember a while back seeing a key in the registry that was used to store the previous registered application to an extension, but I can't for the life of me find out what the exact key was called, I *think* it was "Previous" or something like this. Anyway, what it means is that my application could restore the...
4
3076
by: Shil | last post by:
Hi, In VC++.Net 2005 visual studio, if I create a new winform drag and drop a button, then double click it to write click event code, then it auto generates the template code for the event in Form1.h file rather than Form1.cpp file. This behaviour is against standard C++ coding standards, where my header file is supposed to just have declarations. I read in other topics that this is due to C# association of single file concept with the...
2
2302
by: Robert W. | last post by:
With a WinForms app I know how to configure the registry to understand a specific file association so that it is associated with a given application. But how does one do this with a web browser? Say that one creates a new file type called ".abc". If the user clicks on a ".abc" file on a web page, how does one tell both Internet Explorer and Mozilla Firefox to utilize a specific WinForms app if the user chooses "Open"? --
1
1891
by: =?Utf-8?B?S2VuIExlbWlldXg=?= | last post by:
I've deployed, successfully, several Clickonce applications. The problem I have is the negative reaction to my software when a user attempts to open a file and no association exists between the file and the application. Now I understand the technical’s of why it currently isn't possible to do this 'out of the box' with Clickonce, and I don't like the con's associated with creating the association programmatically. But my reality is:...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9937
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.