Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

C# Windows Forms - project for school

C# encryption

  • Please log in to reply
6 replies to this topic

#1 gibsray

gibsray

    CC Newcomer

  • Member
  • PipPip
  • 10 posts
  • Programming Language:C, C#, Assembly
  • Learning:C, C#, Assembly

Posted 07 September 2012 - 09:43 AM

Hi.
I need to make a big project for school and I think about making an encryption program.
I'll do the program using windows forms application even though I'm not familiar with it (in school we only learned console), so first question is what is the best way to make the menu for the program? I started by making a form with a "start" button and "exit" button and if "start" is pressed then a new panel appears (at this moment with a single label "The program"). Is this a good way?
I also wanted to ask, how can I get a text file from a user (with the "browse" button (like when you upload something to a site)), the user needs to choose the file he wants from all the files on the computer and the program will return a new text file after it encrypted the user's file.
Thanks you and sorry for the long post.

p.s. if someone has good tutorials/books on windows forms or encryption of text file or of pictures, i'll be glad if you could share it.
  • 0

#2 gregwarner

gregwarner

    Obi Wan of Programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1586 posts
  • Location:Arkansas
  • Programming Language:C, Java, C++, C#, PHP, Transact-SQL

Posted 07 September 2012 - 12:02 PM

Here are a couple tutorials I found for using the built-in file browser dialog for getting a file from the user:
http://www.dotnetper.../openfiledialog

  • 1

ti-99-sig.png
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#3 crokett

crokett

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 109 posts
  • Programming Language:C#, Perl
  • Learning:C#, Perl, Transact-SQL

Posted 07 September 2012 - 12:16 PM

Does it have to be Windows Forms or can you use WPF? I have used both. Forms are slightly easier to start with but WPF is much more powerful
  • 0

#4 gregwarner

gregwarner

    Obi Wan of Programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1586 posts
  • Location:Arkansas
  • Programming Language:C, Java, C++, C#, PHP, Transact-SQL

Posted 07 September 2012 - 12:24 PM

Here's a resource if you wanna do it in WPF:
http://msdn.microsof...y/aa969773.aspx
  • 0

ti-99-sig.png
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#5 gibsray

gibsray

    CC Newcomer

  • Member
  • PipPip
  • 10 posts
  • Programming Language:C, C#, Assembly
  • Learning:C, C#, Assembly

Posted 08 September 2012 - 04:27 AM

Thanks, these tutorials are exactly what I needed.
and about the menu, is it good to use panels for each option or is it better to use multiple forms?
  • 0

#6 gregwarner

gregwarner

    Obi Wan of Programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1586 posts
  • Location:Arkansas
  • Programming Language:C, Java, C++, C#, PHP, Transact-SQL

Posted 10 September 2012 - 05:43 AM

That completely depends on your application and how you want it to be designed. I can't say what's "best" since I don't know your program or your intended audience. Just keep in mind that simplicity is almost always better than complexity, and make sure the layout "makes sense" to your intended audience.
  • 0

ti-99-sig.png
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#7 Tonchi

Tonchi

    Helping the world with programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1249 posts
  • Location:Zagreb
  • Programming Language:C#, Others
  • Learning:C, C++, Python, JavaScript, Transact-SQL, Assembly

Posted 10 September 2012 - 05:52 AM

Thanks, these tutorials are exactly what I needed.
and about the menu, is it good to use panels for each option or is it better to use multiple forms?

Since you want to work with Windows Forms I suggest you to look for some tutorials which covers basic WinForms controls. It is easy to drag and drop them on your form, but you have to learn how to interact with them. If you are familiar with events then make next. Make a Start window and when you click on a button clean everything from that form and put new controls on it. That is a good suggestion since that would give you less slow application. If you want from application to make a new form based on clicked button it will only eat your memory because your Start form will still be active in your memory.
  • 0

Microsoft Student Partner, Microsoft Certified Professional






Also tagged with one or more of these keywords: C#, encryption

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download