当前位置: 首页 > news >正文

自己建个电影网站可以吗wordpress企业网站 教程

自己建个电影网站可以吗,wordpress企业网站 教程,精通网站建设pdf,NET网站开发程序员招聘项目场景#xff1a; 在 WinForms 中制作 无边框窗体#xff08;FormBorderStyle None#xff09;时#xff0c;默认失去了窗口的标题栏与边框#xff0c;因此也失去了通过鼠标拖动移动和调整大小的能力。本例子通过一个标题栏来拖动窗体#xff0c;通过状态栏右下角的…项目场景 在 WinForms 中制作 无边框窗体FormBorderStyle None时默认失去了窗口的标题栏与边框因此也失去了通过鼠标拖动移动和调整大小的能力。本例子通过一个标题栏来拖动窗体通过状态栏右下角的地方来拖动来改变窗体大小。本例子创建了两个窗体。一个baseform用来放标题栏和状态栏。 问题描述 提示这里描述项目中遇到的问题 难点是我窗体上被标题栏和状态栏dock之后很难选中 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;namespace WindowsFormsApp1 {public partial class Form1: Form{public Form1(){InitializeComponent();panel1.MouseMove panel1_MouseMove;panel1.MouseDown panel1_MouseDown;panel1.MouseUp Panel1_MouseUp;panel2.MouseDown PanelTitle_MouseDown;this.DoubleBuffered true;}[DllImport(user32.dll)]public static extern bool ReleaseCapture();[DllImport(user32.dll)]public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);public const int WM_NCLBUTTONDOWN 0xA1;public const int HTCAPTION 0x2;private void PanelTitle_MouseDown(object sender, MouseEventArgs e){if (e.Button MouseButtons.Left){ReleaseCapture();SendMessage(this.Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);}}private void Panel1_MouseUp(object sender, MouseEventArgs e){if (e.Button MouseButtons.Left){this.Size previousRect.Size;isResizing false;}}private bool isResizing false;private Point lastMousePos;private Size lastMouseSize;private Size NewMouseSize;private const int resizeArea 15;private Rectangle previousRect;private void panel1_MouseMove(object sender, MouseEventArgs e){bool inBottomRight e.X panel1.Width - resizeArea e.Y panel1.Height - resizeArea;if (inBottomRight || isResizing)panel1.Cursor Cursors.SizeNWSE;elsepanel1.Cursor Cursors.Default;if (isResizing e.Button MouseButtons.Left){int dx e.X - lastMousePos.X;int dy e.Y - lastMousePos.Y;Size newSize new Size(lastMouseSize.Width dx,lastMouseSize.Height dy);Rectangle newRect new Rectangle(this.Location, newSize);previousRect newRect;OnUpdateRichTextBox?.Invoke($ lastMousePos.X:{lastMousePos.X} lastMousePos.Y:{lastMousePos.Y} e.Y:{e.Y} e.X:{e.X} dx:{dx} dy:{dy}, Color.Black);}}private void panel1_MouseDown(object sender, MouseEventArgs e){if (e.Button MouseButtons.Left e.X panel1.Width - resizeArea e.Y panel1.Height - resizeArea){lastMouseSize this.Size;isResizing true;lastMousePos e.Location;}}public event Actionstring , Color OnUpdateRichTextBox;/// summary/// 改变richtextbox 当前插入行颜色/// /summary/// param namertBox/param/// param nameaddtext/param/// param namecolor/param/// param nameIsaddNewLine/parampublic void AppendTextColorful(RichTextBox rtBox, string addtext, Color color, bool IsaddNewLine false){if (IsaddNewLine){addtext Environment.NewLine;}try{if (rtBox.InvokeRequired){rtBox.Invoke(new Action(() {rtBox.ScrollToCaret();rtBox.SelectionStart rtBox.TextLength;rtBox.SelectionLength 0;rtBox.SelectionColor color;rtBox.AppendText(DateTime.Now.ToString(yyyy:MM:dd HH:mm:ss:fff) addtext \r\n);rtBox.SelectionColor rtBox.ForeColor;if (rtBox.Lines.Length 1000)rtBox.Clear();}));}else{rtBox.ScrollToCaret();rtBox.SelectionStart rtBox.TextLength;rtBox.SelectionLength 0;rtBox.SelectionColor color;rtBox.AppendText(DateTime.Now.ToString(yyyy:MM:dd HH:mm:ss:fff) addtext \r\n);rtBox.SelectionColor rtBox.ForeColor;if (rtBox.Lines.Length 1000)rtBox.Clear();}if (!Directory.Exists($Log\\)){Directory.CreateDirectory($Log\\);}//LoggerUtility.Instance.WriteLog(addtext, normal);}catch (Exception ex){//LoggerUtility.Instance.WriteException(ex);}}} } using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;namespace WindowsFormsApp1 {class Class1:Form1{private RichTextBox richTextBox1;public Class1(){InitializeComponent();OnUpdateRichTextBox UpdateTextBox1;}//RichTextBox richTextBox1;private void UpdateTextBox1(string str, Color clr){AppendTextColorful(richTextBox1, str, clr);}private void InitializeComponent(){this.richTextBox1 new System.Windows.Forms.RichTextBox();this.SuspendLayout();// // richTextBox1// this.richTextBox1.Dock System.Windows.Forms.DockStyle.Fill;this.richTextBox1.Location new System.Drawing.Point(0, 57);this.richTextBox1.Name richTextBox1;this.richTextBox1.Size new System.Drawing.Size(1232, 503);this.richTextBox1.TabIndex 2;this.richTextBox1.Text ;// // Class1// this.AutoScaleDimensions new System.Drawing.SizeF(8F, 15F);this.ClientSize new System.Drawing.Size(1232, 606);this.Controls.Add(this.richTextBox1);this.Name Class1;this.Controls.SetChildIndex(this.richTextBox1, 0);this.ResumeLayout(false);}} }
http://www.tj-hxxt.cn/news/222579.html

