Недавно добавленные исходники

•  TDictionary Custom Sort  3 223

•  Fast Watermark Sources  2 989

•  3D Designer  4 750

•  Sik Screen Capture  3 259

•  Patch Maker  3 466

•  Айболит (remote control)  3 526

•  ListBox Drag & Drop  2 903

•  Доска для игры Реверси  80 758

•  Графические эффекты  3 842

•  Рисование по маске  3 171

•  Перетаскивание изображений  2 544

•  Canvas Drawing  2 672

•  Рисование Луны  2 500

•  Поворот изображения  2 091

•  Рисование стержней  2 119

•  Paint on Shape  1 523

•  Генератор кроссвордов  2 181

•  Головоломка Paletto  1 730

•  Теорема Монжа об окружностях  2 157

•  Пазл Numbrix  1 649

•  Заборы и коммивояжеры  2 016

•  Игра HIP  1 262

•  Игра Go (Го)  1 200

•  Симулятор лифта  1 421

•  Программа укладки плитки  1 177

•  Генератор лабиринта  1 511

•  Проверка числового ввода  1 297

•  HEX View  1 465

•  Физический маятник  1 322

•  Задача коммивояжера  1 356

 
скрыть


Delphi FAQ - Часто задаваемые вопросы

| Базы данных | Графика и Игры | Интернет и Сети | Компоненты и Классы | Мультимедиа |
| ОС и Железо | Программа и Интерфейс | Рабочий стол | Синтаксис | Технологии | Файловая система |



Delphi Sources

Использовать визуальный стиль XP для своего приложения



Оформил: DeeCo

{ 
  To benefit from the new look and feel (Visual Styles) for the Windows XP 
  environment, you must include a Manifest in your application. 
  (Either as resource or as file in the same directory where your application 
  resides) 

  The manifest is a XML document. It will allow Windows XP to decide which 
  version of the comctl32.dll to use when binding. 
  The XML document contains information about the application you are 
  writing as well as information concerning the version of the comctl32.dll to use. 

  The following instruction shows how to 
   * create the manifest document 
   * create the XP resource file 
   * include the file in your application 

  The steps 1-4 show how to create the files. 
  You can also download the manifest and resource file from the 
  Demo-download. 

}

 { 
  Damit eine Anwendung das neue Look-and-Feel (Visual Styles) von Windows XP 
  annimmt, muss eine Manifest Datei in der Applikation enthalten sein. 
  (Entweder als Ressource oder im gleichen Verzeichnis, wo sich die Applikation 
  befindet) 

  Das Manifest ist ein XML Dokument. 
  Wenn Windows dieses in einer EXE Datei vorfindet, wird automatisch die Version 6 
  von comctl32.dll geladen und die Controls erscheinen im XP Design. 

  Die Folgende Anleitung zeigt, wie man 
  * das manifest Dokument erstellt 
  * die Ressourcen Datei erstellt 
  * die Ressource in die Anwendung einbindet. 

  Das Manifest und die Ressourcen Datei konnen auch uber das "Demo-Download" heruntergeladen 
  werden. Dann konnen die Schritte 1-4 ausgelassen werden. 
}


 {1) 
  Copy this sample manifest and paste it into notepad or any text editor. 
  Kopiere das Beispiel Manifest und fuge es in einen Texteditor ein (z.B Notepad}


 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity
     version="1.0.0.0"
     processorArchitecture="X86"
     name="CompanyName.ProductName.MyProgram"
     type="win32"
 />
 <description>Your Application Description</description>
 <dependency>
     <dependentAssembly>
         <assemblyIdentity
             type="win32"
             name="Microsoft.Windows.Common-Controls"
             version="6.0.0.0"
             processorArchitecture="X86"
             publicKeyToken="6595b64144ccf1df"
             language="*"
         />
     </dependentAssembly>
 </dependency>
 </assembly>

 {2) 
  To customize to fit your application, replace "name" from assemblyIdentity and the 
  "description" string with your own data. Then save the file as WinXP.manifest 

  Andere im Manifest den "name" von assemblyIdentity und die 
  "description" mit eigenen Angaben. Speichere das Manifest als WinXP.manifest}

 {3) 
  Create another file which contains instructions to include the 
  WinXP.manifest (XML) document. 
  The contents of the WinXP.rc looks like this: 

  Erstelle eine weitere Datei, welche die Instruktionen zur Erstellung 
  der Ressourcen Datei enthalt. 
  Der Inhalt von WinXP.rc schaut so aus:}


   1 24 "WinXP.manifest"


 {4) 

  Now we need to use Delphi''s resource compiler (brcc32.exe) to compile the WinXP.rc file. 
  Doing so will result in a WinXP.res 
  From the command line, type the following: 

  Compilire nun mit Borland''s Resource Compiler (brcc32.exe), 
  die Datei WinXP.rc. Es wird dann eine WinXP.res Datei erstellt. 
  Gibt im MS-DOS Prompt, im Verzeichnis wo sich WinXP.rc befindet, nun folgendes ein:}

   brcc32 WinXP.rc


 (*5)
   Now include the resource in your application.
   Include the following compiler directive:
   immediately after {$R *.DFM}:

   Nun muss noch eine Compiler Directive dem Sourcecode hinzugefugt werden.
   Der Eintrag sollte unmittelbar nach der Form Directive {$R *.DFM} folgen,
   so wie hier:*)

   {$R WinXP.res}


 {6) 
  Compile your application and run it! 
  Compiliere die Anwendung und starte sie!}


 {7) 
  Test it if it runs correctly. 
  Note that some controls don''t adapt the new XP design such
   as TGroupBox, TSpeedButton and some others.
   If you use the TListView component with the view style of vsReport, have a look at this tip:
   http://www.swissdelphicenter.ch/de/showcode.php?id=1117 

  Uberpruf nun, ob die Anwendung korrekt lauft. Einige Controls nehmen das neue XP Design
   nicht an (TGroupBox, TSpeedButton und andere)
   Bei der ListView mit vsReport Style muss dies beachtet werden:
   http://www.swissdelphicenter.ch/de/showcode.php?id=1117 
}




Похожие по теме исходники

Нейросеть для распознавания образов

Механизм станка качалки для нефти

Весы для взвешивания

Кувшины для воды

 

Доска для игры Реверси




Copyright © 2004-2024 "Delphi Sources" by BrokenByte Software. Delphi World FAQ

Группа ВКонтакте