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
Solved

Disabling ClearType/XPManifest for a specific FORM

Posted on 2006-06-09
14
1,796 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
ID: 16873653
I dont think this is possible as xpmanifest is application based and not form based.
0
 

Author Comment

by:lololo50
ID: 16874109
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 34

Expert Comment

by:Slick812
ID: 16882962
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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:lololo50
ID: 16883555
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
ID: 16883575
and what do i need to put in uses to use the SetWidnowTheme ??
0
 

Author Comment

by:lololo50
ID: 16883599
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
 
LVL 34

Expert Comment

by:Slick812
ID: 16889458
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 34

Expert Comment

by:Slick812
ID: 16889501
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
ID: 16897120
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 34

Expert Comment

by:Slick812
ID: 16897785
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 34

Expert Comment

by:Slick812
ID: 16897827
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
ID: 16900405
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

790 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