Results 1 to 2 of 2

Thread: DLL Creation Question

  1. #1

    Thread Starter
    Addicted Member JasonGS's Avatar
    Join Date
    May 2000
    Location
    California
    Posts
    155
    Im writing an ActiveX .DLL and I would like to be able to tell if the user is running the control in Run mode or if it's being called by a compiled .EXE.

    For instance, when I'm writing software and testing it by running the project with F5, I want it to do "this". When it's being referenced from a compiled .EXE, I want it to do "that".

    I've seen this done before, but I can't find the code to it... any help would be appreciated.

  2. #2
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752

    Post

    You can check the Ambient object's UserMode Property like this


    Private Sub UserControl_Paint()
    if ambient.UserMode=True Then
    'running application
    else

    'designtime
    end if

    End Sub
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width