Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1858
  • Last Modified:

Disabling ClearType/XPManifest for a specific FORM

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
lololo50
Asked:
lololo50
  • 6
  • 5
1 Solution
 
mikelittlewoodCommented:
I dont think this is possible as xpmanifest is application based and not form based.
0
 
lololo50Author Commented:
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
 
Slick812Commented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
lololo50Author Commented:
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
 
lololo50Author Commented:
and what do i need to put in uses to use the SetWidnowTheme ??
0
 
lololo50Author Commented:
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
 
Slick812Commented:
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
 
Slick812Commented:
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
 
lololo50Author Commented:
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
 
Slick812Commented:
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
 
Slick812Commented:
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
 
lololo50Author Commented:
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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now