We use a very small VB program HelloWorld as the start point for the tour to introduce web programming in Visual Basic with WebRainbow. Hello World is a famous program for C/C++ programmer as first program they wrote. Here we just implement it in Visual Basic, utilizing WebRainbow. The program will display Hello World! in the browser.
Option Explicit
Sub Main()
CPrint "<HTML>"
CPrint "<BODY>"
CPrint "<CENTER>"
CPrint "<FONT SIZE=""5"" COLOR=""RED""><EM><B>"
CPrint "<P>Hello World!"
CPrint "</B></EM></FONT>"
CPrint "</BODY>"
CPrint "</HTML>"
End Sub
What did you see? It is Hello World!
There is Hello World! shown in your browser in red color! This is a real web application! it's so simple! But it is true! This is the power of WebRainbow. All the underneath job to make web application simple is handled by WebRainbow.
This small Web program only calls to one function CPrint several times. It is the exposed function of WebRainbow.DynaPage, and used to send HTML content to browser
The only point we need to pay attention is the double quote. Let us take
look at this line:
CPrint "<FONT SIZE=""5
"" COLOR=""RED
""><EM><B>"
There are 2 double quotes before and after digit 5 as well as word RED. This is the way for Visual Basic to put a double quote " into the string.
For the latest information on WebRainbow, please see:
| http://www.dmfsys.com/wrainbow/ |
For questions / comments please email to:
| support@dmfsys.com |
Last modified on March 2, 2005