Print Page | Close Window

How to apply skin in c#

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=4306
Printed Date: 29 April 2024 at 9:03am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to apply skin in c#
Posted By: khmer_lovers
Subject: How to apply skin in c#
Date Posted: 29 May 2006 at 10:00pm

Hi Expert,

I am new to C#, moving from VB 6.0 pro.  Anyway been playing around in C# with a copy of evaluation of Codejock Suite Pro 10.1.1 all looking really impressive.

I am managed to get the form to apply skin fine but for other controls on the form they are not.  Not sure what i did wrong, can anyone help.

Here is my code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using AxXtremeSkinFramework;

namespace CSharp
{
    public partial class Form1 : Form
    {
        bool bInitFormHwnd = false;

        public Form1()
        {
             InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
              ApplySkin(1);
        }

        private void InitializeFormHwnd()
        {
             if (bInitFormHwnd != true)
             {
                 xtrSkinFrame.ApplyWindow(Handle.ToInt32());
                 xtrSkinFrame.ApplyOptions = 6 + XtremeSkinFramework.SkinFrameworkApplyOptions.xtpSkinApplyMe trics;
                 bInitFormHwnd = true;
             }
        }
        private void ApplySkin(int iSkin)
        {
            
           //1 = Luna, 2 = Office 2007, 3 = Royale, 4 = System Default
             if (iSkin == 1)
                 xtrSkinFrame.LoadSkin ("Styles\\WinXP.Luna.cjstyles", "NormalBlue.ini");
             else if (iSkin == 2)
                 xtrSkinFrame.LoadSkin ("Styles\\Office2007.cjstyles", "NormalOffice2007.ini");
             else if (iSkin == 3)
                 xtrSkinFrame.LoadSkin("Styles\\WinXP.Royale.cjstyles", "NormalRoyale.ini");
             else
                 xtrSkinFrame.LoadSkin ("", "");

             InitializeFormHwnd();
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
             switch (comboBox1.SelectedIndex)
             {
                 case 0:
                      ApplySkin(1);
                     break;

                 case 1:
                     ApplySkin(2);
                     break;

                 case 2:
                     ApplySkin(3);
                     break;

                 default:
                     ApplySkin(4);
                     break;
             }
        }
    }
}

PS. I have placed InitializeComponent() method before and after ApplySkin() method too but made no different.

Many thanks in advance.

 




Replies:
Posted By: SuperMario
Date Posted: 29 May 2006 at 10:42pm
SkinFramework is only fully supported in VB 6.0, no other environments.


Posted By: khmer_lovers
Date Posted: 29 May 2006 at 10:45pm

Hi,

That is nice to know.

-----------

Just to let you know, i have just tried in vb .NET 2005, it is partly working. The progress bar, pageframe, slidbar are working but not the standard control like button or checkbox etc....

Anyway i hope it is going to work in the next version



Posted By: SuperMario
Date Posted: 29 May 2006 at 11:38pm
Haven't tried it yet, but if you used the VB 6 version of the activeX controls you could probly still use C#.  But .NET stuff is not yet supported.


Posted By: khmer_lovers
Date Posted: 29 May 2006 at 11:39pm
Thanks


Posted By: apuhjee
Date Posted: 30 May 2006 at 12:00pm


I'll just sit here and mope until we get this for C#...

-------------
I like mathematics because it is not human and has nothing particular
to do with this planet or with the whole accidental universe — because,
like Spinoza's God, it won't love us in return.


Posted By: tobi
Date Posted: 02 June 2006 at 2:42pm
Will v10.2 bring more support for .net (c#) ?


Posted By: SuperMario
Date Posted: 02 June 2006 at 3:01pm
no


Posted By: tobi
Date Posted: 06 June 2006 at 4:12pm
Will there be SkinFramework support in one of the next releases or isn´t this possible for .net c# applications ?


Posted By: tobi
Date Posted: 12 June 2006 at 2:40pm
any news on this ?


Posted By: khmer_lovers
Date Posted: 12 June 2006 at 6:41pm
Been testing v10.2 still no support for c#


Posted By: apuhjee
Date Posted: 03 August 2006 at 12:18pm
10.3... any closer to skinning in .NET?



-------------
I like mathematics because it is not human and has nothing particular
to do with this planet or with the whole accidental universe — because,
like Spinoza's God, it won't love us in return.


Posted By: SuperMario
Date Posted: 03 August 2006 at 12:32pm
Not yet



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