Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - Skinning .NET forms in a ActiveX environment?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skinning .NET forms in a ActiveX environment?

 Post Reply Post Reply
Author
Message
elzenga View Drop Down
Newbie
Newbie


Joined: 26 July 2010
Location: Netherlands
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote elzenga Quote  Post ReplyReply Direct Link To This Post Topic: Skinning .NET forms in a ActiveX environment?
    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?

Back to Top
menegrete View Drop Down
Newbie
Newbie


Joined: 17 November 2010
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote menegrete Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2011 at 1:49pm
button1.FlatStyle = FlatStyle.System;

That will do the trick
Back to Top
elzenga View Drop Down
Newbie
Newbie


Joined: 26 July 2010
Location: Netherlands
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote elzenga Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2011 at 10:32am
Did you look at our .NET skin samples?  If not, try the latest version.
Back to Top
elzenga View Drop Down
Newbie
Newbie


Joined: 26 July 2010
Location: Netherlands
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote elzenga Quote  Post ReplyReply Direct Link To This Post 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......
Back to Top
elzenga View Drop Down
Newbie
Newbie


Joined: 26 July 2010
Location: Netherlands
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote elzenga Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.