Few focused questions
-
Hey all... I know a little C#, I've been working with it for 2 years (still at school, 11th grade), I'm pretty expirienced but still I don't know alot... I'm building all my programs on VC# express, which as you know, has built-in publisher, with built-in installation, well, I wanna do a few things out of the small box it shows me, so here are some questions that I remember now, that I would like answers to them, and appriciate if you would answer, or give me a link for it: 1. How can I register my program in such a way, that the computer will know that files with endings such as what I want(i.e .ysl) will have an icon that I want? 2. How can I register my program in such a way, that I can put an option of "Start with Windows startup"? 3. What is the BEST way to make sure that my program is only run ONCE in the computer, and that no-one will be able to open another copy will the first one is running? 4. How can I open a process (System.Diagnostics.Process), and make sure it's an internet explorer program, such as IE or NetScape no-matter to the program he use (IF statements will be accepted), and open it in a URL I want? 5. How can I tell who implements ICryptoTransform (System.Security.Cryptography.ICryptoTransform) without checking at Microsoft's MSDN for each and every one? and what is the best way to encode (Crypt) my code (what is the best ICryptoTransform implementing class to do it)? 6. Where can I find default icons such as SaveAs... (three discates), Save (one discate), open (folder), new (page) etc...? well... that's enough for now... if I'll remember some more I will ask... THANKS IN ADVANCE FOR ALL THE ANSWERS!!!! -- modified at 15:51 Monday 8th May, 2006
-
Hey all... I know a little C#, I've been working with it for 2 years (still at school, 11th grade), I'm pretty expirienced but still I don't know alot... I'm building all my programs on VC# express, which as you know, has built-in publisher, with built-in installation, well, I wanna do a few things out of the small box it shows me, so here are some questions that I remember now, that I would like answers to them, and appriciate if you would answer, or give me a link for it: 1. How can I register my program in such a way, that the computer will know that files with endings such as what I want(i.e .ysl) will have an icon that I want? 2. How can I register my program in such a way, that I can put an option of "Start with Windows startup"? 3. What is the BEST way to make sure that my program is only run ONCE in the computer, and that no-one will be able to open another copy will the first one is running? 4. How can I open a process (System.Diagnostics.Process), and make sure it's an internet explorer program, such as IE or NetScape no-matter to the program he use (IF statements will be accepted), and open it in a URL I want? 5. How can I tell who implements ICryptoTransform (System.Security.Cryptography.ICryptoTransform) without checking at Microsoft's MSDN for each and every one? and what is the best way to encode (Crypt) my code (what is the best ICryptoTransform implementing class to do it)? 6. Where can I find default icons such as SaveAs... (three discates), Save (one discate), open (folder), new (page) etc...? well... that's enough for now... if I'll remember some more I will ask... THANKS IN ADVANCE FOR ALL THE ANSWERS!!!! -- modified at 15:51 Monday 8th May, 2006
-
sorry for the multiple posting, the site said and error and I thought it didn't post it, if the admin can erase one please, but leave one also, that would be lovely :D ... thanks...
This happens from time to time. You can erase your postings on your own. There is a delete link at the right side of bottom edge.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
Hey all... I know a little C#, I've been working with it for 2 years (still at school, 11th grade), I'm pretty expirienced but still I don't know alot... I'm building all my programs on VC# express, which as you know, has built-in publisher, with built-in installation, well, I wanna do a few things out of the small box it shows me, so here are some questions that I remember now, that I would like answers to them, and appriciate if you would answer, or give me a link for it: 1. How can I register my program in such a way, that the computer will know that files with endings such as what I want(i.e .ysl) will have an icon that I want? 2. How can I register my program in such a way, that I can put an option of "Start with Windows startup"? 3. What is the BEST way to make sure that my program is only run ONCE in the computer, and that no-one will be able to open another copy will the first one is running? 4. How can I open a process (System.Diagnostics.Process), and make sure it's an internet explorer program, such as IE or NetScape no-matter to the program he use (IF statements will be accepted), and open it in a URL I want? 5. How can I tell who implements ICryptoTransform (System.Security.Cryptography.ICryptoTransform) without checking at Microsoft's MSDN for each and every one? and what is the best way to encode (Crypt) my code (what is the best ICryptoTransform implementing class to do it)? 6. Where can I find default icons such as SaveAs... (three discates), Save (one discate), open (folder), new (page) etc...? well... that's enough for now... if I'll remember some more I will ask... THANKS IN ADVANCE FOR ALL THE ANSWERS!!!! -- modified at 15:51 Monday 8th May, 2006
3. Search for "single instance" here on Code Project. There are some articles covering this topic. (By the way this should be done everytime before asking a question in the forum). 1. I think there are articles too which cover this topic. 2. Where do you want to put this option? If you want to start your application with windows startup, simply create an appropriate link in the Autostart folder of startmenu. 4.
Process.Start("www.troschuetz.de");
//Opens URL with standard browser 6. Not sure, but maybe searching for "*.ico" on C-partition brings some results. Also googling for "ico" or "icon" and "SaveAs", "Save" or ... may be worth a try.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
Hey all... I know a little C#, I've been working with it for 2 years (still at school, 11th grade), I'm pretty expirienced but still I don't know alot... I'm building all my programs on VC# express, which as you know, has built-in publisher, with built-in installation, well, I wanna do a few things out of the small box it shows me, so here are some questions that I remember now, that I would like answers to them, and appriciate if you would answer, or give me a link for it: 1. How can I register my program in such a way, that the computer will know that files with endings such as what I want(i.e .ysl) will have an icon that I want? 2. How can I register my program in such a way, that I can put an option of "Start with Windows startup"? 3. What is the BEST way to make sure that my program is only run ONCE in the computer, and that no-one will be able to open another copy will the first one is running? 4. How can I open a process (System.Diagnostics.Process), and make sure it's an internet explorer program, such as IE or NetScape no-matter to the program he use (IF statements will be accepted), and open it in a URL I want? 5. How can I tell who implements ICryptoTransform (System.Security.Cryptography.ICryptoTransform) without checking at Microsoft's MSDN for each and every one? and what is the best way to encode (Crypt) my code (what is the best ICryptoTransform implementing class to do it)? 6. Where can I find default icons such as SaveAs... (three discates), Save (one discate), open (folder), new (page) etc...? well... that's enough for now... if I'll remember some more I will ask... THANKS IN ADVANCE FOR ALL THE ANSWERS!!!! -- modified at 15:51 Monday 8th May, 2006
1. Create some registry entries under HKEY_CLASSES_ROOT:
This can all be done programatically, but it takes some work. Look at the Microsoft.Win32 namespace for registry manipulation functions.
- Create a key by the name of the file extension you want
- Set the default attribute of this key to a word that describes your program. It's name doesn't really matter.
- Create a key by the name of the word you decided on in step 2.
- Create some subkeys: 'DefaultIcon' and 'shell'
- Set the default attribute of the DefaultIcon key to the path of your icon. If you want to use the the same icon
as your executable, do something like this:c:\code\mysupercoolapp\exefile.exe,0
- Create a 'open' subkey under 'shell' and a 'command' subkey under open
- Set the default attribute of the 'command' key to the path of your program (include the %1)
c:\code\mysupercoolapp\exefile.exe %1
- Restart
- When a file with the extension you've picked is double-clicked, your application will run.
The first argument will be the path of the file.
2. You can put a link in the startup folder of the start menu, or add a registry entry to either HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run (if you want it to run whenever the computer starts) or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run (if you want it to run whenever only the current user logs on) 3. As the other post-er said, search for "single instance" 4. System.Diagnostics.Process.Start("http://www.myurl.com"); will open the url in the default web browser 5. I should read up on cryptography 6. They are in a zip file in Visual Studio's program folder: C:\Program Files\Microsoft Visual Studio 8\Common7\VS2005ImageLibrary\VS2005ImageLibrary.zip (or similar) Hope this helps, DigitalKing
-
1. Create some registry entries under HKEY_CLASSES_ROOT:
This can all be done programatically, but it takes some work. Look at the Microsoft.Win32 namespace for registry manipulation functions.
- Create a key by the name of the file extension you want
- Set the default attribute of this key to a word that describes your program. It's name doesn't really matter.
- Create a key by the name of the word you decided on in step 2.
- Create some subkeys: 'DefaultIcon' and 'shell'
- Set the default attribute of the DefaultIcon key to the path of your icon. If you want to use the the same icon
as your executable, do something like this:c:\code\mysupercoolapp\exefile.exe,0
- Create a 'open' subkey under 'shell' and a 'command' subkey under open
- Set the default attribute of the 'command' key to the path of your program (include the %1)
c:\code\mysupercoolapp\exefile.exe %1
- Restart
- When a file with the extension you've picked is double-clicked, your application will run.
The first argument will be the path of the file.
2. You can put a link in the startup folder of the start menu, or add a registry entry to either HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run (if you want it to run whenever the computer starts) or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run (if you want it to run whenever only the current user logs on) 3. As the other post-er said, search for "single instance" 4. System.Diagnostics.Process.Start("http://www.myurl.com"); will open the url in the default web browser 5. I should read up on cryptography 6. They are in a zip file in Visual Studio's program folder: C:\Program Files\Microsoft Visual Studio 8\Common7\VS2005ImageLibrary\VS2005ImageLibrary.zip (or similar) Hope this helps, DigitalKing
-
1. Create some registry entries under HKEY_CLASSES_ROOT:
This can all be done programatically, but it takes some work. Look at the Microsoft.Win32 namespace for registry manipulation functions.
- Create a key by the name of the file extension you want
- Set the default attribute of this key to a word that describes your program. It's name doesn't really matter.
- Create a key by the name of the word you decided on in step 2.
- Create some subkeys: 'DefaultIcon' and 'shell'
- Set the default attribute of the DefaultIcon key to the path of your icon. If you want to use the the same icon
as your executable, do something like this:c:\code\mysupercoolapp\exefile.exe,0
- Create a 'open' subkey under 'shell' and a 'command' subkey under open
- Set the default attribute of the 'command' key to the path of your program (include the %1)
c:\code\mysupercoolapp\exefile.exe %1
- Restart
- When a file with the extension you've picked is double-clicked, your application will run.
The first argument will be the path of the file.
2. You can put a link in the startup folder of the start menu, or add a registry entry to either HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run (if you want it to run whenever the computer starts) or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run (if you want it to run whenever only the current user logs on) 3. As the other post-er said, search for "single instance" 4. System.Diagnostics.Process.Start("http://www.myurl.com"); will open the url in the default web browser 5. I should read up on cryptography 6. They are in a zip file in Visual Studio's program folder: C:\Program Files\Microsoft Visual Studio 8\Common7\VS2005ImageLibrary\VS2005ImageLibrary.zip (or similar) Hope this helps, DigitalKing
-
the Process.Start("http://..."); method is opening the URL in the already opened browsers, how can I turn it to new browsers?
There's no good way to accomplish this, as it is the user's preference. For example, in firefox, the user can select whether to load newly opened pages in the current tab, or a new tab.