Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling activex control in form
Message
From
15/11/2001 12:44:50
 
 
To
15/11/2001 12:09:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00581654
Message ID:
00582223
Views:
32
You should remove the ActiveX from your form and instanciate it the way a taught you in my previous message.

LUIS


>My problem was that I already have a mscomm control in form.
>However, if mscomm control is not registered, an error occurs.
>I cannot test my program without having mscomm control installed since it is not possible to un-install ( or un-register) mscomm after vfp is installed:
>do form re-registers it.
>
>>You can do the following in any method in your form, you can check whether it is instanciated or not. Note that "MSCommLib.MSComm" is the CLSID for the ActiveX you can easily see it in the properties window at OleClass, often it ends with a 'dot and number' but this is to indicate just the version. You can ignore it.
>>
>>
>>Thisform.AddProperty( "oo", .NULL.) && Create form property
>>lcOnError= On( "Error")
>>On Error * Do nothing
>>Thisform.oo= CreateObject("MSCommLib.MSComm")
>>On Error &lcOnError
>>If IsNull( Thisform.oo)
>> ** Object didn't instanciate
>> ** Here goes your own code
>>EndIf
>>
>>
>>
>>>I added an MSCOMM control to form in form designer.
>>>I need that this control will not be created this control in not present on the user's computer.
>>>
>>>Is it sufficient to add
>>>
>>>RETURN .F.
>>>
>>>to init event of activex control in form to prevent error if this control is not present in user's computer ?
>>>
>>>I cannot test it in my computer since it is not possible to unregister mscomm control.
>>>regrvr32 /u shows success but if I run the form, the control is registered automatically. Why?
Previous
Reply
Map
View

Click here to load this message in the networking platform