add text to pic
2019-04-15 14:29 发布
生成海报
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.IO; using System.Drawing.Imaging; namespace StudySampleCSharp ... { /**/ /// /// Form1 の概要の説明です。 /// public class Form1 : System.Windows.Forms.Form ... { private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox txtLogo; /**/ /// /// 必要なデザイナ変数です。 /// private System.ComponentModel.Container components = null ; private System.Windows.Forms.Button btnForeColor; private System.Windows.Forms.Button btnBackColor; private System.Windows.Forms.Button btnFonts; private System.Windows.Forms.ComboBox cmbPosition; private System.Windows.Forms.Button btnExcute; private System.Windows.Forms.ListBox listBoxFile; private System.Windows.Forms.Button btnSource; private System.Windows.Forms.Button btnDestination; private System.Windows.Forms.TextBox txtDestination; private System.Windows.Forms.TextBox txtSource; private Font titleFont = new Font( " MS UI Gothic " , 9 ); private Color foreColor = Color.White; private System.Windows.Forms.Label lblDemo; private System.Windows.Forms.PictureBox pictureBoxDemo; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBox2; private Color backColor = Color.Transparent; public Form1() ... { // // Windows フォーム デザイナ サポートに必要です。 // InitializeComponent(); // // TODO: InitializeComponent 呼び出しの後に、コンストラクタ コードを追加してください。 // } /**/ /// /// 使用されているリソースに後処理を実行します。 /// protected override void Dispose( bool disposing ) ... { if ( disposing ) ... { if (components != null ) ... { components.Dispose(); } } base .Dispose( disposing ); } Windows フォーム デザイナで生成されたコード #region Windows フォーム デザイナで生成されたコード /**/ /// /// デザイナ サポートに必要なメソッドです。このメソッドの内容を /// コード エディタで変更しないでください。 /// private void InitializeComponent() ... { this .btnSource = new System.Windows.Forms.Button(); this .listBoxFile = new System.Windows.Forms.ListBox(); this .pictureBoxDemo = new System.Windows.Forms.PictureBox(); this .txtSource = new System.Windows.Forms.TextBox(); this .label1 = new System.Windows.Forms.Label(); this .label2 = new System.Windows.Forms.Label(); this .txtDestination = new System.Windows.Forms.TextBox(); this .txtLogo = new System.Windows.Forms.TextBox(); this .btnFonts = new System.Windows.Forms.Button(); this .btnForeColor = new System.Windows.Forms.Button(); this .btnBackColor = new System.Windows.Forms.Button(); this .cmbPosition = new System.Windows.Forms.ComboBox(); this .btnExcute = new System.Windows.Forms.Button(); this .btnDestination = new System.Windows.Forms.Button(); this .lblDemo = new System.Windows.Forms.Label(); this .textBox1 = new System.Windows.Forms.TextBox(); this .textBox2 = new System.Windows.Forms.TextBox(); this .SuspendLayout(); // // btnSource // this .btnSource.Location = new System.Drawing.Point( 512 , 8 ); this .btnSource.Name = " btnSource " ; this .btnSource.TabIndex = 1 ; this .btnSource.Text = " Source Fold " ; this .btnSource.Click += new System.EventHandler( this .btnSource_Click); // // listBoxFile // this .listBoxFile.ItemHeight = 12 ; this .listBoxFile.Location = new System.Drawing.Point( 8 , 88 ); this .listBoxFile.Name = " listBoxFile " ; this .listBoxFile.Size = new System.Drawing.Size( 184 , 304 ); this .listBoxFile.TabIndex = 3 ; this .listBoxFile.SelectedIndexChanged += new System.EventHandler( this .listBoxFile_SelectedIndexChanged); // // pictureBoxDemo // this .pictureBoxDemo.BackColor = System.Drawing.SystemColors.Info; this .pictureBoxDemo.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this .pictureBoxDemo.Location = new System.Drawing.Point( 384 , 88 ); this .pictureBoxDemo.Name = " pictureBoxDemo " ; this .pictureBoxDemo.Size = new System.Drawing.Size( 304 , 304 ); this .pictureBoxDemo.TabIndex = 4 ; this .pictureBoxDemo.TabStop = false ; // // txtSource // this .txtSource.Location = new System.Drawing.Point( 80 , 8 ); this .txtSource.Name = " txtSource " ; this .txtSource.Size = new System.Drawing.Size( 408 , 19 ); this .txtSource.TabIndex = 5 ; this .txtSource.Text = "" ; // // label1 // this .label1.Location = new System.Drawing.Point( 8 , 8 ); this .label1.Name = " label1 " ; this .label1.Size = new System.Drawing.Size( 56 , 23 ); this .label1.TabIndex = 6 ; this .label1.Text = " Source: " ; // // label2 // this .label2.Location = new System.Drawing.Point( 8 , 40 ); this .label2.Name = " label2 " ; this .label2.Size = new System.Drawing.Size( 72 , 23 ); this .label2.TabIndex = 7 ; this .label2.Text = " Destination: " ; // // txtDestination // this .txtDestination.Location = new System.Drawing.Point( 80 , 40 ); this .txtDestination.Na
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