473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

When i choose avi->open with->mycsharp.exe in explorer how I get

I have a Windows Forms Application.
When I choose avi->open with->mycharp.exe in explorer how I can get the path
and the filename of the avi.
Currently the static void main looks like:

static void Main()
{
Application.Run(new Form1());
}

must I make a new Constructor Form1(string filename)? But than i dont know
how to make the static void main funktion.


Nov 16 '05 #1
2 1151
"Bilo" <ju********@yahoo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have a Windows Forms Application.
When I choose avi->open with->mycharp.exe in explorer how I can get the path and the filename of the avi.
Currently the static void main looks like:

static void Main()
{
Application.Run(new Form1());
}

must I make a new Constructor Form1(string filename)? But than i dont know
how to make the static void main funktion.


Go ahead and add a new constructor to your form. Then try this:

static void Main(string[] args)
{
if (args.Length > 0)
Application.Run(new Form1(args[0]));
}

Erik
Nov 16 '05 #2
Thx that you have take the time to help me.
This looks good.

"Erik Frey" <er*******@hotmail.com> schrieb im Newsbeitrag
news:ua**************@TK2MSFTNGP10.phx.gbl...
"Bilo" <ju********@yahoo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have a Windows Forms Application.
When I choose avi->open with->mycharp.exe in explorer how I can get the

path
and the filename of the avi.
Currently the static void main looks like:

static void Main()
{
Application.Run(new Form1());
}

must I make a new Constructor Form1(string filename)? But than i dont know how to make the static void main funktion.


Go ahead and add a new constructor to your form. Then try this:

static void Main(string[] args)
{
if (args.Length > 0)
Application.Run(new Form1(args[0]));
}

Erik

Nov 16 '05 #3

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

Similar topics

2
by: Éric GARANT | last post by:
Hello everyone, I can't open ASP documents with Windows 2000 Pro french version SP4 + IE6.0 SP1 + IIS 5.0. When I click an ASP file, it's FrontPage 2000 that opens it. If I choose Open With......
13
by: Julia Peterwitz | last post by:
I have a function that works with explorer but not with netscape. The problem is the function at line 5. 1 fSetSelectedDay(myElement){ 2 /* 3 ... 4 */ 5 var elementText =...
4
by: Daniel Miller | last post by:
I have developed a simple text editing program using Windows Forms. I want to be able to right-click on a text file, choose "Open With" and select my program from the list to open the file, but I...
2
by: mimi | last post by:
I get the project from sourcesafe to my computer. The path is as c:\inetpub\wwwroot\mywebproject, I set it to be virtual directory. When I choose open -> project from web, there is nothing under...
1
by: kriani | last post by:
Hello everyone, I can't open ASP documents with Windows XP Pro SP2 IE6.0 + IIS 5.0. When I click an ASP file, it's macromedia mx 2004 that opens it. If I choose Open With... Internet Explorer,...
1
by: ashie | last post by:
i'm getting mad after this.. i have this code that goes well in firefox but not in explorer. the code make a flash appear and do something and when i run it the flash doesn't appear at the...
4
by: pcaisse | last post by:
I'm having issues sharing global variables with Explorer. This problem probably has a simple answer (as with most newbie questions). The script.pl file: #!/usr/bin/perl -w use strict; use...
4
by: tshad | last post by:
How do you deal with sessions on IE7? Each tab seems to share the same session? This is a real problem as a person could go to the site, leave the site open and open another page and be still...
3
by: Salad | last post by:
I have 2 apps; one written in A97, the other in A2003. If I open an app in A97 then close it, then open Explorer and dbl-click on the A2003 mdb, I'm informed it's an unrecognized format. If I...
17
by: may bailey | last post by:
Hi all, I have been trying to use a show / hide script on my web site but when I click on the "hide" button there occurs an error with explorer 7. The web site starts to go down =) and there...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.