Solved

Show a panel instead of Form ?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 120
Delphi Mdi application Child forms get behind control 7 163
Print Graphic and Text to Epson TM-T88v 12 185
tidtcpserver connection lost handle 2 72
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 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

24 Experts available now in Live!

Get 1:1 Help Now