一般來講是把存放圖片的資料夾放在
\bin\Debug\
因為通常在這個資料夾下compile
比起絕對路徑而言,加入關鍵字
Master Sarge 發表在 痞客邦 留言(0) 人氣(7,151)
貼code測試
雖然好像還是有點怪怪就將就吧0.0
using System;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WindowsPratice_1
{
class Class1
{
public static void Main()
{
DialogResult dr = MessageBox.Show("Hello World!","Caption: Hello World!",MessageBoxButtons.AbortRetryIgnore,
MessageBoxIcon.Warning,MessageBoxDefaultButton.Button2,MessageBoxOptions.ServiceNotification);
switch (dr)
{
case DialogResult.Abort:
MessageBox.Show("Abort");
break;
case DialogResult.Retry:
MessageBox.Show("Retry");
break;
case DialogResult.Ignore:
MessageBox.Show("Igore");
break;
}
}
}
}
Master Sarge 發表在 痞客邦 留言(0) 人氣(84)

其實這只是小小設定問題
VS一開在我們要建立專案時,就有console 和application讓我們選擇
console是小黑窗,application是視窗
我是從 [空專案] 開啟的
Master Sarge 發表在 痞客邦 留言(0) 人氣(4,391)

使用的版本: .NET Framework4
使用的工具: visual stdio 2010
1. 希望compiled 之後出現"按任意鍵繼續" : [Ctrl] + [F5] compiled
2. 若使用visual stdio C# 2010: 可以把"Basic mode"改成"export mode"
Master Sarge 發表在 痞客邦 留言(0) 人氣(195)