Hello all you kwazy kode monkeeeees,
Today, before you work on your projects, you are going to add some more functionality to your "menus" project. Specifically, You are going to be able to open up WEBPAGES inside your textbox, mod their code then pop up the way the new webpage looks in another form which you will add to this lil project.
Here's what to do:
A) you will need to add an IF statement to your save menu item. It's to prevent saving files with no extensions and no filenames. Please place it BEFORE all the code you have in the SAVE menu item:
If theFileName = "" Then
SaveFileDialog1.Filter = "Text files (*.txt)*.txtweb pages (*.html)*.html"
SaveFileDialog1.ShowDialog()
theFileName = SaveFileDialog1.FileName
End If
B) notice how I have modified the "filter" so that you can see both text files and web pages when you are saving. You will also modify the filter found in the OPEN and SAVE AS menu items, in exactly the same way.
C) Add a second form -- nope don't care if you rename this one
D) Add a webbrowser control to this form -- also no need to rename this control
E) get back into "Form1" and add this item to the file menu "Open in browser"
F) Doubleclick on that new menu item, and add just this snippet of code:
Form2.Visible = True
OK, so whatya got so far? Well, you have a new menu item that opens up a new form that has a web browser control on it. Also, we've chnaged the filters of all our menu items so they can see both text and web pages. Lets make sure it works before going on to the next step
Cheers,
Mr. L
Tuesday, November 11, 2008
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment