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. Form Initialize Method

Form Initialize Method

Scheduled Pinned Locked Moved Visual Basic
question
6 Posts 3 Posters 2 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

    My vb form contains an ocx control and I have Form_Initialize method working. Upon executing what will happen 1- Ocx registration is checked before form initialize method?? 2- After initialized method?? 3- Ocx registration is checked by windows? please reply.

    D 1 Reply Last reply
    0
    • V vhassan

      My vb form contains an ocx control and I have Form_Initialize method working. Upon executing what will happen 1- Ocx registration is checked before form initialize method?? 2- After initialized method?? 3- Ocx registration is checked by windows? please reply.

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

      The registration is not checked at all until you attempt to make an instance of your control.

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

      V 1 Reply Last reply
      0
      • D Dave Kreskowiak

        The registration is not checked at all until you attempt to make an instance of your control.

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

        V Offline
        V Offline
        vhassan
        wrote on last edited by
        #3

        Thank you for reply. I have ocx control on my form at design time. Now I call form_initialize method but get dependency error from windows. Steps I do. 1- A registered ocx control on VB Form. 2- Make an exe of my program. 3- Un-register the control using regsvr32 -u 4- Now if i run exe I get dependency error. I want to handle that error. Please tell. Thank you.

        C D 2 Replies Last reply
        0
        • V vhassan

          Thank you for reply. I have ocx control on my form at design time. Now I call form_initialize method but get dependency error from windows. Steps I do. 1- A registered ocx control on VB Form. 2- Make an exe of my program. 3- Un-register the control using regsvr32 -u 4- Now if i run exe I get dependency error. I want to handle that error. Please tell. Thank you.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          vhassan wrote:

          I want to handle that error. Please tell.

          I assume the point of this is to try to work out if you have your control registered, and give an intelligent error message ? Your best bet is to handle the specific exception type, catch it, and show an error message, and exit.

          Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

          D 1 Reply Last reply
          0
          • C Christian Graus

            vhassan wrote:

            I want to handle that error. Please tell.

            I assume the point of this is to try to work out if you have your control registered, and give an intelligent error message ? Your best bet is to handle the specific exception type, catch it, and show an error message, and exit.

            Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

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

            Not under VB6. You only get the On Error Resume Next thing, which sucks.

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

            1 Reply Last reply
            0
            • V vhassan

              Thank you for reply. I have ocx control on my form at design time. Now I call form_initialize method but get dependency error from windows. Steps I do. 1- A registered ocx control on VB Form. 2- Make an exe of my program. 3- Un-register the control using regsvr32 -u 4- Now if i run exe I get dependency error. I want to handle that error. Please tell. Thank you.

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

              I'll say it again. You can't. The error is thrown before any of your code runs.

              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