   Notepad-clone
  I'm making a text editor similar to Notepad in VB.net. Everything works perfectly fine but I would like to add some features to it and therefore have some questions.1. When I right click a text file and choose "Open with Notebook.NET", my program Notebook.NET opens, but the textfile don't. How do I open the textfile at the same time as I open the program (if the user double clicked a .txt-file)?2. Can I let the user choose a standard color and a standard font without using databases (haven't come this far yet)? If no, I'll wait until I come to that chapter.Thank you in advance!   
  1) I have no idea how to do it in VB.Net, but you'll need to parse the command line parameters. Generally the file browser will call your program and follow it with the name of the file. For any more functionality (which you probably won't need...) you'll need to integrate your program with the shell. You probably won't have to, though.2) Yes, you can just open a regular file and store the information there.   ;Quote:Original post by Zyndrof2. Can I let the user choose a standard color and a standard font without using databases (haven't come this far yet)? If no, I'll wait until I come to that chapter.This would be a really good reason to get into XML. Store all of the user configurations on an XML file (use XmlDocument to create it). Generally speaking, you wouldn't store things like user settings in a database. Maybe if you had a lot of users with different settings you would, but for something like this, an XML is just what you need.   ;  In order to parse the command line in C#, you would do the following on the main function of your program:[STAThread]static Main(string[] files){   foreach(string f in files)   { OpenFile(f); break;   }}How that translates into VB.NET I don't know, I always disliked the Visual Basic languages. But I am sure you will be able to figure it out.   ;  what about "argv[]" that was in c?   ;  In .NET, you can do this: -[STAThread]public static void main(string[] args){    int numArguments = args.Length;}Quote:Original post by bywhat about "argv[]" that was in c?By the way, it is 'int argv' in C. What you have there is an array   ;Quote:Original post by rpg_code_masterThis would be a really good reason to get into XML. Store all of the user configurations on an XML file (use XmlDocument to create it). Generally speaking, you wouldn't store things like user settings in a database. Maybe if you had a lot of users with different settings you would, but for something like this, an XML is just what you need.Hmm... XML is 9 chapters away in the book... Guess I will have to wait with the standards until then...Quote:Original post by ussnewjersey4In order to parse the command line in C#, you would do the following on the main function of your program:*** Source Snippet Removed ***How that translates into VB.NET I don't know, I always disliked the Visual Basic languages. But I am sure you will be able to figure it out.Ok, I will make a try translating it.   ;Quote:Ok, I will make a try translating it.I searched around on MSDN, but the only articles that they had on the subject were for C#. Although I did find out that you can use the .NET Environment object, which contains a method to capture the command line. Either way, you will have to figure out how that translates into .NET.Good luck!   ;Quote:Original post by Zyndrof2. Can I let the user choose a standard color and a standard font without using databases (haven't come this far yet)? If no, I'll wait until I come to that chapter.If you just want to let the user select a font or colour while using the program you could use a FontDialog or ColorDialog.;Quote:Original post by ZyndrofOk, I will make a try translating it.The .net version has already been posted by rpg_code_master. That should work in VB.net.   