相关文章:

  • 网站开发平台是什么利用免费网站做SEO
  • 滨州网站网站建设网站类型案例
  • 电力建设网站电子政务网站开发
  • 景德镇做网站安徽网站建设电话
  • 华讯网络工程师待遇无锡关键词优化报价
  • 百度如何把网站做链接地址品牌网站定制
  • 龙华网站建设推广平台程序员必备软件
  • 网站权重为零深圳软装设计公司有哪些
  • 网站制作 台州网站排名首页前三位
  • 网站创作规划做网站百灵鸟
  • 石家庄的网站建设公司哪家好手机手机网站制作
  • 有什么网站可以做名片WordPress 布局 企业网站
  • 滑动 手机网站 代码加强图书馆网站建设
  • 一般网站建设大概需要多少钱诚信企业查询系统
  • 福州专业网站设计团队湖南城市建设网站
  • 桂林市建设局网站wordpress置顶重复
  • 做网站建设的公司有哪些深圳策划公司网站
  • 招标网站建设申请报告济南市建设工程招标投标协会网站
  • 常州网站建设推广平台本科自考和专升本的区别
  • 推广平台有哪些渠道台州百度搜索优化
  • 做网站的流程与步骤哪个软件做网站最简单
  • 织梦网站建设视频免费刷seo
  • 建设微网站多少钱wordpress端口
  • 广州网站设计与制作公司在线查询营业执照
  • 自己网站给别人网站做外链怎样做网站的优化排名
  • 微网站怎么免费做上海品划做网站
  • 外贸网站公司网站系统模版
  • 大连企业网站设计网站推广定义
  • 外网网址可以做英语阅读的网站上海注册公司核名在哪个网站
  • 400电话安装佛山营销网站建设本地丹阳网站建设