Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
* * * * * 1 votes

A Simple Notepad In C#

streamwriter

  • Please log in to reply
36 replies to this topic

#13 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 31 January 2009 - 04:24 PM

From this limited view, it looks great! I would +rep if I could from the mobile client.

Posted via CodeCall Mobile
  • 0

#14 guyvdv

guyvdv

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 08 March 2009 - 05:29 AM

Hello there,
I am een very new newbie and 71 years old.
Thanks for the excellent tutorial, I followed all but have a error
-------------------------------------------
Error 1 The name 'prntDoc_PrintPage' does not exist in the current context C:\Documents and Settings\Guy\My Documents\Visual Studio 2008\Projects\NotePad\NotePad\Form1.cs 71 75 NotePad
------------------------------------------
At the function PrintPrevieuw
----------------------------------------------

Can you help me

and what does mean +rep that i saw several times ??

Thanks again

Guy van der Velden
  • 0

#15 Kierien

Kierien

    CC Regular

  • Member
  • PipPipPip
  • 30 posts

Posted 10 March 2009 - 10:36 PM

It should be PrintPreview.
  • 1

#16 guyvdv

guyvdv

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 11 March 2009 - 01:21 AM

private void printPreviewToolStripMenuItem_Click(object sender, EventArgs e)
  {
   System.Drawing.Printing.PrintDocument prntDoc = new System.Drawing.Printing.PrintDocument();


   //Declare preview as a new PrintPreviewDialog
   PrintPreviewDialog preview = new PrintPreviewDialog();
   //Declare prntDoc_PrintPage as a new EventHandler for prntDoc's Print Page
   prntDoc.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(prntDoc_PrintPreview);
   //Set the PrintPreview's Document equal to prntDoc
   preview.Document = prntDoc;
   //Show the PrintPreview Dialog
   if (preview.ShowDialog(this) == DialogResult.OK)
   {
    //Generate the PrintPreview
    prntDoc.Print();
   }
  }
-----------------------------------------------------------------------------
Hello K.

prntDoc_PrintPreview does not fonction, als your
prntDoc_PrintDoc does not fonction
Please review your code en help me
Guy van der Velden

Edited by WingedPanther, 11 March 2009 - 08:35 AM.
add code tags (the # button)

  • 0

#17 MrJoey

MrJoey

    CC Newcomer

  • Just Joined
  • PipPip
  • 15 posts

Posted 21 March 2009 - 12:58 PM

Very good tutorial! I've completed it, saved it and built it etc but I can't find any .exe file where I saved it.. only the .cs files and a .net managed resource file. I have the latest framework installed and the program runs succesfully within visual c#.. any idea why this is happening? Please bare in mind I'm very new to c# and programming overall.

Thanks in advance.

EDIT:

I've found the .exe and it runs fine but none of the fuctions (save, save as, copy, etc) work, nothing happens.

EDIT 2!: Nevermind, sorted now..

Great tutorial!

Edited by MrJoey, 21 March 2009 - 02:13 PM.

  • 0

#18 killcode

killcode

    CC Resident

  • Just Joined
  • PipPipPipPip
  • 93 posts

Posted 30 May 2009 - 05:49 AM

Thanks :D, +rep
  • 0
Posted Image

#19 chili5

chili5

    CC Mentor

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3038 posts
  • Programming Language:Java, C#, PHP, JavaScript, Ruby, Transact-SQL
  • Learning:C, Java, C++, C#, PHP, JavaScript, Ruby, Transact-SQL, Assembly, Scheme, Haskell, Others

Posted 30 May 2009 - 07:29 AM

Nice, the screen shots are really blurry though.
  • 0

#20 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 30 May 2009 - 05:21 PM

Just two of them. What caused that?
  • 0

#21 Kierien

Kierien

    CC Regular

  • Member
  • PipPipPip
  • 30 posts

Posted 01 June 2009 - 07:48 AM

I kinda did it on purpose. To emphasize the ones that are needed.
  • 0

#22 jiveshwar

jiveshwar

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 08 July 2009 - 07:56 PM

Brother, you are really a true helper.
GOD BLESS YOU.
  • 0

#23 tossy

tossy

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 180 posts

Posted 08 July 2009 - 11:31 PM

Nice work.... I like it very much it helps me a lot.
  • 0
Microsoft: "You've got questions. We've got dancing paperclips
<a href="http://www.getzephyr.com">Test Management</a>

#24 Gemini

Gemini

    CC Lurker

  • Just Joined
  • Pip
  • 8 posts
  • Programming Language:C#, PHP
  • Learning:C#, PHP

Posted 19 July 2009 - 11:39 AM

People should always write their code like this.
You made a few mistakes though.
  • 0





Also tagged with one or more of these keywords: streamwriter