Toolbar Vstar Activex Control

Integrating Toolbar Vstar ActiveX Control with Your Application — Developer Guide

Overview

Toolbar Vstar ActiveX is a 32-bit toolbar component (Windows XP/Vista styles) for VB6, VC++, VB.NET and VC.NET that provides buttons, menus, icons and built‑in toolbar styles. Typical package includes .ocx/.dll, demo and user documentation.

Quick checklist (preparation)

  • Platform: 32‑bit Windows application.
  • Files: obtain the OCX/DLL and any installer (tvsetup.exe) and documentation from vendor/distributor.
  • Prereqs: Visual Basic 6 or appropriate .NET/VC runtime, admin rights to register OCX.
  • Backup: test in a copy of your project/environment.

Installation & registration

  1. Run vendor installer or copy the .ocx/.dll to a system folder (e.g., C:\Windows\System32 for 32‑bit on 32‑bit Windows or SysWOW64 for 32‑bit on 64‑bit Windows).
  2. Register manually (if needed) with elevated prompt:
    • regsvr32 “C:\Path\ToolbarVstar.ocx”
  3. In Visual Studio / VB6: add a reference/control
    • VB6: Project → Components → select the Toolbar Vstar control.
    • VB.NET/VC.NET: Tools → Choose Toolbox Items → COM Components → check the control.

Adding the control to a form

  • Drag the control from the toolbox onto the form (design mode).
  • Use the control’s Properties window to set basic appearance (style, size, image list).
  • Many hosts expose the underlying ActiveX object via a .Object property — use that to access control‑specific members.

Common API usage (patterns)

  • Referencing control object (VB/VBA):

    Code

    Dim tb As Object Set tb = Me.ToolbarVstarControl.Object
  • Adding buttons/menu items (typical pattern — adapt to actual method names in vendor docs):

    Code

    tb.Buttons.Add index, id tb.Buttons(id).Caption = “Open” tb.Buttons(id).Image = ImageIndex
  • Handling events:
    • Use the host IDE to create event handlers (e.g., Click, MenuClick, Updated).
    • If the control exposes custom events, they appear under the control’s events list once added to the form.

Images & resources

  • Supported formats: PNG, BMP, ICO, JPG, GIF (per vendor notes).
  • Use an ImageList or the control’s image property; ensure correct scaling and transparency for PNG icons.

Properties, methods, and events discovery

  • If intellisense doesn’t show control‑specific members, set a reference to the OCX in your project (Tools → References) and use late bind .Object or declare the control type if a type library is available.
  • Inspect any shipped documentation/demo for exact method/property names and sample code.

Deployment

  1. Include OCX/DLL with installer.
  2. Register on target machines (regsvr32) during installation.
  3. Ensure licensing/registration keys (if commercial) are installed per vendor instructions.
  4. For 64‑bit Windows, deploy the 32‑bit OCX to SysWOW64 and register the 32‑bit regsvr32.

Troubleshooting

  • “Control not registered” — re-run regsvr32 as admin and check path.
  • Missing methods in intellisense — add COM reference or use .Object to access underlying API.
  • Images not showing — confirm supported format and correct image indices.
  • Compatibility issues on 64‑bit hosts — ensure host is 32‑bit or use compatible wrapper.

Security & compatibility notes

  • ActiveX controls run native code — avoid untrusted sources; verify vendor.
  • Not suitable for 64‑bit native apps (control is 32‑bit).
  • Test on target Windows versions (notes indicate compatibility down to XP; test on modern Windows ⁄11).

Example (VB6-like pseudo)

Code

’ design: ToolbarVstar1 added to form Dim tb As Object Set tb = ToolbarVstar1.Object tb.Style = “Vstar default” tb.Buttons.Add 0, 100 tb.Buttons(100).Caption = “New” tb.Buttons(100).Image = 0

If you want, I can produce a short copy‑paste sample for your actual host (VB6, VB.NET, or C++/MFC) — tell me which language and I’ll generate it.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *