A3-輸出入介面
TextBox.ForeColor = Color.Red;
richTextBox1.SelectionFont = new Font("Arial", 12);
richTextBox1.SelectionColor = Color.Purple;
------------------------------------------------------------------------------------------
1.讀取檔案至image類別
Image myPic = Image.FromFile(@"C:\Documents and Settings\ggyy\My Documents\1.PNG");
2.顯示圖片至pictureBox1
this.pictureBox1.BackgroundImage = myPic;
上述動作只要將Image換成Bitmap,一樣可以完成相同功能。
Bitmap myBit = new Bitmap(@"C:\Documents and Settings\ggyy\My Documents\1.PNG");
如何在控件背景顯示圖片
OK==>pictureBox1.BackgroundImage= Image.FromFile(@"D:\123.jpg");
------------------------------------------------------------------------------------------