Create a web page with VB
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Create a web page with VB

  1. #1
    Senior Member
    Join Date
    Feb 2003

    Post Create a web page with VB

    I am not going to cover all the basic of visual basic, since there is a lot of tutorials you can find here on Antionline. To complete creating the web page with visual basic you are going to need Internet Explorer4.0 or later a vb compiler and since you are reading it , I assume you have access to computer. So lets cut the crap and go for the meat.

    You can create two type of Internet apps with vb

    1) IIS apps
    2)DHTML apps(Dynamic Hypertext Markup Lang.)

    All the processing for an IIS apps happens on the web server and DHTML applications processing happens on the browser computer. In this tut I am going to use DHTML to create a web page.

    1) Start VB. When New Project dialog box appears, scroll the New tab's list box, then click DHTML. Cllick open button. Now visual basic will open a new DHTML project. If it doesn't work go to File then click New Project to open the New Project dialog box and then click DHTML.

    2) Right click modDHTML in the Project window, then click Remove modDHTML.
    Now you can give the DHTML project what ever name you want to give.

    3) Change th project's Name property to any name youu can remember like web page or web project anything it is up to you.

    4) Click DHTML Page1 in the Project window, and then click the Project window's View Object button. Visual Basic displays the DHTML page designer window for page 1 of the DHTML project. If you want to include more than one web page , you can use the add DHTML page option on the project menu to add another page to the project. Visual Basic will provide a separate page designer window for each page included in the project. The page designer window contains a title bar, toolbars, and two panes: the treeview pane and the detail pane.

    Treeview Pane: It displays the list of all of the elements included in the detail pane. You will learn more about Treeview Pane later in this tut.

    Detail Pane: It presents a drawing surface on which you can create a new page or edit an existing page.

    So now go ahead and make detail pane larger so that you can use more drawing surface. Then we will add some text to the detail pane.

    5) Maximize the page designer window, then drag the bar that separates the designer window's panes until you think you get enough space for work and then release the mouse button. Now click on detail pane and type anything you want lets say you want to type[ This is a web site to discuss how to secure your computer and for more information click here and so on]. Don't worry if you see information in the treeview pane changes. So that is it you can add what ever you want to show on your web page just simply by typing the text in the page disinger window's detail pane.
    Now I am going to discuss how to add an image to your web site.

    6) Restore the page designer window then double click the Image tool in the toolbox to place in image control in the detail pane. Maximize the page designer window, then drag and size the image control untill you think it is enough space for your image.

    7) Press the Alt to display Visual Basic's main window, then click View, and then click Properties Window, Click Custom in the properties window, then click the ... button in the Settings box to open the image control's Property Pages dialog box. Click the ... button that appears to the right of the Image source text box. The open dialog box appears. Use the Open dialog box to locate the computer.wmf file, which is typically located in the Program Files\Microsoft Visual Studio\Common\Graphichs\Metafile\Business folder on either the local hard drive or the network drive. Click the Computer.wmf, then click the Open button, and then click the OK button. A picture of a omputer appears in the image control.

    Next you can make a phrase Microsoft Web site, into a hyperlink that iwll connect the web page to MIcrosoft's home page. I am using it just as an example you can type anyone web site to connect your page.

    8) Select the phrase Microsoft web site, then click the Make Selection into link button on the page designer window's tolbar. The phrase appears as yellow lettering on a black background. You will notice that the phrase is underlined, which indicates that it is a hyperlink.
    Now you need to provide the hyperlink with the address of Microsoft's home page.

    9) Press Alt to display vb's main window, then click View, and then click Properties Window. Use the Object box in the properties window to select the Hyperlink1 (Disp1HTMLAnchorElement) element. Click (custom), and then click the ... button in te settings box. The hyperlink's Property Pages dialog box appears. Click the Link type list arrow on the General tab. Scroll the list, then click http: . You will notice that this places http:// in the Link text box. Click after the second slash in the Link text box, then type or anyother which you decide to connect with your web page.
    10) Click OK to close the Property Pages dialog box. Click after the period in the second sentence to cancel the selection of the hyperlink phrase. Now save the web page and project.

    11) Press Alt to display vb's main window, then click File, and then click Save DHTMLPage1 As. When the save file a dialog box appears, type ApCPage in the Filename textg box. This file will be saved as a Designer File with a .Dsr extension. Click the save button.

    Now lets go to treeview pane, which shows a hierarchicla listing of the elements included in the detail pane.

    1) Drag the bar that separates both designer window pane to the right then click Document in the treeview pane.
    2) Click Body
    3) Click P
    4) Click Hyperlink1 A
    5) Click P(<iMG alt='"' border=0 height=238 hspace=0 id). Visual Basic selects the second paragraph, which contains only the image control.
    6Click Image1 IMG(). Visual Basic selects only the image control included int eh second paragraph.

    After creating the web page, you then instruct vb to create the appropriate html code for you.
    To tell vb to create the HTmL code for your web page, then view the HTML code

    1) Click the DHTML Page Designer Properties button on the page designer's toolbar. The DHTMLPage1 Properties dialog box appears. Click the Save HTML in an externeal file option buton, then click the Nesw button. The Create HTML file dialog box appears. Notice that the file will be saved as an HTML file.

    2) When the save internel HTML dialog box appears, click the Yes button.
    3) Click the Launch Editor button on the page designer's toolbalr. Mazimize the editor window.You are going to see HTML code generated by vb in the window.
    4) Close the editor window.
    All that remains is to view your web page using a browser. You can either run the project while you are in vb, or youcan start IE and use the open option on its file menu to open the .htm file.

    To view you web page
    1 Save it andExit visual basic.
    2 start IE click file then click open. open the file you just save.
    3 Click Microsoft web site. now you are going to be on Microsft's home page. Close internet explorer.

    You can play around with it and can create any kind of web page or even the whole web site.

  2. #2
    Join Date
    Sep 2002
    I 'll seee

  3. #3
    Senior Member
    Join Date
    Nov 2001
    a couple of years ago i was concidering doing this but was advised against it. security issues. i figured MS + VB their probably right. i wan't told of anything spacific just security issues. what can you tell me about security an VB webs.
    Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”

  4. #4
    Senior Member
    Join Date
    Dec 2001
    This looks interesting I am going to give it a try..... YEA 275 posts.. Now I can see what the addicts forums are all about
    Violence breeds violence
    we need a world court
    not a republican with his hands covered in oil and military hardware lecturing us on world security!

  5. #5
    Senior Member
    Join Date
    Mar 2003
    Seems like this will work but also like Tedob1 said about security issues. I'll give it a try anyway.
    [glowpurple]NooNoo\'s [/glowpurple]

  6. #6
    Senior Member
    Join Date
    Nov 2001
    i don’t "know" this as was said to me hats all. and it kinda made sense. thats why i was asking. maybe someone can say definitively one way or the other.
    Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”

  7. #7
    Join Date
    Jul 2002

    The Power of Trust: HTAs and Security
    As fully trusted applications, HTAs carry out actions that Internet Explorer would never permit in a Web page. The result is an application that runs seamlessly, without interruption.

    In HTAs, the restrictions against allowing script to manipulate the client machine are lifted. For example, all command codes are supported without scripting limitations (see command id). And HTAs have read/write access to the files and system registry on the client machine.

    The trusted status of HTAs also extends to all operations subject to security zone options. In short, zone security is off. Consequently, HTAs run embedded Microsoft ActiveX® controls and Java applets irrespective of the zone security setting on the client machine. No warning displays before such objects are downloaded and run within an HTA.

    The above was taken straight out of the URL. Sorry but I couldn't find any other stuff on VB or html/dhtml except the risks of what a naughty author or defacer could add onto a site.

  8. #8
    Senior Member
    Join Date
    Nov 2001
    well so much for that. i will not allow activex controls or java applets to run in my own browser even if the come with a gold seal of approval. i dont think i should expect anyone else to allow them because i want to have a vb page. think ill just play with it tomorrow for the fun in it. might be something useful in an intranet.

    thanks TS & \/IP3R
    Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”

  9. #9
    Senior Member
    Join Date
    Feb 2003
    Can you explain Tedob1 what is your concern about the security I will try to answer it. I mean can you be more specific

  10. #10
    Tedob1 >> Ive just heard that the sites built in VB are highly exploitable and easily defaceable, imma research this.... good tut btw viper

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

 Security News


       Security Trends


           Buying Guides