473,811 Members | 2,485 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Starting an application from a file

Hello,
My question is: How do I get my application to start by double clicking on a
file. I have made my application to save files with a specific extension.
I associated those files to my application through the standard routine of
windows (double clicking, a pop up menu asks me what application I want to
start this file with etc.). However, if I click on a file, it does start
the application but I do not see the contents of the file. Instead, I need
to go to the "File, Open" menu and re-open the file to get all the data. It
is like clicking on a word document and starting MS Word but it is all
blanc.
Could someone please let me know what I need to add to my application to
read the existing files when I double click them so that I don't need to use
the File-Open menu?
Thank you in advance for the help.
J.C.
Jul 17 '05 #1
2 2917
xyz
Double clicking causes the operating system to launch the application
and it passes the file that you clicked as a parameter. Your
application may be ignoring these start-up parameters.

You can test by typing your command with a parameter from
Start->Run

For example: C:\appdir\app.e xe C:\appdir\file. ext

Your application should check to see if a parameter was specified, and
if so, open the file in the parameter.
If your application can handle this type of invocation, it will
probably work properly when the "file.ext" is double clicked.

xyz
========

On Sun, 02 Nov 2003 00:32:54 GMT, "Jason Charalambides"
<da************ @netscape.com> wrote:
Hello,
My question is: How do I get my application to start by double clicking on a
file. I have made my application to save files with a specific extension.
I associated those files to my application through the standard routine of
windows (double clicking, a pop up menu asks me what application I want to
start this file with etc.). However, if I click on a file, it does start
the application but I do not see the contents of the file. Instead, I need
to go to the "File, Open" menu and re-open the file to get all the data. It
is like clicking on a word document and starting MS Word but it is all
blanc.
Could someone please let me know what I need to add to my application to
read the existing files when I double click them so that I don't need to use
the File-Open menu?
Thank you in advance for the help.
J.C.


Jul 17 '05 #2
Jason Charalambides wrote:
Hello,
My question is: How do I get my application to start by double clicking on a
file. I have made my application to save files with a specific extension.
I associated those files to my application through the standard routine of
windows (double clicking, a pop up menu asks me what application I want to
start this file with etc.). However, if I click on a file, it does start
the application but I do not see the contents of the file. Instead, I need
to go to the "File, Open" menu and re-open the file to get all the data. It
is like clicking on a word document and starting MS Word but it is all
blanc.
Could someone please let me know what I need to add to my application to
read the existing files when I double click them so that I don't need to use
the File-Open menu?
Thank you in advance for the help.
J.C.


See the documentation about how to retreive parameters with the Command
function.

/Z

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d-@ s:- a C++ ULS>++ P L+>+++ E- W++ N++ o? K- w(++)>+++$
!O M- V? PS PE Y+ PGP- t 5 X+ R- tv++ b+ DI D+ G e++ h+ r++ y+
------END GEEK CODE BLOCK------

Jul 17 '05 #3

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

Similar topics

2
2023
by: johnmann56 | last post by:
Hello. I have written a simple image viewer application using C# .NET. It only needs to display one image at a time. When a different program, in C, running on the same machine, does a "system(myfile.a2d2)" call, it automatically starts my image viewer application (using file type association). a2d2 is the image file format, my own. If the C program does the system call again for a different image, I find that it starts a new instance of...
8
2787
by: Dirk | last post by:
Hello, Can anyone tell me what the best way is to prevent an application from starting up twice. Thanks, Dirk
4
1277
by: Jesse | last post by:
Hi, Can anyone suggest how to go about running a windows application from outside the starting form. ie. making a call to the initial form and then showing it. I have tried this using a separate class file with static void Main() { MainForm mf = new MainForm(); mf.Show(); }
2
3867
by: Sara T. | last post by:
I always found that web page written by ASP.NET (VB.NET) generate error when starting at the first times. If I click refresh button on the IE again, it can work as well. What's wrong ? Again if I terminate process aspnet_wp.exe, it will generate again ONLY at the times to read page. Following is the error seen on screen:
4
2430
by: Kristof Despiere | last post by:
Suppose you have one domain, filled with a couple of users. What needs to be done now is I need to start a windows application from a webform by pressing a button on the webform (for example). The problem is that the user who "owns" the service is always the ASPNET account. That's not good since you don't see the actual application (because it's owned by ASPNET). I've tried changed the processmodel section in the machine.config file to...
3
1211
by: Thomas Wenzl [MVP] | last post by:
Hello, Initial situation: - ASP.NET application. - Users upload a file - that file has to be converted into another file format using a unmanged application that uses a lot of COM components What has already worked? - Upload works
7
1329
by: Jason Ratcliffe | last post by:
Hi, We've got a small .net application launcher which is run each time a user connects to our terminal services server instead of the standard shell. We found that it takes a variable amount of time of this application to start. Sometimes it's more or less instant, other times it can be over 15 seconds. My initial thought was that the .Net Framework may not have been loaded, but we have a another .Net application running on the server...
7
2394
by: | last post by:
Hi to everyone! I have an Apache Webserver running on Win2000. I try to start a console application an the server though PHP, with the functions exec() or passthru() but it doesn't work. The application starts though, but doesn't work in the same way I would start it local on the web server (I mean though a "normal doubleclick"). I think it depends on the type of application, cause I ca start with PHP for example other programms and...
4
4604
by: durumdara | last post by:
Hi! My problem is that: The "test.py" is working in every machine that I use except in my home machine. Formerly it worked but now not. I don't know what happened, I searching for some solution. The errormessage is this (after I tried to start test.py under cmd.exe):
0
9728
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10402
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
10135
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...
1
7670
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
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
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
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3018
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.