Delphi express full skin method

Source: Internet
Author: User
1. Reference DLL skin files

Type

Procedure setskin (skinnam: string); Procedure tfrmmain. setskin (skinnam: string );

VaR

Hinst: thandle;

Rstream: tresourcestream;

Begin

Hinst: = loadlibrary ('allsk. dll ');

If hinst = 0 then

Exit

Else

Begin

Rstream: = tresourcestream. Create (hinst, skinnam, 'myskin ');

Dxskinsuserskinloadfromstream (rstream );

Dxskincontroller1.nativestyle: = false;

Dxskincontroller1.useskins: = true;

End;

End; Procedure tfrmmain. button1click (Sender: tobject );

Begin

Setskin ('office2007blue ');

End; 2. effective ways to reduce the size of the software after skin use: 1. Delphi's main menu: Project-> modify Skin options. Project Skin options is displayed.

In the editor dialog box, select userskin from the list and cancel the Enable skin support check,

Click OK to exit. (Note: This step takes effect only in dev40 or later versions.) 2. under Dev Express, select the dxskincontroller control and add it to the project. Set the skinname attribute of dxskincontroller1 to userskin. code: (this is valid for RES skin. You need to create a folder named skin in the program folder first)

Procedure tfrmmain. button1click (Sender: tobject );

VaR STR: string;

Begin

STR: = 'xmas2008blue. skencres'; // you can modify it by yourself.

Dxskinsuserskinloadfromfile (TRIM (extractfilepath (application. exename) + '\ skin \' + Str );

Dxskincontroller1.nativestyle: = false;

Dxskincontroller1.useskins: = true;

End;

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.