Solved

Disabling ClearType/XPManifest for a specific FORM

Posted on 2006-06-09
14
1,776 Views
Last Modified: 2013-12-03
Hi

I need to disable ClearType font smoothing (if it's turned on) and XPManifest for only one Form in my proggy... Is it possible ? If yes than how can I do it ??


Thanks for any help.
0
Comment
Question by:lololo50
  • 6
  • 5
14 Comments
 
LVL 15

Accepted Solution

by:
mikelittlewood earned 295 total points
Comment Utility
I dont think this is possible as xpmanifest is application based and not form based.
0
 

Author Comment

by:lololo50
Comment Utility
anyone can confirm that it's not possible to turn off xpmanifest for a certain form ?? (to be specific i need the xpmanifest to work only on one form in my app)


and how about turning off clear type on a form ??
0
 
LVL 33

Expert Comment

by:Slick812
Comment Utility
hello  lololo50, , I am not sure about what you may be asking ? ? however if you are refering to the XP "Theme" display for a window then you might try the SetWindowTheme( ) function,
SetWindowTheme: function(hwnd: HWND; pszSubAppName: LPCWSTR; pszSubIdList: LPCWSTR): HRESULT;

 this can change the theme specific control for a window OR stop the theme rendering for a window if you use a space character

SetWindowTheme(Form1.Handle,' ',' ');
  {the function above will disAble the theme on this Form window.
   but all of the Controls on this form will still have the XP theme}

SetWindowTheme(buton_Test.Handle,' ',' ');
  {The code above will just disable the XP theme on the TButton named button_Test }

 = = = = = = = = = =

I really do NOT understand about your question --> " and how about turning off clear type on a form ??  "
  what do you mean by -->  turning off clear type      ? ?
what visual effect are you trying to get, by turning something off ?
0
 

Author Comment

by:lololo50
Comment Utility
clear type is the font smoothing method in win xp
i need to disable it for a form (if it's enabled in the system)
0
 

Author Comment

by:lololo50
Comment Utility
and what do i need to put in uses to use the SetWidnowTheme ??
0
 

Author Comment

by:lololo50
Comment Utility
got it, but it doesn't work. xp still displays everything rounded etc on the form.
(@slick182 if don't know what i mean by disabling XPMan on a certain form first put some group boxes on the form and run the proggy and then add to it th XPMan component and run the proggy - then you'll see difference and what i'm trying to achieve)
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 33

Expert Comment

by:Slick812
Comment Utility
oh yea, , I have done alot with win XP maifest, and as I said in my comments about the form theme off, does NOT affect it's child window (controls) theme settings, if you want to disable XP theme on the "Controls" of your form, you will need to have a

SetWindowTheme(buton1.Handle,' ',' '); // for every button

SetWindowTheme(GroupBox1.Handle,' ',' '); // for every group box

the XP maifest is used as a program initializer, to access the new features of the Common-Controls library version 6, I think, , but once this is acivated,  I think you will need to use SetWindowTheme( ) on every window that you want to not have the effect,

the  SetWindowTheme(buton1.Handle,' ',' ');   - This works for me, it will turn OFF the XP theme on the control specified
0
 
LVL 33

Expert Comment

by:Slick812
Comment Utility
I do not think that the font smoothing method has anything to do with the "Open Type" font, but there may be something in the open type that can add extra font rendering. . There may be a System wide setting for font smoothing, , but I do not know of any for a single control or top window (form)
0
 

Author Comment

by:lololo50
Comment Utility
i'll try disabling every component on the form

it's not good if it can't be disabled for a form
i have a form that is saved to a TBitmap and if the clear type font smoothing is on than the label captions (using small fonts) look really weird (sthing like the picture was put thorugh paintshop and a blur filter applied)
0
 
LVL 33

Expert Comment

by:Slick812
Comment Utility
I have had some problem with "Windows" (Forms , controls) that I had alternate "Display" bitmaps stored for sliding or fade effects, , I either had to store more than one bitmap and use the bitmap for the screen res or OS of the user system, , , ,  or (more useful to me) get a bitmap of the window when my program first starts, so that the bitmap always matches the system display of that window , no matter what OS, or screen Res, or Small Fonts, Large Fonts, or 3D color or any other variance factor. . . But I do not know of any other way, for your disable Theme thing, except to have a compleatly separate other program without a manifest file, for your Non-Theme Form to be displayed in, ,

but I think the method of getting a bitmap from the form when the program stars may be your best option
0
 
LVL 33

Expert Comment

by:Slick812
Comment Utility
and one other thing. .  some Delphi components (like TLabel  and TSpeenButton) are NOT windowed controls, so they are exempted from and API theme function calls that use a Handle for window ID
0
 

Author Comment

by:lololo50
Comment Utility
i've tried setwindowtheme on every component on that form and the form it self - no visible change - then xpmanifest is still doing it's job :/
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Universal fonts 2 138
Virtuailstring tree compare node issue 14 89
Printing problem 2 72
Delphi: Connect to running MS Outlook 4 26
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 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

12 Experts available now in Live!

Get 1:1 Help Now