Print Page | Close Window

Skinning .NET forms in a ActiveX environment?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=16997
Printed Date: 06 June 2024 at 8:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Skinning .NET forms in a ActiveX environment?
Posted By: elzenga
Subject: Skinning .NET forms in a ActiveX environment?
Date Posted: 26 July 2010 at 9:42am
We are using own build VB.NET dll's (2008) in our older ActiveX applications (VB6) using a activex interface. The .NET dll's are running in-process in de older EXE which is based on ActiveX. The skinning in the apllication it self work fine, but the framework doesn't skin the form from the newer .NET components when they appear.
Though, it is possible to skin if the .NET form by catching the windows handle and using the command:

SkinFramework.ApplyWindow lngDotNetHandle

Now the window IS skinned, but only a few controls and the frame. Buttons for instance are not skinned. Also subforms are not skinned at all.

We have tried the following code:

SkinFramework.AddWindowClass "WindowsForms10.BUTTON.app.0.33c0d9d", "Button"

but that seems to do nothing.

Question: is there a method to skin also all VB.NET forms and components out of a ActiveX (VB6) application in case they are incorporated in the way as described above?




Replies:
Posted By: menegrete
Date Posted: 01 March 2011 at 1:49pm
button1.FlatStyle = FlatStyle.System;

That will do the trick


Posted By: elzenga
Date Posted: 14 March 2011 at 9:02am
Thanks, but nope!
It doesn't seems to work. Maybe you have done some other setting to make it happen?


Posted By: SuperMario
Date Posted: 13 April 2011 at 10:32am
Did you look at our .NET skin samples?  If not, try the latest version.


Posted By: elzenga
Date Posted: 22 July 2011 at 10:28am
No, I didn't: I have not the slightest idea where I can find them or where to download them......


Posted By: elzenga
Date Posted: 27 July 2011 at 10:57am
Problem is solved! 

The trick is to pass a reference of Framework object as Object from the VB6 environment to the .Net DLL and create a local reference of it in the .NET environment (which can be strongly typecasted by creating an interop dll)

Now the ApplyWindow method can be called locally in the .NET environment and hasn't to be initiated by events passed form the .NET environment to the VB6 environment.

If the ApplyWindow method is called from each .NET (sub)form in its Showed Event, skinning works Ok, so the subform issue has been solved as well.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net