Home > VB Classic > ActiveX Design Mode Detection

ActiveX Design Mode Detection

Following code snippet is quite handy in case you have to design or maintain ActiveX controls in VB6 (Classic).

Private Sub UserControl_Initialize()
    If (UserControl.Ambient.UserMode = True) Then
        MsgBox “runtime”
    Else
        MsgBox “designtime”
    End If
End Sub

Reference: http://www.xtremevbtalk.com/showthread.php?t=140530

Advertisements
Categories: VB Classic
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: