How to write a shape panel

Posted on 2001-08-08
Last Modified: 2010-04-06
How to write a shape panel like Office Assistant done?
Any component could be use?


Question by:shekou
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
LVL 34

Accepted Solution

Slick812 earned 50 total points
ID: 6366751
hello shekou, you can set the amount of a control or form that you can see with a "Region". A region tells windows OS what part is allowed to be used (visible and gets mouse clicks). you can set the region in the Forms OnCreate event. This will make Panel1 Elipitcal - - - -

    { Private declarations }
    Rgn1 : HRGN;

procedure TForm1.FormCreate(Sender: TObject);
Rgn1 := CreateEllipticRgn(Panel1.BoundsRect.Left-Panel1.Left, Panel1.BoundsRect.Top-Panel1.Top, Panel1.BoundsRect.Right-Panel1.Left, Panel1.BoundsRect.Bottom-Panel1.Top);
  SetWindowRgn(Panel1.Handle, Rgn1, TRUE);

// be sure to Release the Region
procedure FormDestroy(Sender: TObject);

you can create Regions of many different shapes

Author Comment

ID: 6501887
tried, but not work.



Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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