?
Solved

Show a panel instead of Form ?

Posted on 2000-03-24
4
Medium Priority
?
147 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__
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 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