Solved

Disabling ClearType/XPManifest for a specific FORM

Posted on 2006-06-09
14
1,787 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 33

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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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 33

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 33

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 33

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 33

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
FMX StringGrid1->Canvas->FillRect Problem 3 151
Deploying Open Type Font (.OTF) company wide ? 3 92
True Type Font Files? 4 89
how to change, disabled button color FMX ? 1 33
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

773 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