Solved

How to write a shape panel

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

Thanks

Shekou
0
Comment
Question by:shekou
[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
2 Comments
 
LVL 34

Accepted Solution

by:
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
    { Private declarations }
    Rgn1 : HRGN;


procedure TForm1.FormCreate(Sender: TObject);
begin
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);
end;


// be sure to Release the Region
procedure FormDestroy(Sender: TObject);
begin
DeleteObject(Rgn1);
end;


you can create Regions of many different shapes
0
 

Author Comment

by:shekou
ID: 6501887
tried, but not work.

Thanks

Chiwan
0

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