Access with Activex dll

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rufus

    Access with Activex dll

    Hi,

    On the project I am working on we need to encapsulate all data and business
    logic in an activex dll. My question is: How do I do this? How can I
    access the form objects ie text boxes, buttons with a dll?

    Thanks.


  • rufus

    #2
    Re: Access with Activex dll


    "rufus" <heinz@online.d e> wrote in message news:cheo7l$pt7 $1@online.de...[color=blue]
    > Hi,
    >
    > On the project I am working on we need to encapsulate all data and[/color]
    business[color=blue]
    > logic in an activex dll. My question is: How do I do this? How can I
    > access the form objects ie text boxes, buttons with a dll?
    >
    > Thanks.[/color]


    Or to put this another way, how can I move the code from my class modules
    into an Activex object OR export it as an activex dll?


    Comment

    • '69 Camaro

      #3
      Re: Access with Activex dll

      Hi, Rufus.
      [color=blue][color=green]
      > > On the project I am working on we need to encapsulate all data and[/color]
      > business[color=green]
      > > logic in an activex dll. My question is: How do I do this? How can I
      > > access the form objects ie text boxes, buttons with a dll?[/color][/color]

      Don't try to do this. It's like pushing on a string. Microsoft Access
      database applications are not designed to be accessed _from_ *.DLL's.
      Microsoft Access database applications are designed to _use_ these
      libraries, instead. Access objects, even if they have the same name as VB
      objects, such as "Form," are different objects, often with different
      Properties, methods and behaviors.

      For example, the "only" control on an open Form is the ActiveControl, which
      is the control with the focus. All other controls are "painted on" the form
      with pixels in order to save memory. It's pretty hard for an exterior
      process to access the other controls on the Form when there's no Windows
      handle to reach them.
      [color=blue]
      > how can I move the code from my class modules
      > into an Activex object OR export it as an activex dll?[/color]


      You can encapsulate code from your class modules in a *.DLL that your
      database application can call at run-time. Just open the modules and export
      them as text files to be imported into a VB project and compiled with your
      Visual Basic compiler. You may need to modify some of the code, because VB
      is not identical to VBA, but they are pretty close. If you use any other
      programming language for your *.DLL, then you will have to do a major
      rewrite of your code.

      HTH.

      Gunny

      See http://www.QBuilt.com for all your database needs.
      See http://www.Access.QBuilt.com for Microsoft Access tips.

      (Please remove ZERO_SPAM from my reply E-mail address, so that a message
      will be forwarded to me.)


      "rufus" <heinz@online.d e> wrote in message news:chep45$qrf $1@online.de...[color=blue]
      >
      > "rufus" <heinz@online.d e> wrote in message news:cheo7l$pt7 $1@online.de...[color=green]
      > > Hi,
      > >
      > > On the project I am working on we need to encapsulate all data and[/color]
      > business[color=green]
      > > logic in an activex dll. My question is: How do I do this? How can I
      > > access the form objects ie text boxes, buttons with a dll?
      > >
      > > Thanks.[/color]
      >
      >
      > Or to put this another way, how can I move the code from my class modules
      > into an Activex object OR export it as an activex dll?
      >
      >[/color]


      Comment

      • rufus

        #4
        Re: Access with Activex dll


        "'69 Camaro" <ForwardZERO_SP AM.To.69Camaro@ Spameater.orgZE RO_SPAM> wrote in
        message news:dmK_c.2256 $x12.1040@trndd c05...[color=blue]
        > Hi, Rufus.
        >[color=green][color=darkred]
        > > > On the project I am working on we need to encapsulate all data and[/color]
        > > business[color=darkred]
        > > > logic in an activex dll. My question is: How do I do this? How can[/color][/color][/color]
        I[color=blue][color=green][color=darkred]
        > > > access the form objects ie text boxes, buttons with a dll?[/color][/color]
        >
        > Don't try to do this. It's like pushing on a string. Microsoft Access
        > database applications are not designed to be accessed _from_ *.DLL's.
        > Microsoft Access database applications are designed to _use_ these
        > libraries, instead. Access objects, even if they have the same name as VB
        > objects, such as "Form," are different objects, often with different
        > Properties, methods and behaviors.
        >
        > For example, the "only" control on an open Form is the ActiveControl,[/color]
        which[color=blue]
        > is the control with the focus. All other controls are "painted on" the[/color]
        form[color=blue]
        > with pixels in order to save memory. It's pretty hard for an exterior
        > process to access the other controls on the Form when there's no Windows
        > handle to reach them.
        >[/color]

        That is what I was afraid of. 'The project I am working on requires a
        'controller' to sit between andMS Access application, vb.net application and
        the database. The idea is that the vb.net application and the MS Access
        application send the same calls to the controller and then the controller
        reacts depending on whether Access or VB.NET are calling the functions. I
        am beginning to think this is impossible because of the different
        programming interface inherent in both.

        Thanks for your help anyway.


        Comment

        • Tony Toews

          #5
          Re: Access with Activex dll

          "rufus" <heinz@online.d e> wrote:
          [color=blue]
          >That is what I was afraid of. 'The project I am working on requires a
          >'controller' to sit between andMS Access application, vb.net application and
          >the database. The idea is that the vb.net application and the MS Access
          >application send the same calls to the controller and then the controller
          >reacts depending on whether Access or VB.NET are calling the functions. I
          >am beginning to think this is impossible because of the different
          >programming interface inherent in both.[/color]

          You can do this. But you are not using the full power of bound forms, subforms and
          continuous forms. As this then is going to be more work anyhow you might as well
          write the GUI in VB or VB.Net.

          Tony
          --
          Tony Toews, Microsoft Access MVP
          Please respond only in the newsgroups so that others can
          read the entire thread of messages.
          Microsoft Access Links, Hints, Tips & Accounting Systems at

          Comment

          Working...