参考书目:C#6.0学习笔记——从第一行C#代码到第一个项目设计(作者周家安)P346
学习内容:PictureBox控件使用,掌握PictureSizeMode属性,使得图像平铺、拉伸、保持原始尺寸等。
第一步:创建界面如下,包含一个组合框(comboBox)和一个pictureBox控件
第二步:为组合框(comboBox)的SelectedIndexChanged事件添加代码。
第三步:在Form初始化函数中,对组合框(comboBox)添加项,并添加SelectedIndexChaged事件。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Example11_20
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
//处理SelectedIndexChanged事件
com