private void StopPlay2() { this.timer1.Enabled = false; AlterControlStatus(true); this.SetVisibleCore(false); ClsWin32Hide.HideTask(false); this.FormBorderStyle = FormBorderStyle.Sizable; //还原窗口边框 this.WindowState = FormWindowState.Maximized; this.SetVisibleCore(true); }
private void btnFullScreen_Click(object sender, EventArgs e) { if (this.textBox1.Text == "") { this.textPlay.Text = "没有发布任何文字!"; } else { this.textPlay.Text = this.textBox1.Text.TrimEnd().Replace("\r\n\r\n", "\r\n"); } this.textPlay.Focus(); playLines = 0; Graphics graphics = CreateGraphics(); Font strFont = new Font("楷体", CharSize); SizeF sizeF1 = graphics.MeasureString("江苏", new Font("楷体", CharSize)); sizeFHeight = Convert.ToInt16(strFont.Height); for (int ii = 0; ii <= this.textPlay.Lines.GetUpperBound(0); ii++) { SizeF sizeF = graphics.MeasureString(this.textPlay.Lines[ii], new Font("楷体", CharSize)); sizeFWidth = Convert.ToInt16(sizeF.Width); playLines += (sizeFWidth / this.Width + 1); } graphics.Dispose(); this.textPlay.Font = new System.Drawing.Font("楷体", CharSize, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.textPlay.BackColor = System.Drawing.Color.Black; this.textPlay.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.textPlay.ForeColor = System.Drawing.Color.White; this.textPlay.Top = this.Height / 2; this.textPlay.Left = 0; this.textPlay.Width = this.Width; this.textPlay.Height = playLines * sizeFHeight; this.textPlay.Visible = true; this.textPlay.SelectionStart = 0; this.textPlay.SelectionLength = 0; this.timer1.Interval = initTimerInterval; AlterControlStatus(false); ClsWin32Hide.HideTask(true); this.SetVisibleCore(false); this.FormBorderStyle = FormBorderStyle.None; //窗口无边框 this.WindowState = FormWindowState.Maximized; this.SetVisibleCore(true); this.textPlay.Focus(); t.SynchronizingObject = this; t.Elapsed += new System.Timers.ElapsedEventHandler(timersTimer_Elapsed); t.Interval = initTimerInterval; }
private void btnClose_Click(object sender, EventArgs e) { ClsWin32Hide.HideTask(false); this.Close(); }
private void Form1_FormClosed(object sender, FormClosedEventArgs e) { ClsWin32Hide.HideTask(false); }
private void Form1_Load(object sender, EventArgs e) { ClsWin32Hide.HideTask(false); this.WindowState = FormWindowState.Maximized; }