< b o d y > 
 < p   a l i g n = " c e n t e r " > < f o n t   f a c e = " A r i a l "   s i z e = " 5 " > U s i n g   t h e   W e b B r o w s e r   C o n t r o l   a s   a n   
 H T M L   E d i t o r < / f o n t > < / p > 
 < p   a l i g n = " c e n t e r " >   < / p > 
 < p > < f o n t   f a c e = " A r i a l " > T h i s   a r t i c l e   i s   a   s i m p l e   i n t r o d u c t i o n   t o   h o w   y o u   c a n   u s e   
 t h e   W e b B r o w s e r   c o n t r o l   a s   a n   H T M L   e d i t o r .   T h e r e   a r e   m a n y   f e a t u r e s   a v a i l a b l e   
 h o w e v e r   t h e r e   i s   n o   s a m p l e   d o c u m e n t a t i o n   a n d   w h a t   l i t t l e   t h e r e   i s   i s   i n   C + + .   < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l " > T h e   w e b b r o w s e r   c o n t r o l   i s   a d d e d   u s i n g   P r o j e c t ,   C o m p o n e n t s ,   
 M i c r o s o f t   I n t e r n e t   C o n t r o l s   a n d   a p p e a r s   o n   t h e   t o o l b o x   a s   a   g l o b e   i c o n . 
 
 W h e n   w o r k i n g   w i t h   t h i s   c o n t r o l   i t   i s   i m p o r t a n t   t o   e n s u r e   t h a t   y o u   i n i t i a l i s e   i t   
 o t h e r w i s e   y o u   w i l l   g e t   R u n   T i m e   E r r o r   4 3 8 . 
 T o   i n i t i a l i s e   t h e   c o n t r o l   a s   a n   e d i t a b l e   c o n t r o l   e n t e r   s o m e t h i n g   l i k e   t h e   f o l l o w i n g : 
 
 < f o n t   s i z e = " 2 " > P r i v a t e   S u b   F o r m _ L o a d 
         W e b B r o w s e r 1 . N a v i g a t e 2   " a b o u t : b l a n k " 
         W e b B r o w s e r 1 . D o c u m e n t . D e s i g n M o d e   =   " O n " 
 E n d   S u b < / f o n t > 
 
 N o w   t h a t   y o u   c a n   t y p e   i n t o   t h e   c o n t r o l ,   y o u   w i l l   m o r e   t h a n   l i k e l y   w a n t   t o   e n t e r   
 r i c h   t e x t   i e   b o l d ,   i t a l i c ,   u n d e r l i n e   e t c . 
 
 B y   u s i n g   t h e   E x e c C o m m a n d   w i t h i n   t h e   D o c u m e n t   m o d e l ,   y o u   c a n   p a s s   t h r o u g h   
 c o m m a n d s   d i r e c t l y   i n t o   t h e   d o c u m e n t .   
 F o r   e x a m p l e : 
 
 < f o n t   s i z e = " 2 " > P r i v a t e   S u b   c m d B o l d _ C l i c k 
         W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " B o l d " 
 E n d   S u b < / f o n t > 
   < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > B a s i c   C o m m a n d s < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l " > I n   t h e   s a m e   w a y   y o u   c a n   s e e   i n   t h e   e x a m p l e   a b o v e ,   t h e   
 f o l l o w i n g   c o m m a n d s   c a n   b e   s e n t   s t r a i g h t   t h r o u g h   t o   t h e   W e b B r o w s e r .   
 
 < f o n t   s i z e = " 2 " > W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " J u s t i f y L e f t " 
 W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " J u s t i f y C e n t e r "   
 W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " J u s t i f y R i g h t " 
 W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " B o l d " 
 W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " I t a l i c " 
 W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " U n d e r l i n e " 
 W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " C o p y " 
 W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " C u t " 
 W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " P a s t e "   
 W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " I n s e r t H o r i z o n t a l R u l e " 
 W e b B r o w s e r 1 < / f o n t > < / f o n t > < f o n t   f a c e = " A r i a l "   s i z e = " 2 " > . D o c u m e n t . E x e c c o m m a n d   
 " I n d e n t " 
 < / f o n t > < f o n t   f a c e = " A r i a l " > < f o n t   s i z e = " 2 " > W e b B r o w s e r 1 < / f o n t > < / f o n t > < f o n t   f a c e = " A r i a l "   s i z e = " 2 " > . D o c u m e n t . E x e c c o m m a n d   
 " O u t d e n t " < / f o n t > < f o n t   f a c e = " A r i a l " > 
   < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > C o m m a n d s   w i t h   P a r a m e t e r s < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l " > F o n t   S i z e 
 
 W h e n   l o o k i n g   t o   m o d i f y   t h e   f o n t   p r o p e r t i e s ,   p a r a m e t e r s   w i l l   n e e d   t o   b e   
 s p e c i f i e d . 
 
 I n   t h e   c a s e   o f   s e t t i n g   F o n t   S i z e   y o u   n e e d   t o   u s e   H T M L   s i z e s   r a t h e r   t h a n   p o i n t   
 s i z e s   a s   f o l l o w s : < / f o n t > < / p > 
 < d i v   a l i g n = " c e n t e r " > 
   < c e n t e r > 
   < t a b l e   b o r d e r = " 0 "   c e l l s p a c i n g = " 0 "   s t y l e = " b o r d e r - c o l l a p s e :   c o l l a p s e "   b o r d e r c o l o r = " # 1 1 1 1 1 1 "   i d = " A u t o N u m b e r 1 " > 
   < t r > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   f a c e = " A r i a l " > H T M L   S i z e < / f o n t > < / t d > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   f a c e = " A r i a l " > T r a d i t i o n a l   P o i n t   
     S i z e < / f o n t > < / t d > 
   < / t r > 
   < t r > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   s i z e = " 4 "   f a c e = " A r i a l " > 1 < / f o n t > < / t d > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > 8 p t < / f o n t > < / t d > 
   < / t r > 
   < t r > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   s i z e = " 4 "   f a c e = " A r i a l " > 2 < / f o n t > < / t d > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > 1 0 p t < / f o n t > < / t d > 
   < / t r > 
   < t r > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   s i z e = " 4 "   f a c e = " A r i a l " > 3 < / f o n t > < / t d > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > 1 2 p t < / f o n t > < / t d > 
   < / t r > 
   < t r > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   s i z e = " 4 "   f a c e = " A r i a l " > 4 < / f o n t > < / t d > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > 1 4 p t < / f o n t > < / t d > 
   < / t r > 
   < t r > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   s i z e = " 4 "   f a c e = " A r i a l " > 5 < / f o n t > < / t d > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > 1 8 p t < / f o n t > < / t d > 
   < / t r > 
   < t r > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   s i z e = " 4 "   f a c e = " A r i a l " > 6 < / f o n t > < / t d > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > 2 4 p t < / f o n t > < / t d > 
   < / t r > 
   < t r > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   s i z e = " 4 "   f a c e = " A r i a l " > 7 < / f o n t > < / t d > 
     < t d   w i d t h = " 5 0 % "   a l i g n = " c e n t e r " > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > 3 6 p t < / f o n t > < / t d > 
   < / t r > 
   < / t a b l e > 
   < / c e n t e r > 
 < / d i v > 
 < p > < f o n t   f a c e = " A r i a l " > I n   c o n v e r t i n g   t h e   f o n t   s i z e s   t o   a   v a l u e   b e t w e e n   1   a n d   7 ,   
 t h e   c o m m a n d   i s   a s   f o l l o w s   ( n o t e   t h e   s i z e   i s   p a s s e d   a c r o s s   a s   a   s t r i n g ,   n o t   a   
 n u m b e r ) : < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l " > < f o n t   s i z e = " 2 " > W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " F o n t S i z e " ,   
 " " ,   " 5 " 
 
 < / f o n t > 
 F o n t   C o l o r 
 
 I n   t h e   s a m e   w a y   w e   h a d   t o   u s e   t h e   H T M L   v a l u e   f o r   s i z e   r a t h e r   t h a n   t h e   w i n d o w s   
 v a l u e ,   s o   t o o   d o   w e   h a v e   t o   d o   t h e   s a m e   f o r   c o l o r s .   W e   c a n n o t   u s e   t h e   W i n d o w s   
 l o n g   v a l u e s   a n d   n e e d   t o   c o n v e r t   t o   t h e   w e b   f o r m a t   o f   R G B . 
 
 I   h a v e   m o d i f i e d   a   f u n c t i o n   f r o m   P l a n e t S o u r c e C o d e   t h a t   d o e s   t h e   j o b   a l t h o u g h   I   
 s u s p e c t   t h e r e   i s   a   f a r   e a s i e r   w a y   o f   u s i n g   i t ! 
 < / f o n t > < f o n t   f a c e = " A r i a l "   s i z e = " 2 " > 
 P u b l i c   F u n c t i o n   G e t H e x C o l o r ( t h e C o l o r   A s   L o n g )   a s   S t r i n g 
         D i m   R e d   A s   I n t e g e r ,   G r e e n   A s   I n t e g e r ,   B l u e   A s   I n t e g e r 
 
         R e d   =   t h e C o l o r   M o d   & H 1 0 0 :   t h e C o l o r   =   t h e C o l o r   \   & H 1 0 0 
         G r e e n   =   t h e C o l o r   M o d   & H 1 0 0 :   t h e C o l o r   =   t h e C o l o r   \   & H 1 0 0 
         B l u e   =   t h e C o l o r   M o d   & H 1 0 0 
 
         I f   L e n ( H e x ( R e d ) )   =   1   T h e n   G e t H E X C o l o r   =   G e t H E X C o l o r   &   " 0 " 
         G e t H E X C o l o r   =   G e t H E X C o l o r   &   H e x ( R e d ) 
         I f   L e n ( H e x ( G r e e n ) )   =   1   T h e n   G e t H E X C o l o r   =   G e t H E X C o l o r   &   " 0 " 
         G e t H E X C o l o r   =   G e t H E X C o l o r   &   H e x ( G r e e n ) 
         I f   L e n ( H e x ( B l u e ) )   =   1   T h e n   G e t H E X C o l o r   =   G e t H E X C o l o r   &   " 0 " 
         G e t H E X C o l o r   =   G e t H E X C o l o r   &   H e x ( B l u e ) 
         G e t H E X C o l o r   =   " # "   &   G e t H E X C o l o r 
 E n d   F u n c t i o n 
 
 < / f o n t > < f o n t   f a c e = " A r i a l " > T h i s   f u n c t i o n   a l l o w s   y o u   t o   t a k e   c o l o r s   f r o m   
 t h e   C o m m a n d   D i a l o g   c o n t r o l   a n d   c o n v e r t   t o   w e b   b a s e d   c o l o r s .   A   s i m p l e   
 i m p l e m e n t a t i o n   w o u l d   b e   a s   f o l l o w s   ( t a k i n g   n o t e   t h e   f o r m a t   o f   t h e   d a t a   p a s s e d   
 t h r o u g h   t o   t h e   c o m m a n d   i e   # R R G G B B ) : < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l "   s i z e = " 2 " > O n   E r r o r   R e s u m e   N e x t 
 C o m m o n D i a l o g 1 . C a n c e l E r r o r   =   T r u e 
 C o m m o n D i a l o g 1 . S h o w C o l o r 
 I f   e r r . N u m b e r   =   0   T h e n 
         H e x C o l o r   =   G e t H e x C o l o r ( C o m m o n D i a l o g 1 . C o l o r ) 
         W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " F o r e C o l o r " ,   " " ,   H e x C o l o r 
 E n d   I f 
 O n   E r r o r   G o t o   0 < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l " > 
 F o n t   N a m e 
 
 A s   w i t h   t h e   p r e v i o u s   e x a m p l e s ,   t h e   f o n t   n a m e   i s   e x a c t l y   t h e   s a m e   a s   t h e   o t h e r   
 m e t h o d s   w h e r e   t h e   n a m e   o f   t h e   f o n t   i s   p a s s e d   a s   a   s t r i n g : < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l "   s i z e = " 2 " > W e b B r o w s e r 1 . D o c u m e n t . E x e c c o m m a n d   " F o n t N a m e " ,   
 " " ,   " A r i a l " < / f o n t > < / p > 
 < p >   < / p > 
 < p > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > R e a d i n g   a n d   W r i t i n g   t o / f r o m   t h e   C o n t r o l 
 
 < / f o n t > < f o n t   f a c e = " A r i a l " > I n   9 9 %   o f   c a s e s ,   t h e   V B   p r o g r a m m e r   u s i n g   t h e   
 W e b B r o w s e r   c o n t r o l   w r i t e s   t h e   d a t a   t o   a   t e m p   f i l e   a n d   t h e n   l o a d s   t h a t   f i l e   i n t o   
 t h e   c o n t r o l .   N o w   t h a t   w e   k n o w   a b o u t   t h e   D e s i g n   M o d e ,   w e   c a n   w r i t e   d a t a   d i r e c t l y   
 t o   t h e   c o n t r o l . < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l "   s i z e = " 2 " > W e b B r o w s e r 1 . D o c u m e n t . S c r i p t . D o c u m e n t . C l e a r 
 W e b B r o w s e r 1 . D o c u m e n t . S c r i p t . D o c u m e n t . W r i t e   " H e l l o   W o r l d " 
 W e b B r o w s e r 1 . D o c u m e n t . S c r i p t . D o c u m e n t . C l o s e < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l " > I f   w e   w a n t   t o   g e t   t h e   d a t a   b a c k   w e   u s e   a   r a t h e r   o b s c u r e   
 m e t h o d : < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l "   s i z e = " 2 " > s t r H T M L D a t a   =   W e b B r o w s e r 1 . D o c u m e n t . A l l ( 0 ) . I n n e r H T M L < / f o n t > < / p > 
 < p >   < / p > 
 < p > < f o n t   f a c e = " A r i a l "   s i z e = " 4 " > C o n c l u s i o n < / f o n t > < / p > 
 < p > < f o n t   f a c e = " A r i a l " > I t   w a s   n o t   m y   i n t e n t i o n   t o   w r i t e   a   d e f i n i t i v e   g u i d e   o n   h o w   
 t o   d o   t h i s   b u t   r a t h e r   t o   p r o v i d e   a n   o v e r v i e w   a n d   e n c o u r a g e   o t h e r   p r o g r a m m e r s   t o   
 t a k e   t h i s   f u r t h e r .   T h i s   i s   a   v e r y   p o w e r f u l   f e a t u r e   t h a t   i s   s o   s i m p l e   t o   u s e   y e t   v e r y   l i t t l e   i s   a v a i l a b l e   i n   V B . < / f o n t > < / p > 
 < p >   < / p > 
 < p >   < / p > 
 < / b o d y > 