Solved

Rounded  rectangular panel

Posted on 2000-04-14
8
276 Views
Last Modified: 2010-04-04
Is there any available component to implement rounded rectangular panel?
0
Comment
Question by:Yuli
  • 4
  • 4
8 Comments
 
LVL 2

Expert Comment

by:craig_capel
ID: 2717962
var
  R: THandle;
 begin
  panel1.color:=clgreen;
  panel1.caption:='';
   R := CreateEllipticRgn(0, 0, 100, 100);
   SetWindowRgn(panel1.Handle, R, True);
end;

ok, if this helps, u may not need a component......


Craig C.

0
 
LVL 1

Accepted Solution

by:
l8knight earned 20 total points
ID: 2756507
or along similar lines

var rgn: HRGN;
begin
  rgn := CreateRoundRectRgn(1,1,Form1.Width,Form1.Height,50,50);
  SetWindowRgn(Handle, Rgn, True);
end;

l8knight
0
 
LVL 2

Expert Comment

by:craig_capel
ID: 2758905
Yuli, Could you be any more ignorant?....

l8knight, thanks for copying the code and posting it as an answer, dont expect help from me if your in need....

Craig C.
0
 
LVL 1

Expert Comment

by:l8knight
ID: 2759265
I beg your pardon,

your code says

CreateEllipticRgn(0, 0, 100, 100);

that's not what he asked for, he didn't want an elipse, he wanted an rounded rectangle...

CreateRoundRectRgn(1,1,Form1.Width,Form1.Height,50,50);

your apology will be accepted,

regards

l8knight
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Expert Comment

by:craig_capel
ID: 2759753
l8, surely by seening the command.....  R := CreateEllipticRgn(0, 0, 100, 100);  he could have looked in the help files....

and as you put it "I beg your pardon" he asked for a GREEN rounded (oval is rounded) rectangle....


 panel1.color:=clgreen;
 panel1.caption:='';

So then, not only this but i posted the code on the "Date: Friday, April 14 2000 - 03:36PM PDT " you posted the code on "Date: Thursday, April 27 2000 - 11:37AM PDT "...

That is telling me that Yuli is ignorant, he never even asked me what the code does, no follow up question no nothin, then u stick a cooment as an answer and take the points, theres really nothing between the code i posted over 13 DAYS ago..... i got no reply no nothing!!!
0
 
LVL 1

Expert Comment

by:l8knight
ID: 2760380
c'mon this is getting ridiculous...

for a start I see no mention of the word GREEN in his question.

Is there any available component to implement rounded rectangular panel?

is all I see.

and to end (i hope) if you actually run your code you get a big fat "GREEN" CIRCLE which is not even close to a rounded rectangle.

l8knight.
0
 
LVL 2

Expert Comment

by:craig_capel
ID: 2760753
well yes its the end.... but theres not such thing as a rounded rectangle.....

ok i had a bad day, and i have had around 8 questions where i have answered with the correct answer but no notice to me since i never made the comment as an answer (yes no green i see now)... god knows where i got that from??....

Craig C.
0
 
LVL 1

Expert Comment

by:l8knight
ID: 2760844
no hard feelings..i hope

I look forward to our next 'discussion' :)

regards

l8knight

p.s. I've been joined with e.e. for only 2 days, it has been an interesting 2 days to say the least :) amazing the amount u can learn from other peoples questions and the answers. l8r
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

22 Experts available now in Live!

Get 1:1 Help Now