Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Thread Tools Display Modes
Old 03-01-2017, 10:26 AM
lexd lexd is offline
Senior Member
Join Date: Feb 2015
Posts: 268
Default Make a customized form visible on screen

I made a customized form with out a title area

procedure THeadlessForm.CreateParams(var Params: TCreateParams);
Params.Style := Params.Style or WS_THICKFRAME;

Now I want to display it on the screen with a StringGrid

procedure TForm1.FormCreate(Sender: TObject);
HeadlessForm := THeadlessForm.Create(nil); // not linked to application
Grid := TStringGrid.Create(HeadlessForm);
Grid.Parent := HeadlessForm;
HeadlessForm.ActiveControl := Grid;
HeadlessForm.Visible := True;
SetWindowPos(HeadlessForm.Handle, Form1.Handle, Form1.Top -5, Form1.Left -5,
Form1.Width -5, Form1.Height -5, HWND_TOPMOST);
B := IsWindowVisible(HeadlessForm.Handle);
Form1.Visible := b; // main form stays visible but no HeadlessForm

what am I doing wrong? as I cannot get it to display the HeadlessForm
Reply With Quote

delphi 7

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 12:20 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.