Groups
Groups
Sign in
Groups
Groups
コレックスチーム
Conversations
About
Send feedback
Help
C# Windowsのバージョン
8 views
Skip to first unread message
松浦
unread,
Oct 24, 2013, 9:25:56 PM
10/24/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to collex
collexメーリングリストの皆さま
お世話になっております。松浦です。
C#.netネタです。
C#.netにてWindowsのバージョンを知りたい時の処理です。
//プラットフォームの取得
System.OperatingSystem os = System.Environment.OSVersion;
switch (os.Platform)
{
case System.PlatformID.Win32NT:
switch (os.Version.Major)
{
case 5:
switch (os.Version.Minor)
{
case 0:
MessageBox.Show("2000");
break;
case 1:
MessageBox.Show("XP");
break;
case 2:
MessageBox.Show("2003");
break;
}
break;
case 6:
switch (os.Version.Minor)
{
case 0:
MessageBox.Show("Vista");
break;
case 1:
MessageBox.Show("7");
break;
case 2:
MessageBox.Show("8");
break;
}
break;
}
break;
}
って感じです。
松浦
unread,
Nov 10, 2013, 12:29:21 AM
11/10/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to collex
collexメーリングリストの皆さま
お世話になっております。松浦です。
C#.netネタです。
ボタンイベントやその他アイテムのクリックイベントにて、
クリックされたアイテムの名前を取得した際のソースコードです。
今まであまり使用しなかったのですが、
最近結構使うことがありまして・・・。
private void Btn_Click(object sender, EventArgs e)
{
Button Btn = (Button)sender;
MessageBox.Show(Btn .Name.ToString());
}
って感じです。
2013年10月25日 10:25 松浦
<
d.5647....@gmail.com
>
:
Reply all
Reply to author
Forward
0 new messages