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