Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB6.0 Applicaiton OCX Control Dependency

VB6.0 Applicaiton OCX Control Dependency

Scheduled Pinned Locked Moved Visual Basic
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vhassan
    wrote on last edited by
    #1

    hi. my application's main form is dependent on a control ocx. I want to handle the exception if ocx is not registered on machine if user has no privileges to registered it. please tell me how can i do that. Thanks

    modified on Monday, June 8, 2009 8:46 AM

    D 1 Reply Last reply
    0
    • V vhassan

      hi. my application's main form is dependent on a control ocx. I want to handle the exception if ocx is not registered on machine if user has no privileges to registered it. please tell me how can i do that. Thanks

      modified on Monday, June 8, 2009 8:46 AM

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      The best you've got in VB6 is to use On Error Resume Next before the code that creates an instance of the object. If you're just using the designer and dropping the contorl on the form, you've got no options but to remove the object from the form and create it manually in your code, just after the On Error line. Right after the line of code you use to create the object, you can check the value of Err.Number If it's non-zero, something went wrong.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups