mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Add some taskdialog style to login form.
This commit is contained in:
@ -3,8 +3,8 @@ object frmLogin: TfrmLogin
|
||||
Top = 0
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Login'
|
||||
ClientHeight = 117
|
||||
ClientWidth = 251
|
||||
ClientHeight = 137
|
||||
ClientWidth = 266
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -16,63 +16,90 @@ object frmLogin: TfrmLogin
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
DesignSize = (
|
||||
251
|
||||
117)
|
||||
266
|
||||
137)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object lblPrompt: TLabel
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 44
|
||||
Height = 13
|
||||
Caption = 'lblPrompt'
|
||||
end
|
||||
object lblUsername: TLabel
|
||||
Left = 8
|
||||
Top = 33
|
||||
Width = 52
|
||||
Height = 13
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = '&Username:'
|
||||
FocusControl = editUsername
|
||||
end
|
||||
object lblPassword: TLabel
|
||||
Left = 8
|
||||
Top = 60
|
||||
Width = 50
|
||||
Height = 13
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = '&Password:'
|
||||
FocusControl = editPassword
|
||||
end
|
||||
object btnOK: TButton
|
||||
Left = 168
|
||||
Top = 84
|
||||
Left = 183
|
||||
Top = 104
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Login'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
TabOrder = 2
|
||||
end
|
||||
object editPassword: TEdit
|
||||
Left = 72
|
||||
Top = 57
|
||||
Width = 171
|
||||
Height = 21
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
PasswordChar = '*'
|
||||
TabOrder = 1
|
||||
Text = 'editPassword'
|
||||
ExplicitLeft = 168
|
||||
ExplicitTop = 84
|
||||
end
|
||||
object editUsername: TEdit
|
||||
Left = 72
|
||||
Top = 30
|
||||
Width = 171
|
||||
Height = 21
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
object pnlBackground: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 266
|
||||
Height = 98
|
||||
Align = alTop
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
BevelOuter = bvNone
|
||||
Caption = 'pnlBackground'
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
ShowCaption = False
|
||||
TabOrder = 0
|
||||
Text = 'editUsername'
|
||||
ExplicitWidth = 305
|
||||
ExplicitHeight = 114
|
||||
DesignSize = (
|
||||
266
|
||||
98)
|
||||
object lblPrompt: TLabel
|
||||
Left = 38
|
||||
Top = 13
|
||||
Width = 44
|
||||
Height = 13
|
||||
Caption = 'lblPrompt'
|
||||
end
|
||||
object lblUsername: TLabel
|
||||
Left = 38
|
||||
Top = 43
|
||||
Width = 52
|
||||
Height = 13
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = '&Username:'
|
||||
FocusControl = editUsername
|
||||
end
|
||||
object lblPassword: TLabel
|
||||
Left = 38
|
||||
Top = 70
|
||||
Width = 50
|
||||
Height = 13
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = '&Password:'
|
||||
FocusControl = editPassword
|
||||
end
|
||||
object imgIcon: TImage
|
||||
Left = 10
|
||||
Top = 13
|
||||
Width = 16
|
||||
Height = 16
|
||||
end
|
||||
object editPassword: TEdit
|
||||
Left = 104
|
||||
Top = 67
|
||||
Width = 154
|
||||
Height = 21
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
PasswordChar = '*'
|
||||
TabOrder = 1
|
||||
Text = 'editPassword'
|
||||
end
|
||||
object editUsername: TEdit
|
||||
Left = 104
|
||||
Top = 40
|
||||
Width = 154
|
||||
Height = 21
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
TabOrder = 0
|
||||
Text = 'editUsername'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -4,16 +4,18 @@ interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls;
|
||||
Dialogs, StdCtrls, ExtCtrls;
|
||||
|
||||
type
|
||||
TfrmLogin = class(TForm)
|
||||
btnOK: TButton;
|
||||
editPassword: TEdit;
|
||||
pnlBackground: TPanel;
|
||||
lblPrompt: TLabel;
|
||||
editUsername: TEdit;
|
||||
lblUsername: TLabel;
|
||||
lblPassword: TLabel;
|
||||
editPassword: TEdit;
|
||||
editUsername: TEdit;
|
||||
imgIcon: TImage;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
@ -26,7 +28,7 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses helpers;
|
||||
uses helpers, main;
|
||||
|
||||
{$R *.dfm}
|
||||
{$I const.inc}
|
||||
@ -55,6 +57,10 @@ procedure TfrmLogin.FormCreate(Sender: TObject);
|
||||
begin
|
||||
InheritFont(Font);
|
||||
Caption := APPNAME + ' - Login';
|
||||
MainForm.ImageListMain.GetBitmap(144, imgIcon.Picture.Bitmap);
|
||||
lblPrompt.Font.Size := 10;
|
||||
lblPrompt.Font.Color := clHotlight;
|
||||
lblPrompt.Font.Style := lblPrompt.Font.Style + [fsBold];
|
||||
end;
|
||||
|
||||
procedure TfrmLogin.FormShow(Sender: TObject);
|
||||
|
Reference in New Issue
Block a user