Results 1 to 2 of 2

Thread: ActiveX Control Run Time vs. Design Time

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Question ActiveX Control Run Time vs. Design Time

    Hi...

    OK, I want to know how can I find out in my ActiveX Control, if the control is used at design time, or run time. I have code in my ActiveX Control that runs in design time, and I DON'T want it to run.
    For example if I put a message in the UserControl_Initialize() saying "Hello...", I get the message when I put the control on the form at design time, and I don't want that, but I want it to show the message when I run the program with the control on it...

    So, the general idea is: How do I prevent code to run at design time?

    Thank you in advance...

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Smile Never mind, I figured it out myself...

    Code:
    If UserControl.Ambient.UserMode Then
        '  application is running
    Else
        '  applocation is in design mode
    End If

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