Jump to content

Compatibility Code ??


Recommended Posts

I want to run my program by default with Compatibility set to Windows 2000. I made a little program but its having littl ebit of an issues running by defualt but when i right click it and set Compatibility mode to Windows 2000 it works fine.. Is there a way that i can define that in the code so it sets it self to Compatibility mode of Windows 2000 ? Basically to run in Compatibility mode by default without right clicking and changing it thank you.

Edited by dekadish
Link to comment
Share on other sites

Looks like this may do the trick if i disable themese.. i just have to test my app no on windowx xp, win7 and vista to see if its going to work thank you ill let you know my results.. if anybody has other methods please post.

Func Toggle_AERO_Style_On($toggle = True)

; Disable AERO effect on Vista and Win7 => MPlayer requires this

; http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Local Const $DWM_EC_DISABLECOMPOSITION = 0

Local Const $DWM_EC_ENABLECOMPOSITION = 1

If $toggle = True Then

DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", $DWM_EC_DISABLECOMPOSITION)

Else

DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", $DWM_EC_ENABLECOMPOSITION)

EndIf

EndFunc ;==>Toggle_AERO_Style_On

Link to comment
Share on other sites

Link to comment
Share on other sites

It was more, try and convert it... :mellow:

I used this in my code

Func Toggle_AERO_Style_On($toggle = True)

; Disable AERO effect on Vista and Win7 => MPlayer requires this

; http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Local Const $DWM_EC_DISABLECOMPOSITION = 0

Local Const $DWM_EC_ENABLECOMPOSITION = 1

If $toggle = True Then

DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", $DWM_EC_DISABLECOMPOSITION)

Else

DllCall("dwmapi.dll", "hwnd", "DwmEnableComposition", "uint", $DWM_EC_ENABLECOMPOSITION)

EndIf

EndFunc ;==>Toggle_AERO_Style_On

but application wont run but when i disable it manually then it runs dont know whats wrong

Link to comment
Share on other sites

but application wont run but when i disable it manually then it runs dont know whats wrong

This only disables the visual Aero effect on Vista and Win7. To run a program in a specific compatibility code follow either one of the links I and BrettF have posted... *sigh*, added working sample code to my 'Application Compatibility' under Win7 post.
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...