The Base Control Classes

 <  Day Day Up  >  

FoxPro's base classes appear in the Form Controls toolbar when a form is open. Visual Basic .NET's base controls are found in the Windows Forms toolbar, which also is only visible when a form is open . FoxPro's base class controls are the bare minimum, and I was a little jealous the first time I saw the Visual Basic .NET Form Designer. However, it's really not quite so black-and-white. Some of the FoxPro equivalents of Visual Basic .NET controls (for example, the Color Picker) are exposed as function calls in FoxPro. And in other cases, controls with similar names have different capabilities, or one is harder to use then its counterpart .

With those caveats, Table 8.1 gives the approximate equivalencies of the base control classes. We'll cover important differences as we go through the chapter.

Table 8.1. Base Control Classes

FoxPro

Visual Basic .NET

Label

Label

TextBox

TextBox

Editbox

TextBox with Multiline=True

Commandbutton

Button

CommandGroup

Buttons within a Panel

OptionGroup

RadioButton

CheckBox

CheckBox

ComboBox

Combobox

ListBox

ListBox

Spinner

NumericUpDown

Grid

DataGrid

Image, PicClp32.ocx

PictureBox

Timer

Timer

Grid

DataGrid

OLEControl

Various

OLEBoundControl

Various

Line

Label with BorderStyle FixedSingle and Height=1

Shape

Panel

Container

Panel

Separator

N/A

HyperLink

LinkLabel

GetColor()

ColorDialog

CheckBox

CheckedBoxList

Menu Builder Context Menu option

ContextMenu

Visual FoxPro Report Designer Preview

CrystalReportViewer

MSComctl2.ocx

DateTimePicker

Similar to a combo box

DomainUpDown

(Automated valid clauses)

ErrorProvider

GetDir()

FolderBrowserDialog

GetFont()

FontDialog

Built into RadioButtons

GroupBox

SET HELP TO

HelpProvider

Form property

HScrollBar

MSComCtlLib

ImageList

MSComCtlLib

Listview

Menu Designer

MainMenu

MSComctl.ocx

MonthCalendar

Puts an icon on the Taskbar (N/A)

NotifyIcon

GetFile()

OpenFileDialog

Report Designer, SYS(1037)

PageSetupDialog

Report Designer, Ctrl+P

PrintDialog

Report Form

PrintDocument

Report Form Preview

PrintPreviewDialog

MSComCtlLib

ProgressBar

RichTextLib

RichTextBox

PutFile()

SaveFileDialog

N/A

Splitter

MSComCtlLib

StatusBar

PageFrame

TabControl

Toolbar Class, MSComctl.ocx

Toolbar

Built into each control

ToolTip

MSComCtlLib

TrackBar

MSComCtlLib

TreeView

Form property

VScrollBar


I'm tempted to say that this list consists of apples and oranges. FoxPro's base control list is actually only 21 controls: Label , TextBox , EditBox , CommandButton , CommandGroup , OptionGroup , CheckBox , ComboBox , ListBox , Spinner , Grid , Image , Timer , PageFrame , ActiveXControl , ActiveXBoundControl , Line , Shape , Container , Separator , and HyperLink . But on my laptop alone I have over 350 ActiveX controls, and every week some vendor sends me another dozen or two. When registered with RegSvr32.exe , these controls appear on the Tools, Options, Controls page, and on the Visual Studio toolbox under each vendor's heading bar. So it's hard to say that one language has something that the other doesn't. Except for the NotifyIcon , HelpProvider , and Splitter controls, each has everything that the other has, although the implementation is sometimes totally different.

Note that many controls listed in Table 8.1 are members of MSComCtlLib . This is a Windows Control Library, which you can easily build yourself in Visual Studio .NET. In fact, they are the equivalent of what we would use a VCX for in building our own subclasses of the standard FoxPro base form controls.

 <  Day Day Up  >  


Visual Fox Pro to Visual Basic.NET
Visual FoxPro to Visual Basic .NET
ISBN: 0672326493
EAN: 2147483647
Year: 2004
Pages: 130
Authors: Les Pinter

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net