Клубове Дир.бг
powered by diri.bg
търси в Клубове diri.bg Разширено търсене

Вход
Име
Парола

Клубове
Dir.bg
Взаимопомощ
Горещи теми
Компютри и Интернет
Контакти
Култура и изкуство
Мнения
Наука
Политика, Свят
Спорт
Техника
Градове
Религия и мистика
Фен клубове
Хоби, Развлечения
Общества
Я, архивите са живи
Клубове Дирене Регистрация Кой е тук Въпроси Списък Купувам / Продавам 01:46 13.07.25 
Клубове/ Компютри и Интернет / Програмисти Пълен преглед*
Информация за клуба
Тема Re: Window XP interface + VB 6.0 [re: AZure]
Автор Wise Guy (да бе умен...)
Публикувано26.02.02 11:54  



Xp visual style in your application without any components
Without using any components
Uploader: mega warrior
Company: Reference: msdn.microsoft.com

Question/Problem/Abstract:

Every application i create in Delphi doesnt have WinXP visual styles implemented automatically, is there any way i can do this without using any component?
Answer:


Windows XP visual styles does not integrate into our application automatically.
I was looking for a way to make my form look much more attractive under WinXP, so i was looking around for an article to help me do that.
when i havent found any i decided to write this small article to explain how in a minor of 1 second you can make your basic-looking-controls-form change its look and plugin into WinXP skins.
as you should see its all depends on 1 small text resource.

first create a new text file and call it "XpXML.txt" (place it in your project folder) inside it paste the following lines:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
name="Hacx.Simple.Xp.Resource"
processorArchitecture="x86"
version="1.1.0.0"
type="win32"/>
<description>Windows Shell</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>


i think its self explaining, and there are few fields you can change like: name, version, description.. they doesnt affect the actual layout.
publicKeyToken is very important and should not be changed in any manner (just go to msdn.microsoft.com and look for "6595b64144ccf1df" to read some articles about it).

ok, second thing is to add another text file to your project called "XpRes.RC" and paste the following lines inside it:

1 24 XpXML.txt

now, the deal is not to forget to add this resource to your project by choosing "Add to Project" and choose the resource file "XpRes.RC".
some might ask what is "24", well its a common sign declared by microsoft to notify Windows.Shell that this application should have Windows XP visual styles (Skins) wrapped around it.

the only thing to do now is to "Build" the project and execute it.
place a listview with columns and some buttons to see the real change if your just testing this article on a blank form.

thats it, just execute and see how well it goes.

Ako iskash Tip-ovete da sa s shadow (na XP sa), shte ti trqbva oshte. Imam vsi4ko, no e za Delphi, i ne znam dali mojesh da si go prevedesh

by Wise Guy



Цялата тема
ТемаАвторПубликувано
* Window XP interface + VB 6.0 AZure   26.02.02 02:08
. * Re: Window XP interface + VB 6.0 Wise Guy   26.02.02 11:54
. * Re: Window XP interface + VB 6.0 ZahiCal   26.02.02 11:58
. * Re: Window XP interface + VB 6.0 dsgfsd   26.02.02 13:11
. * Re: Window XP interface + VB 6.0 ironcode   26.02.02 13:51
. * До някъде успях :-) AZure   26.02.02 14:16
. * Re: До някъде успях :-) Плaмeн   27.02.02 05:40
. * Re: До някъде успях :-) ironcode   27.02.02 17:54
Клуб :  


Clubs.dir.bg е форум за дискусии. Dir.bg не носи отговорност за съдържанието и достоверността на публикуваните в дискусиите материали.

Никаква част от съдържанието на тази страница не може да бъде репродуцирана, записвана или предавана под каквато и да е форма или по какъвто и да е повод без писменото съгласие на Dir.bg
За Забележки, коментари и предложения ползвайте формата за Обратна връзка | Мобилна версия | Потребителско споразумение
© 2006-2025 Dir.bg Всички права запазени.