Click here to Skip to main content
15,891,704 members
Home / Discussions / C#
   

C#

 
QuestionOfficeApp (Word, Excel, Outlook) as MdiChild in my MdiForm ? Pin
Chris Richner27-Jan-03 22:38
Chris Richner27-Jan-03 22:38 
GeneralSave a drawing on the disk Pin
moshu27-Jan-03 22:31
moshu27-Jan-03 22:31 
GeneralRe: Save a drawing on the disk Pin
Heath Stewart28-Jan-03 3:56
protectorHeath Stewart28-Jan-03 3:56 
GeneralOpen MSProject2000 inside a windows form Pin
Member 20085527-Jan-03 17:06
Member 20085527-Jan-03 17:06 
GeneralCall DLL From C#app OK. But SOAP no. Pin
Dato27-Jan-03 15:14
Dato27-Jan-03 15:14 
GeneralBest Way to Move very Large Float[,] across TCP/IP Pin
Deane27-Jan-03 14:04
Deane27-Jan-03 14:04 
GeneralRe: Best Way to Move very Large Float[,] across TCP/IP Pin
Nathan Blomquist27-Jan-03 17:51
Nathan Blomquist27-Jan-03 17:51 
GeneralRe: Best Way to Move very Large Float[,] across TCP/IP Pin
Deane27-Jan-03 18:12
Deane27-Jan-03 18:12 
GeneralRe: Best Way to Move very Large Float[,] across TCP/IP Pin
Nathan Blomquist28-Jan-03 14:57
Nathan Blomquist28-Jan-03 14:57 
Generalcopy paste problems with MDI Pin
Gerosa27-Jan-03 6:45
Gerosa27-Jan-03 6:45 
General1 FCL question and 1 general question Pin
Q&A27-Jan-03 6:28
Q&A27-Jan-03 6:28 
GeneralRe: 1 FCL question and 1 general question Pin
Richard Deeming27-Jan-03 7:02
mveRichard Deeming27-Jan-03 7:02 
GeneralFile Actions Pin
Waleed Zedan27-Jan-03 4:26
Waleed Zedan27-Jan-03 4:26 
GeneralRe: File Actions Pin
jtmtv1827-Jan-03 13:05
jtmtv1827-Jan-03 13:05 
you will probally need to work with The Environment.GetCommandLineArgs();
command....this is a exsample from my program..it may work for you maybe not. if you want more help or questions about this code...(i tryed to mark it atleast kinda clear) email me at res1s5yd@verizon.net
oh and too set up your program too load as the default for that specific file typ try looking in HKEY_CLASSES_ROOT in the registry.... goto txtfile for a hint.

jesse M

<br />
<br />
 String[] arguments = Environment.GetCommandLineArgs();<br />
             //Console.WriteLine("GetCommandLineArgs: {0}", String.Join(", ", arguments));<br />
            int count =0;<br />
            foreach(string jr2 in Environment.GetCommandLineArgs()){ <br />
                count++;<br />
                string ComandArgs = jr2.ToLower();<br />
                int[] jr = new int[]{1};<br />
                    try{<br />
                        if(count !=1){<br />
                           //make sure this isnt the first time through because the it always returns the name of the program running and the directory i.e it will show as a command line arg "c:\myprogram\nettext.exe"<br />
<br />
                            switch(ComandArgs.Replace("-","")){<br />
                                <br />
                                case "fullscreen":<br />
                                            FullScreenFlag=1;<br />
                                            break;<br />
                                case "min":<br />
                            		    FullScreenFlag= -1;<br />
                                            //FullScreenFlag = a int value<br />
                                            break;<br />
                                <br />
                                default:<br />
                                		if(File.Exists(ComandArgs.Replace("-","")))//check if program was opend through a association with a file then write your code too open it.<br />
 {<br />
          LoadFileOnStart = ComandArgs.Replace("-","");<br />
          //LoadFileOnStart is a String that Holds the Filename/path  ie. C:\anything\anything.exe<br />
          break;<br />
 }<br />
MessageBox.Show("Invalid CommandLine Arguments..\n\nYou Wrote : "+ComandArgs.Replace("-","")+"\n\nValid Command line Arguments are : \"fullscreen\" To Load FullScreen on startup, \"dcheck\" To Disable Registry Check on Startup, \"min\", To run program minmized. \nSpace is required after each Paremeter","Invalid Paremeters",0,MessageBoxIcon.Warning);<br />
<br />

before my program load's i added the following code to adjust acording too the command like args
<br />
switch(FullScreenFlag){<br />
            //1 = fullscreen<br />
            //-1 = minimized<br />
            //0 = defaults<br />
            case 1:<br />
                    this.WindowState=FormWindowState.Maximized;<br />
                    break;<br />
            case -1:<br />
                    <br />
                    this.WindowState= FormWindowState.Minimized;<br />
                    break;<br />
            case 0:<br />
                   //no arg's sent                    <br />
                   break;<br />
            }<br />

hope...it helped a little......
GeneralSetting mouse position using C# Pin
ahpex27-Jan-03 4:15
ahpex27-Jan-03 4:15 
GeneralRe: Setting mouse position using C# Pin
Philip Fitzsimons27-Jan-03 6:12
Philip Fitzsimons27-Jan-03 6:12 
GeneralCalling DLL File In C# Pin
mo7amed27-Jan-03 4:13
mo7amed27-Jan-03 4:13 
GeneralRe: Calling DLL File In C# Pin
Nick Parker27-Jan-03 5:27
protectorNick Parker27-Jan-03 5:27 
GeneralRe: Calling DLL File In C# Pin
Dato27-Jan-03 8:23
Dato27-Jan-03 8:23 
QuestionCalling COM DLL From C#? Bad idea ? Pin
Dato27-Jan-03 4:07
Dato27-Jan-03 4:07 
AnswerRe: Calling COM DLL From C#? Bad idea ? Pin
Nick Parker27-Jan-03 5:30
protectorNick Parker27-Jan-03 5:30 
GeneralCrippled WNDPROC Pin
Roger Alsing27-Jan-03 3:54
Roger Alsing27-Jan-03 3:54 
GeneralRe: Crippled WNDPROC Pin
Jeff J27-Jan-03 11:59
Jeff J27-Jan-03 11:59 
GeneralVB.Net code to C#.Net code Pin
Firas Rashid27-Jan-03 3:38
Firas Rashid27-Jan-03 3:38 
GeneralRe: VB.Net code to C#.Net code Pin
Philip Fitzsimons27-Jan-03 6:12
Philip Fitzsimons27-Jan-03 6:12 

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.