Link to home
Start Free TrialLog in
Avatar of Matti
MattiFlag for Finland

asked on

How can i know when my .NET component is loaded in IDE on runs in PE app

I have build my first .NET component. To make a licence system i need in it a solution which can detect when it's in desing environment or when it runs in exe.
Is there events which fires on IDE only ? (VB 6.0 had UserControl_InitProperties() for this)

Matti
ASKER CERTIFIED SOLUTION
Avatar of ctm5
ctm5

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Matti

ASKER

ctm5:
I did get this working but it only meet the condition in debuger.
However I was able to stop the debuging process.
What I want is the IDE when someone loads my component there.
So it's a bit spare like solution in this.  

gbzhhu:
I was not able to do anyting whit this
I did open the object browser and i found System.ComponentModel.Design but there was a prompt can't use as expression.
Could you give me the complete line how to test against it is it loading in the IDE.

Matti
Sorry forgot this is a VB TA

Try that

if Me.DesignMode then
    ....
End If
Avatar of Matti

ASKER

Hi!

I don't get it working,  i had it in Sub New() inside on my component project.

Matti
what do you mean?  do you get an error or does it always return false?
Avatar of Matti

ASKER

Returns always false
That case I am not sure why