Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Show a panel instead of Form ?

Posted on 2000-03-24
4
Medium Priority
?
153 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 150 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month21 days, 4 hours left to enroll

810 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