先在项目引用,添加引用控件,记得是在安装目录里的(如引用出错,是由于引用的Dll文件错了,再找找其他文件夹的dll添加),然后在Program里写下面代码:
C# // The code in CODE SECTION has to be called in Main() function, // before Application.Run() using DMSoft; ... DMSoft.SkinCrafter.Init(); /* ------------ Begin of CODE SECTION ------------- */ DMSoft.SkinCrafter SkinOb = new DMSoft.SkinCrafter(); SkinOb.InitLicenKeys("SKINCRAFTER","SKINCRAFTER.COM","support@skincrafter.com","DEMOSKINCRAFTERLICENCE"); SkinOb.InitDecoration(true); /* ------------ End of CODE SECTION ------------- */ SkinOb.LoadSkinFromFile("D:\\Skin.skf"); SkinOb.ApplySkin(); Application.Run(new Form1()); SkinOb.DeInitDecoration(); DMSoft.SkinCrafter.Terminate();
VB.Net Imports DMSoft ... Public SkinOb As DMSoft.SkinCrafter ' The code in CODE SECTION has to be called before InitializeComponent() function ' --------- Begin of CODE SECTION ---------- ' DMSoft.SkinCrafter.Init() SkinOb = New DMSoft.SkinCrafter 'These function parameters are used for Skincrafter DEMO SkinOb.InitLicenKeys("SKINCRAFTER", "SKINCRAFTER.COM", "support@skincrafter.com", "DEMOSKINCRAFTERLICENCE") SkinOb.InitDecoration(1) ' --------- End of CODE SECTION ---------- ' SkinOb.LoadSkinFromFile("C:\\Program Files\\SkinCrafter.Net\\Skins\\Amazonite.skf") SkinOb.ApplySkin()
转载于:https://blog.51cto.com/3159564/676394