I believe those who have used window7 know that some new functions such as jumplist (jump list) are added to the window7 taskbar ),
This is the jumplist of IE8. Now we can use Visual Studio 2010 and C #4.0 to write code to change jumplist and custom.
First, use vs2010 to create a windowform project. net 4.0 architecture), right-click and select the reference point ference (add reference) under solution (on the right of the screen). Here we want to add two DLL file paths: C: \ Program Files \ reference assemblies \ Microsoft \ framework \. select presentationcore for netframework \ v4.0. DLL and presentationframework. DLL. Because the jumplist class is included in the two namespaces.
Reference:
Using system. Windows. shell;
Using system. IO;
The core code is as follows:
Private void btnadd_click (Object sender, eventargs e) {jumptask = new jumptask (); // instantiate a jumptask object jumptask. applicationpath = path. combine (environment. getfolderpath (environment. specialfolder. system), "calc.exe"); // applicationpath is the application path .. Jumptask. iconresourcepath = path. Combine (environment. getfolderpath (environment. specialfolder. System), "calc.exe"); // program icon path. Jumptask. title = "claculator"; // The title jumptask. description = "Start calculator"; // describes jumptask. customcategory = "New Micosoft Tools"; jumptask jumptask1 = new jumptask (); jumptask1.applicationpath = "http://www.cnblogs.com/xspaceworld/"; Parameters = @ "C: \ Program Files \ Internet Explorer \ iexplore.exe "; jumptask1.description = "go to X-space blog"; jumptask1.title = "xuya's blog"; Parameters = "Bolg links"; jumptask jumptask2 = new jumptask (); jumptask2.applicationpath = textbox1.text; jumptask2.iconresourcepath = textbox4.text; jumptask2.description = textbox2.text; jumptask2.title = textbox3.text; character = combobox1.text; jumplist = new jumplist (); jumplist. jumpitems. add (jumptask); jumplist. jumpitems. add (jumptask1); jumplist. jumpitems. add (jumptask2); jumplist. apply ();} private void btnclear_click (Object sender, eventargs e) {jumplist jumplist1 = new jumplist (); jumplist1.jumpitems. clear (); jumplist1.apply ();} private void btnopen_click (Object sender, eventargs e) {If (openfiledialog1.showdialog () = dialogresult. OK) {textbox1.text = openfiledialog1.filename;} private void button2_click (Object sender, eventargs e) {openfiledialog1.filter = "ICO | *. ICO | exe | *. EXE "; if (openfiledialog1.showdialog () = dialogresult. OK) {textbox4.text = openfiledialog1.filename; picturebox1.image = image. fromfile (openfiledialog1. filename) ;}} private void form1_load (Object sender, eventargs e) {combobox1.items. add ("Bolg links"); combobox1.items. add ("New Micosoft Tools"); combobox1.selectedindex = 0 ;}
Some improvements are needed ..
For example, if you want to add a list, you can directly call this list to add the previous content. Now, you can only add one. Experts can give more advice and communicate with each other.
: