باستخدام النظام؛
باستخدام System.Collections.Generic؛
باستخدام System.Text؛
باستخدام System.Windows.Forms؛
باستخدام System.Drawing؛
مساحة الاسم SlashScreenLib
{
الفئة العامة SlashScreenForm:Form
{
static SlashScreenForm slashScreen؛
الصورة النقطية الصورة النقطية؛
SlashScreenForm العام الثابت SlashScreen
{
يحصل
{
إذا (شاشة مائلة == خالية)
{
slashScreen = new SlashScreenForm();
}
إرجاع الشاشة المائلة؛
}
}
نموذج SlashScreenForm العام ()
{
// SlashScreen تم تحديدها بواسطة SlashScreen
this.StartPosition = FormStartPosition.CenterScreen;
// 应该没有边框
this.FormBorderStyle = FormBorderStyle.None;
// قم بتنزيل الصورة المائلة لشاشة SlashScreen
bitMap = Resources.Resource.SlashScreen;
//الحصول على أفضل النتائج
this.ClientSize = bitMap.Size;
//在图片上写上字
باستخدام (Font f = new Font("宋体"، 18))
{
باستخدام (Graphics g = Graphics.FromImage(bitMap))
{
g.DrawString("Jillzhang", f, Brushes.Black, 100, 142);
}
}
this.BackgroundImage = bitMap;
}
التخلص من الفراغ المحمي (التخلص المنطقي)
{
base.Dispose(disposition);
إذا (تخلص)
{
إذا (خريطة نقطية != فارغة)
{
bitMap.Dispose();
bitMap = null;
}
}
}
}
}