Jump to content

Recommended Posts

Posted (edited)

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
Posted

Might get you started.

http://forums.devshed.com/windows-help-34/bat-file-to-set-compatibility-mode-516551.html

Yeah this is .bat i dont like it i would rather like something implemented in the code

Posted

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

Posted

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

Posted

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.
  • 2 weeks later...
Posted

none of the above worked.. i stil can only run this program if i manually disable themese or set compatibility to winodws 95.. works fine on windows 7 and Vista only XP is giving me these problems.

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
  • Recently Browsing   0 members

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