Category Archive for: Basic ActiveX Controls

The Remove Selected Items Button

The code examines the control’s SeICount property, which specifies the number of selected items. If SelCount equals one, it moves the item. If the number of selected items is more than one, the program scans the entire list and removes the items that have their Selected property set to True. Notice also that the list is scanned backward, as…

Read More →

Building ActiveX Components

• Modules andCtass Modules ‘ • lulling ClassModules~ • l’rnp1ementing properties and methods • Raising Events from within Clas$es • Creating and using,object variables • Registering ActlveX components • Handling Class errors In the last chapter, you learned how to contact server applications an~ program (or OLE automate) them through the objects they expose. In thi  chapter, you’ll…

Read More →

The ListBox Control’s’ Methods

To manipulate a listBox control from within your application.you should be able t?: • Add items to the list • Remove items from the list • Accessindividual items in the list Add Item To add items to the list, use the Addltem method. Its syntax is as follows: List .Addltem item, index The item parameter is…

Read More →

KeyUp Event Examples

Const DatelnputKey – vbkeyFS Const TimelnputKey – vbkeyF6 Const SpeciallnputlKey – vbkeyF7 Const Speciallnput2Key – vbkeyF8 {more code} . Notice the definitions of the constants that make the code easier to read and simplify its maintenance. , . With a little.additional effort, you can provide users with a dialog box that lets them assign their own…

Read More →

SelStart and SelLength

The SelStaH property returns or sets the position of the first character of the selected text, somewhat like placing the cursorat a specific location in the text and selecting text by dragging the mouse. The SelLmgth property returns or sets the length of the selected text. The most common use of these two propertiesis to extract the user’s selection…

Read More →

Basic ActiveX Controls

In the previous chapters, we explored the envi ronment of Visual Basic and the principles of event-driven programming, which is the core of Visual Basic’s programming model. In the precess, we briefly examined a few basic controls through the examples. Visual Basic provides many more controls, and all of them have a multitude-of properties. Most of the properties have…

Read More →

Back to Top