Call the start method to start a default Internet browser.
System. Diagnostics. process. Start ("http://www.baidu.com ");
Form1 button mobile control
C # Code
Using system; using system. collections. generic; using system. componentmodel; using system. data; using system. drawing; using system. text; using system. windows. forms; namespace man100 {public partial class form1: FORM {public form1 () {initializecomponent ();} public static int buchang = 5; private void form1_keydown (Object sender, keyeventargs E) {// MessageBox. show (E. keyValue. tostring (); // specifies the int value of the key. // MessageBox. show (E. keycode. tostring (); // used to find the key value if (E. keycode. tostring (). equals ("Left") // left {// MessageBox. show ("Left"); // label1.location = new point (0, 0); int x_zuobiao = label1.location. x; int y_zuobiao = label1.location. y; If (label1.location. x <15) {label1.location = new point (x_zuobiao, y_zuobiao); return;} label1.location = new point (x_zuobiao-buchang, y_zuobiao);} else if (E. keycode. tostring (). equals ("up") // {// MessageBox. show ("On"); int x_zuobiao = label1.location. x; int y_zuobiao = label1.location. y; If (label1.location. Y <15) {label1.location = new point (x_zuobiao, y_zuobiao); return;} label1.location = new point (x_zuobiao, y_zuobiao-buchang);} else if (E. keycode. tostring (). equals ("right") // right {// MessageBox. show ("right"); int x_zuobiao = label1.location. x; int y_zuobiao = label1.location. y; If (label1.location. x> 265) {label1.location = new point (x_zuobiao, y_zuobiao); return;} label1.location = new point (x_zuobiao + buchang, y_zuobiao);} else if (E. keycode. tostring (). equals ("down") // {// MessageBox. show ("bottom"); int x_zuobiao = label1.location. x; int y_zuobiao = label1.location. y; If (label1.location. y> 395) // if the limit is exceeded, {label1.location = new point (x_zuobiao, y_zuobiao); return;} label1.location = new point (x_zuobiao, y_zuobiao + buchang );}}}}
Form2
Linklabel usage
C # code
Using system; using system. collections. generic; using system. componentmodel; using system. data; using system. drawing; using system. text; using system. windows. forms; namespace man100 {public partial class form2: FORM {public form2 () {initializecomponent (); this. linklabel1.text = "black hair Baidu Google Yahoo"; this. linklabel1.links. add (0, 4, "http://www.heisetoufa.javaeye.com"); // The first parameter sets where the underline starts and the second parameter sets The underline occupies several lengths. This. linklabel1.links. add (5, 2, "http://www.baidu.com"); this. linklabel1.links. add (8, 6, "http://www.google.com");} private void linklabel1_linkclicked (Object sender, linklabellinkclickedeventargs e) {This. linklabel1.links [linklabel1.links. indexof (E. link)]. visited = true; string target = E. link. linkdata as string; If (target! = NULL & target. startswith ("http: //") {system. diagnostics. process. start (target);} else {MessageBox. show ("item clicked:" + target );}}}}
Turn from black hair: http://heisetoufa.javaeye.com/blog/348167source code download:
Man100.rar (34.7 KB)
C0000000000block source code .rar (168 KB)
Call the start method to start a default Internet browser.
System. Diagnostics. process. Start ("http://www.baidu.com ");
Form1 button mobile control