Tuesday, May 12, 2009

Use appface in application C#

ปรับแต่งหน้าตาให้ application C# เราซะหน่อย

1. Download appface.dll

2. Get skins package sample on in zip file it contain files urf

3. copy and paste appface.dll in same program.exe folder or system32 folder

4. create folder skin in same programe.exe folder name "skins" and extract files urf in skins package

5. download tool for get sample project and install it when install finished goto "Start => AppFace UI Development Kits => Samples Folder => DemoCS" or "AppFace UI Development Kits => AppFace Two Lines Samples Folder => SampleCS " find AppFace.cs in sample project and add to project us or we can look sample in sample code for apply to project us.

6. in code c# add 2 green line

AppFace.SkinStart("/skins/sap.urf", AppFace.WINDOW_TYPE_NET, "", 1, 0, 0);

Application.Run(new MainForm());

AppFace.SkinRemove();

......................................................................

private void Form1_Load(object sender, System.EventArgs e)
{
//It should skin Groupbox and panel manually for dotnet projects , because AppFace can not identify them automatically
AppFace.SkinWindowSet(groupBox1.Handle,AppFace.SKIN_CLASS_GROUPBOX) ;


//Skin the hyperlink control
AppFace.SkinWindowSet(label1.Handle,AppFace.SKIN_CLASS_HYPERLINK) ;
AppFace.SkinWindowSet(linkLabel1.Handle,AppFace.SKIN_CLASS_HYPERLINK) ;
}

7. if exist this code we must comment it by // both line

//Application.EnableVisualStyles();
//Application.SetCompatibleTextRenderingDefault(false);


8. i'm not sure appface.dll can use only 30 day or not.

Note

if we have follow this code it will have problem about display of checkbox and radio and other not sure


Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);


AppFace.SkinStart("/skins/sap.urf", AppFace.WINDOW_TYPE_NET, "", 1, 0, 0);

Application.Run(new MainForm());

AppFace.SkinRemove();

if we comment it will display follow this


//Application.EnableVisualStyles();
//Application.SetCompatibleTextRenderingDefault(false);


AppFace.SkinStart("/skins/sap.urf", AppFace.WINDOW_TYPE_NET, "", 1, 0, 0);
Application.Run(new MainForm());

AppFace.SkinRemove();

Prblem
  • have problem with another thread and loadbar and mini ,max button of inner form
  • problem about start position x, y of form when maximize form problem by set property of form "WindowState = Normal"
  • after that we can change windowstate property to another we need

More

No comments:

Post a Comment

Popular Posts