program.cs

来自「一个基本的酒店管理系统」· CS 代码 · 共 39 行

CS
39
字号
using System;
using System.Windows.Forms;
using System.Runtime;
using System.Runtime.InteropServices;

namespace UI
{
	/// <summary>
	/// Index 的摘要说明。
	/// </summary>
	public class Program
	{
		//------------------------------------------------------------------------
		//指示该属性化方法由非托管动态链接库 (DLL) 作为静态入口点公开。引入皮肤接口  [关键代码]
		[DllImport(@"appface.dll")]		//注意路径
		public static extern int SkinStart(string SkinFile,int nDefWinType,int CheckSum,int nType,
			int hInstance,int nLen);
		[DllImport(@"appface.dll")]
		public static extern int SkinRemove() ;		
		[DllImport(@"appface.dll")]
		public static extern int SkinWindowSet(IntPtr hWnd,int nSkintype);
		[DllImport(@"appface.dll")]
		public static extern int SkinWindowSetEx(IntPtr hWnd,int nSkintype,int nResourceId,
			int nUrfLoadType,string SkinFile,int hInstance,int nLen);
		//------------------------------------------------------------------------
		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			//加载皮肤(加载你需要的皮肤,注意路径)[关键代码]
			SkinStart("skin\\wine.urf",0,0,1,0,0);
			Application.Run(new LoginUI());
			SkinRemove();//[关键代码]
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?