Solved

Show a panel instead of Form ?

Posted on 2000-03-24
4
139 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
PDF files into SQL 2008 Varbinary(Max) 3 77
System restore point 4 77
delphi custom sort exception 6 111
Reconfigure Delphi Install? 2 36
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now