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
  1. Home
  2. General Programming
  3. Visual Basic
  4. Reference Equivelants in .net

Reference Equivelants in .net

Scheduled Pinned Locked Moved Visual Basic
csharphelpquestionworkspace
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.
  • N Offline
    N Offline
    No e
    wrote on last edited by
    #1

    A project in VB6 had a reference to a DLL. When the project started it made a decision to load this DLL or not load it (based on reading a configuration setting from a file) If it needed to load it it would launch the DLL which opened a separate window. After upgrading to .NET, I am not sure how this reference equivalent is done, but when I start my project it always loads this DLL, whether or not I want it to. It appears to load it in the InitializeComponent, but I do not understand why, or how I can prevent it from loading the DLL when I start the project. It is after the initializeConponent that the program looks for the config setting to determine it it should load this. Any idea how I need to handle this?

    Public Sub New()
    MyBase.New()
    If m_vb6FormDefInstance Is Nothing Then
    m_vb6FormDefInstance = Me
    End If
    'This call is required by the Windows Form Designer.
    InitializeComponent() ' loads my dll here for some reason
    End Sub

    Any help or point in a good direction is appreciated... No-e

    H 1 Reply Last reply
    0
    • N No e

      A project in VB6 had a reference to a DLL. When the project started it made a decision to load this DLL or not load it (based on reading a configuration setting from a file) If it needed to load it it would launch the DLL which opened a separate window. After upgrading to .NET, I am not sure how this reference equivalent is done, but when I start my project it always loads this DLL, whether or not I want it to. It appears to load it in the InitializeComponent, but I do not understand why, or how I can prevent it from loading the DLL when I start the project. It is after the initializeConponent that the program looks for the config setting to determine it it should load this. Any idea how I need to handle this?

      Public Sub New()
      MyBase.New()
      If m_vb6FormDefInstance Is Nothing Then
      m_vb6FormDefInstance = Me
      End If
      'This call is required by the Windows Form Designer.
      InitializeComponent() ' loads my dll here for some reason
      End Sub

      Any help or point in a good direction is appreciated... No-e

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      I strongly suspect that one of the controls you are using in your upgraded application uses some method/control from the VB6 dll. That is the only way I know that the dll can get loaded in InitializeComponent(). Just in case you don't know how to use the dll in code, here[^] is a link I have found useful in the past, although there are loads more out there.

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      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