standard-icons

How to load a TImage using task dialog common icons?

微笑、不失礼 提交于 2020-05-15 09:13:37
问题 I'm trying to load icons used by Delphi's task dialogs into a TImage control. As I've learned here, I'm using LoadImage function but icons appear lightly different from the ones which are used by the MessageDlg function. unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Button1: TButton; Image1: TImage; procedure Button1Click(Sender: TObject); private { Private declarations } public {

How to load a TImage using task dialog common icons?

女生的网名这么多〃 提交于 2020-05-15 09:09:12
问题 I'm trying to load icons used by Delphi's task dialogs into a TImage control. As I've learned here, I'm using LoadImage function but icons appear lightly different from the ones which are used by the MessageDlg function. unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Button1: TButton; Image1: TImage; procedure Button1Click(Sender: TObject); private { Private declarations } public {

How do I get the android icons to change state (highlights)?

╄→гoц情女王★ 提交于 2019-12-10 12:12:01
问题 I am using the Android SDK icon-button for refresh (ic_menu_refresh) in a widget and I need to change the selection state when it is pressed. How is this done? Do I define an XML for the button? 回答1: You define the different states in xml via selector. Sample (esp. see the state-attributes): <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/bg_catlocfilter" android:state_pressed="false" /> <item

How to load imagelist with system dialog icons

旧时模样 提交于 2019-12-06 04:42:01
问题 How to load a TCustomImageList with all system icons used by Windows in dialog boxes (Standard icons like warning, error, information, confirmation..)? I would like to find a solution which works on Windows XP and later. 回答1: See LoadImage and LoadIcon. Quick example: procedure TForm1.Button2Click(Sender: TObject); var t_Icon: TIcon; begin t_Icon := TIcon.Create(); t_Icon.Handle := LoadImage( 0, MAKEINTRESOURCE(32513), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE or LR_SHARED ); if ( t_Icon.Handle <> 0 )

How to load imagelist with system dialog icons

馋奶兔 提交于 2019-12-04 11:10:15
How to load a TCustomImageList with all system icons used by Windows in dialog boxes (Standard icons like warning, error, information, confirmation..)? I would like to find a solution which works on Windows XP and later. Old Skull See LoadImage and LoadIcon . Quick example: procedure TForm1.Button2Click(Sender: TObject); var t_Icon: TIcon; begin t_Icon := TIcon.Create(); t_Icon.Handle := LoadImage( 0, MAKEINTRESOURCE(32513), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE or LR_SHARED ); if ( t_Icon.Handle <> 0 ) then ImageList1.AddIcon( t_Icon ); // ............. t_Icon.Free(); end; 来源: https:/