Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
C# C++ C語言 的問題
May 28th 2013, 15:03

1.以下應該是宣告吧?可以縮短嗎?如何縮短呢?

Bitmap image26, image27, image28, image29,
image30, image31, image32, image33,
image34;

2.下面十個可以縮短為一句嗎?還是只能這樣

private void Form1_Load(object sender, EventArgs e)

pictureBox26.Visible = false; pictureBox27.Visible = false;
pictureBox28.Visible = false; pictureBox29.Visible = false;
pictureBox30.Visible = false; pictureBox31.Visible = false;
pictureBox32.Visible = false; pictureBox33.Visible = false;
pictureBox34.Visible = false; pictureBox34.Visible = false;

3.這程式的意思?

private void timer_Tick(object sender, EventArgs e)
{
switch (N % 3)
{
case 0:
Picture.Image = ImageList.Images[0];
N++;
break;
case 1:
Picture.Image = ImageList.Images[1];
N++;
break;
case 2:
Picture.Image = ImageList.Images[2];
N = 0;
break;
}
}

4.在click事件裡如何縮短以下程式?

image26 = new Bitmap(a, b); image27 = new Bitmap(a, b); image28 = new Bitmap(a, b);
image29 = new Bitmap(a, b); image30 = new Bitmap(a, b); image31 = new Bitmap(a, b);
image32 = new Bitmap(a, b); image33 = new Bitmap(a, b); image34 = new Bitmap(a, b);

--------------------------

5.在click事件裡如何縮短以下程式?

pictureBox26.Image = image26; pictureBox27.Image = image27; pictureBox28.Image = image28;
pictureBox29.Image = image29; pictureBox30.Image = image30; pictureBox31.Image = image31;
pictureBox32.Image = image32; pictureBox33.Image = image33; pictureBox34.Image = image34;

懇請各大程式高手解答
因為內容很多 所以贈與20點 謝謝各位

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - http://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 sdfgdf2 的頭像
    sdfgdf2

    中文名字日文翻譯, 中文翻譯日文名字, 名字日文翻譯, 日文翻譯名字, 日文翻譯字典發音, 日文翻譯網 漢字,

    sdfgdf2 發表在 痞客邦 留言(0) 人氣()