No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
9 Posted Topics
I've been away from my C# programming course now for months and am very rusty to say the least. My assignment calls for the creation of a MDI text editor project. I am currently having trouble in coding such that the child form containing a rich text box is recognized … | |
Re: Add a printDocument1 component to your form. You also will of course have a button or menu tool strip item for 'print'. you code the 'print' button to call the printDocument1.Print() method. [CODE] private void printButton_Click(object sender, System.EventArgs e) { printDocument1.Print(); // Note: You could also code a print preview … | |
Re: Add a menuStrip and an openFileDialog to your form from the toolbox. Add an 'Open File' tool strip menu item. Your code for selecting the file to open may be something like this: [CODE] private void OpenFileToolStripMenuItem_Click(object sender, System.EventArgs.e) { // Open the file. DialogResult responseDialogResult; // Begin in the … | |
Re: Davie, in case you haven't a subscription to the above link's site. In your new form go to 'Project' on the command menu, choose 'Add Existing Item', go to the project containing the form you wish to add and select its .cs file and then click 'Add'. | |
A practice exercise requires the creation of a text file with 4 lines of info for cars, VIN, model, manufacturer, and year repeated over and over for different vehicles. This I do with StreamWriter and have a simple multiline text file as follows: 111111 Echo Toyota 2005 222222 Accord Honda … | |
Re: StreamReader.ReadLine() reads one line at a time. If you want multiple lines you will have to loop through the data. Or, depending on the program, you may be able to do the event multiple times reading one line of text each time. | |
I joined this forum a few days ago and thought I should introduce myself. I'm a student of the VS C# (2008) programming language and new to programming in general. At 57 years of age I'm finding the initial learning curve rather steep especially since I'm doing my studies via … | |
Re: Momerath hit the nail on the head. In the C# course I'm presently doing, meaningful names and liberal commenting are stressed to no end. As is sensible code structure such as declaring block variables at the top of the methods for easy finding. Might help to bang heads with partners … | |
Greetings to all, Wondering if someone can help me with a basic VS C# problem? Help much appreciated. I can read my plain text file into an array and display one line at a time on the console with this code. int indexInt = 0; string fileString = ""; string[] … |
The End.