Click here to Skip to main content
15,902,112 members
Home / Discussions / C#
   

C#

 
GeneralRe: Adding "MyClass" to a WinForm:Where?? Pin
Dave Kreskowiak17-Jun-05 12:24
mveDave Kreskowiak17-Jun-05 12:24 
GeneralRe: Adding "MyClass" to a WinForm:Where?? Pin
...---...17-Jun-05 14:13
...---...17-Jun-05 14:13 
GeneralRe: Adding "MyClass" to a WinForm:Where?? Pin
Colin Angus Mackay17-Jun-05 12:51
Colin Angus Mackay17-Jun-05 12:51 
Answerwild guess Pin
DavidNohejl17-Jun-05 13:29
DavidNohejl17-Jun-05 13:29 
GeneralMy Article Updated Pin
Ahmed Erarslan17-Jun-05 9:04
Ahmed Erarslan17-Jun-05 9:04 
GeneralRe: My Article Updated Pin
Dave Kreskowiak17-Jun-05 10:31
mveDave Kreskowiak17-Jun-05 10:31 
QuestionHow run my application by click of my own file Pin
Sasuko17-Jun-05 8:50
Sasuko17-Jun-05 8:50 
AnswerRe: How run my application by click of my own file Pin
Heath Stewart17-Jun-05 11:23
protectorHeath Stewart17-Jun-05 11:23 
You need to set up a file association and you can do this programmatically by accessing the registry using the Microsoft.Win32.Registry and RegistryKey classes. Read Creating a File Association[^] in MSDN for more details.

If you plan on deploying your application, I suggest you create a Windows Installer project in your solution to install your project output files. You can create file associations in the product by following the direction in File Types Management in Deployment[^] in the Visual Studio .NET product documentation.

When a user double-clicks the file with your registered extension it is passed as the first argument to your Main function, so you could do something like in the following example:
class MainForm
{
  static void Main(string[] args)
  {
    MainForm form = new MainForm();
    if (args.Length > 0) form.OpenDocument(args[0]);
    Application.Run(form);
  }
}


This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft

[My Articles] [My Blog]
GeneralRe: How run my application by click of my own file Pin
Sasuko17-Jun-05 11:41
Sasuko17-Jun-05 11:41 
GeneralArray as parameter in webservice! Pin
myousufq17-Jun-05 8:34
myousufq17-Jun-05 8:34 
Questionwhat is an interface? Pin
Sasuko17-Jun-05 7:36
Sasuko17-Jun-05 7:36 
AnswerRe: what is an interface? Pin
Niklas Ulvinge17-Jun-05 8:21
Niklas Ulvinge17-Jun-05 8:21 
AnswerRe: what is an interface? Pin
Heath Stewart17-Jun-05 11:35
protectorHeath Stewart17-Jun-05 11:35 
Generalcolor coding images Pin
sami_bio@yahoo.com17-Jun-05 6:34
sami_bio@yahoo.com17-Jun-05 6:34 
GeneralRe: color coding images Pin
Heath Stewart17-Jun-05 11:52
protectorHeath Stewart17-Jun-05 11:52 
GeneralProblem with setting focus in an edit box Pin
RichardNN17-Jun-05 6:22
RichardNN17-Jun-05 6:22 
GeneralRe: Problem with setting focus in an edit box Pin
Dave Kreskowiak17-Jun-05 6:36
mveDave Kreskowiak17-Jun-05 6:36 
GeneralRe: Problem with setting focus in an edit box Pin
RichardNN17-Jun-05 7:03
RichardNN17-Jun-05 7:03 
GeneralRe: Problem with setting focus in an edit box (edit) Pin
Luis Alonso Ramos17-Jun-05 8:51
Luis Alonso Ramos17-Jun-05 8:51 
GeneralFind text in a RichTextBox Pin
David_cole17-Jun-05 5:02
David_cole17-Jun-05 5:02 
GeneralRe: Find text in a RichTextBox Pin
Dave Kreskowiak17-Jun-05 5:50
mveDave Kreskowiak17-Jun-05 5:50 
GeneralRe: Find text in a RichTextBox Pin
David_cole17-Jun-05 22:30
David_cole17-Jun-05 22:30 
GeneralRe: Find text in a RichTextBox Pin
Dave Kreskowiak18-Jun-05 13:30
mveDave Kreskowiak18-Jun-05 13:30 
GeneralPass txtComputer.Text to class file Pin
epfuller17-Jun-05 4:52
epfuller17-Jun-05 4:52 
GeneralRe: Pass txtComputer.Text to class file Pin
Dave Kreskowiak17-Jun-05 5:46
mveDave Kreskowiak17-Jun-05 5:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.