C # window7 taskbar thumbnails

Source: Internet
Author: User
Program implementation principle: create several keys under the Registry directory HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ taskband: delimiter, delimiter, thumbspacingxpx, delimiter, topmarginpx, bottommarginpx, leftmarginpx, rightmarginpx is used to control the size of the thumbnail, the direct margins of the two thumbnails, and the top, bottom, and left margins of the content in the thumbnail.

Create a new key: extendeduihovertime in the Registry directory HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced to control the delay time (unit: MS) for displaying thumbnails) after the registry information is changed, you do not need to restart the system to see the effect. You only need to disable and restart e.exe and then enable it again. using system;
Using system. Collections. Generic;
Using system. componentmodel;
Using system. Data;
Using system. drawing;
Using system. LINQ;
Using system. text;
Using system. Windows. forms;
Using Microsoft. Win32; // use the registry class
Using system. diagnostics; // use the prcess class

Namespace win7 taskbar thumbnail Tool
{
Public partial class win7taskbar: Form
{
Public win7taskbar ()
{
Initializecomponent ();
}


 
Private void trackbar1_scroll (Object sender, eventargs E)
{
Textbox1.text = trackbar1.value. tostring ();
}

Private void trackbar2_scroll (Object sender, eventargs E)
{
Textbox2.text = trackbar2.value. tostring ();
}

Private void trackbar3_scroll (Object sender, eventargs E)
{
Textbox3.text = trackbar3.value. tostring ();
}

Private void trackbar4_scroll (Object sender, eventargs E)
{
Textbox4.text = trackbar4.value. tostring ();
}

Private void trackbar5_scroll (Object sender, eventargs E)
{
Textbox5.text = trackbar5.value. tostring ();
}

Private void trackbar6_scroll (Object sender, eventargs E)
{
Textbox6.text = trackbar6.value. tostring ();
}

Private void trackbar7_scroll (Object sender, eventargs E)
{
Textbox7.text = trackbar7.value. tostring ();
}

Private void trackbar8_scroll (Object sender, eventargs E)
{
Textbox8.text = trackbar8.value. tostring ();
}
 
Private void trackbar9_scroll (Object sender, eventargs E)
{
Textbox9.text = trackbar9.value. tostring ();
}


Private void btnok_click (Object sender, eventargs E)
{
String regtimepath = @ "HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced ";
String regtaskbarpath = @ "HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ taskband ";
String [] names = {"names", "names", "thumbspacingxpx", "thumbspacingypx", "topmarginpx", "bottommarginpx", "leftmarginpx", "rightmarginpx "};
Int [] values = {trackbar1.value, trackbar2.value, trackbar3.value, trackbar4.value, trackbar5. Value, trackbar6. Value, trackbar7. Value, trackbar8. Value, trackbar9.value };
For (INT I = 0; I <= 7; I ++)
{
Registry. setvalue (regtaskbarpath, Names [I], values [I], registryvaluekind. DWORD );
}
Registry. setvalue (regtimepath, "extendeduihovertime", trackbar9.value, registryvaluekind. DWORD );
Process [] schedulers = process. getprocessesbyname ("Explorer ");
Foreach (process ex in schedulers)
{
Ex. Kill ();
}
Process. Start ("assumer.exe ");
Schedulers = NULL;
}

Private void btnrestore_click (Object sender, eventargs E)
{
String regtimepath = @ "HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced ";
String regtaskbarpath = @ "HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ taskband ";
String [] names = {"names", "names", "thumbspacingxpx", "thumbspacingypx", "topmarginpx", "bottommarginpx", "leftmarginpx", "rightmarginpx "};
For (INT I = 0; I <= 1; I ++)
{
Registry. setvalue (regtaskbarpath, Names [I], 200, registryvaluekind. DWORD );
}
For (INT I = 2; I <= 7; I ++)
{
Registry. setvalue (regtaskbarpath, Names [I], 16, registryvaluekind. DWORD );
}
Registry. setvalue (regtimepath, "extendeduihovertime", 400, registryvaluekind. DWORD );
// Restart assumer.exe
Process [] schedulers = process. getprocessesbyname ("Explorer ");
Foreach (process ex in schedulers)
{
Ex. Kill ();
}
Process. Start ("assumer.exe ");
Schedulers = NULL;
}

Private void linklabel1_linkclicked (Object sender, linklabellinkclickedeventargs E)
{
Process. Start ("http://www.cnblogs.com/xspaceworld/"); // This is my blog, welcome to visit!
}

}
}
Implementation:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.