Sign in to follow this  
Followers 0
dekadish

Compatibility Code ??

11 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0