Solved

Show a panel instead of Form ?

Posted on 2000-03-24
4
143 Views
Last Modified: 2010-04-04
Any ideas how to show a panel instead
of a form without using "Forms" unit ?
(without it i loose the Show and showmodal)

Thanx

0
Comment
Question by:k6__
4 Comments
 

Expert Comment

by:dhertzfe
ID: 2655883
Set the visible property to TRUE when you wnat to see it and FALSE when you want to hide it.
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 2655948
Why just show the panel and not the form?

If it's for cosmetics, then I'd suggest that you show the form, put the panel in and set the Align property for the panel to alClient.

Just a suggestion, though... :)
0
 
LVL 9

Accepted Solution

by:
ITugay earned 50 total points
ID: 2656495
Dear K6,

I have one idea how to do it;). No "Forms" unit. Why you need this?
The working code is bellow:


----
program p_0;

uses
  Graphics,  // it only for define colors, you may remove it
  Windows,
  Controls,
  ExtCtrls;

type
   TMyPanel = class(TPanel)
     procedure CreateParams(VAR Params: TCreateParams); override;
   end;

procedure TMyPanel.CreateParams(VAR Params: TCreateParams);
begin
  Inherited CreateParams(Params);
  Params.WndParent := GetDesktopWindow;
  Color:=clYellow;
end;

var V:TMyPanel;

begin
  V:=TMyPanel.Create(nil);
  SetWindowPos(V.Handle, HWND_TOPMost      , 0, 0, 640, 480, SWP_SHOWWINDOW );
  Sleep(2000); // only waiting  to you be sure it work;)
end.
-------

Best regards,
Igor.
0
 
LVL 2

Author Comment

by:k6__
ID: 2657412
The idea is simply that i don't want
any forms "actions(not delphi actions"
(like form is painting first and after
 the panel is painting and it's slow
 on machines like 486 =)).

With this code only the Panel is painted
but i need to make manual creates =(.

Well thanx for the code worked and i'll
invastigate.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question