BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Old Style Border?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Alexander Adam
Guest





PostPosted: Sat Apr 24, 2004 7:51 pm    Post subject: Old Style Border? Reply with quote



hi there,

Is it somehow possible to draw formulars (toolwindows) in the "old"
3d-border style of windows 98 even under Windows XP and themes activated?

Alex


Back to top
Yorai Aminov (TeamB)
Guest





PostPosted: Sat Apr 24, 2004 8:25 pm    Post subject: Re: Old Style Border? Reply with quote



On 24/04/2004 21:51:45, Alexander Adam wrote:

Quote:
Is it somehow possible to draw formulars (toolwindows) in the "old"
3d-border style of windows 98 even under Windows XP and themes
activated?

One option is to create a borderless form and just draw the borders
yourself. Another is to override the CreateWnd method and call
SetWindowTheme to disable themes for the window:

uses
..., UxTheme;

[...]

procedure TForm1.CreateWnd;
begin
inherited CreateWnd;
InitThemeLibrary;
if Assigned(SetWindowTheme) then
SetWindowTheme(Handle, nil, '');
end;


--
Yorai Aminov (TeamB)
(TeamB cannot answer questions received via email.)
Shorter Path - http://www.shorterpath.com
Yorai's Page - http://www.yoraispage.com

Back to top
Ben Hochstrasser
Guest





PostPosted: Sun Apr 25, 2004 12:06 am    Post subject: Re: Old Style Border? Reply with quote



Yorai Aminov (TeamB) wrote:

Quote:
One option is to create a borderless form and just draw the borders
yourself. Another is to override the CreateWnd method and call
SetWindowTheme to disable themes for the window:

A third one would be to simply omit the XP manifest (thus signalling XP
"it's an old-fashioned application")

--
Ben

Back to top
Yorai Aminov (TeamB)
Guest





PostPosted: Sun Apr 25, 2004 4:41 am    Post subject: Re: Old Style Border? Reply with quote

On 25/04/2004 02:06:26, Ben Hochstrasser wrote:

Quote:
A third one would be to simply omit the XP manifest (thus
signalling XP "it's an old-fashioned application")

Wouldn't work - when XP themes are enabled, all windows use the
themed borders, unless the explicitly disable themes.

--
Yorai Aminov (TeamB)
(TeamB cannot answer questions received via email.)
Shorter Path - http://www.shorterpath.com
Yorai's Page - http://www.yoraispage.com

Back to top
Ben Hochstrasser
Guest





PostPosted: Sun Apr 25, 2004 7:50 am    Post subject: Re: Old Style Border? Reply with quote

Yorai Aminov (TeamB) wrote:

Quote:
Wouldn't work - when XP themes are enabled, all windows use the
themed borders, unless the explicitly disable themes.

Oh, sorry, I was dreaming about controls such as buttons and checkboxes.
Didn't think of /borders/. <blush>

--
Ben

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.