My First VS2005 C# App: MSNBC Newspaper App


I finally got around to building my first app with Visual Studio 2005. And no, I am not the only Microsoftee who doesn't write code for a living. Thankfully Betsy Aoki just posted a good writeup about her first VB.NET programming class. I built what I consider a personalized online newspaper app. Here’s how:

 

  1. Visual Studio 2005 (I think I am using the Visual C# 2005 Express Edition Beta)
  2. Create a New Project
  3. The Type of Project is: Visual C# - Windows Application (could be VB.NET too I suppose)
  4. Set the Form (Form1) properties to:
    • Text: MSNBC Newspaper
    • (a cool one to use is FormBorderStyle: None  - but then you have to use Alt+F4 to close the application. So, I suggest using the default FormBorderStyle:Sizable)
    • WindowState: Maximized
  5. Drag the Web Browser control from the Toolbox to the form
  6. Set the Browser Control (webBrowser1) properties to:
  7. Save the project as “MSNBC Newspaper”
  8. Build the project
  9. Publish the project (I published it to “c:\temp\MSNBC Newspaper”)
  10. Then go to “c:\temp\MSNBC Newspaper” and run setup.exe to install your new application. It will then show up under Start/Programs/Microsoft  

And that’s it: 10 lines of instructions, no code, and a fully installable and versionable application that I can use as customized my morning newspaper. Of course, I wish I could add RSS feeds into MSNBC’s newsbot page.  

Comments (3)

  1. George says:

    You gotta love it!

    How do you "publish the project"? That’s not a choice on any of my menus, and there’s nothing in Help (other than references to the Publish class).

  2. Brian Groth says:

    Hmmm, it looks like I have the full Visual Studio 2005 Beta 1 installed, not just the C# download. I didn’t realize anything would be different, but maybe so.

    The Publish feature is discussed in this article about VB.NET 2005, but applies to C# also: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/vbnet2005_preview.asp

    And an article on ClickOnce from the May 2004 MSDN article: http://msdn.microsoft.com/msdnmag/issues/04/05/clickonce/

  3. George says:

    Thanks, Brian. That must be one of the features that was left out of the Express editions. All the more reason to upgrade to 2005 when it ships.

Skip to main content