原文 http://www.3geye.net/?3/viewspace-3235
给WinCE程序加上菜单的功能。
_M.S8G8GAAq3
"e+?U2SKLg9e3WR9H3 public void createMainMenu()
:P9~;qK9`+e
@3 {
#X.ovClyE
a3 // Create an empty MainMenu.
HQ�QdOK
n3 MainMenu mainMenu = new MainMenu();
[:W&r)VgIG33GEYE%O)\g)kZ8V2c s/x~
MenuItem menu = new MenuItem();3GEYE(f;uJ7DQ
3GEYE`EF-G4z\
i;W9T
U
s&\
m)rs3 menu.Text = "菜单";
~:X,Nj:M3 MenuItem menuItem = new MenuItem();3GEYE$R3[wGR*Q
menuItem.Text = "打开网页";3GEYE)U0KP*h,k5mRog
menu.MenuItems.Add(menuItem);3GEYE
x^Tip/j2X
3GEYE]#w1F!|:^-b kc
menuItem = new MenuItem();
v"m,@9D3P"{�u\Z.s3 menuItem.Text = "源代码";
L'y5|FT7J#MD1vo9h3 menu.MenuItems.Add(menuItem);3GEYE8q,n
[cI
wR.Z+_5M
3GEYE
atI
bNi
menuItem = new MenuItem();
cwV3l/p:U#Pdw!R3 menuItem.Text = "退出";
x)Ff%UO9c.A3 menu.MenuItems.Add(menuItem);
H/U CgzG.mw3
K^A"A)E3 // Add two MenuItem objects to the MainMenu.3GEYE9MY
I
c3Pl$a
mainMenu.MenuItems.Add(menu);3GEYE%E6A]I*t*oTj_
6P1S-?7J9B-Do33GEYE"}Mdl"n1ci:y
// Bind the MainMenu to Form1.
D%G]3_,`1o3 Menu = mainMenu;
h
sT;w2l;b'I(c|;f3 }
Cc0[E3L|?d(t3
5WH1X/v1t3
^~7nB~*j3 感觉微软的东西就是简单。