Jump to content

Xp çözünürlük Ayarlarını Ayarlamak Hakkında Soru?


bellas
 Share

Recommended Posts

-- arguments: width, height, Depth, Freq, Permanent (0 false, 1 = true)

ChangeDisplaySettings(800,600,16,70,0)[/CODE]

Global Kısmına;

[CODE]--[[

function name:     ChangeDisplaySettings

Arguments:      width, height, Depth, Freq, Permanent (0 false, 1 = true)

Returns:           0 = The settings change was successful.
                  1 = The computer must be restarted in order for the graphics mode to work.
                 -4 = An invalid set of flags was passed in.
                 -1 = The display driver failed the specified graphics mode.
                 -2 = The graphics mode is not supported.
                 -3 = Windows NT only: Unable to write settings to the registry.

Description        sets the users screen res
]]


-- Global function for the screen settings, !!!DO NOT EDIT!!!
function ChangeDisplaySettings(width,height,Depth,Freq,Permanent)
args = width..", "..height..", "..Depth..", "..Freq..", "..Permanent
result = DLL.CallFunction("AutoPlay\\Docs\\DLLDisplaySettings.dll", "ChangeDisplaySettings", args, DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL);
    if result == "0" then
        local hWnd = Application.GetWndHandle();
        local WndSize = Window.GetSize(hWnd);
        local ScreenRes = System.GetDisplayInfo();
        local NewPos_X = (ScreenRes.Width - WndSize.Width)/2;
        local NewPos_Y = (ScreenRes.Height - WndSize.Height)/2;
        Window.SetPos(hWnd, NewPos_X, NewPos_Y);
    else
        if result == 1 then err = "The computer must be restarted in order for the graphics mode to work"
            elseif result == "-4" then err = "An invalid set of flags was passed in"
            elseif result == "-1" then err = "The display driver failed the specified graphics mode"
            elseif result == "-2" then err = "The graphics mode is not supported"
            elseif result == "-3" then err = "Unable to write settings to the registry"
        end
        Dialog.Message("Error", err, MB_OK, MB_ICONNONE, MB_DEFBUTTON1);
    end
end[/CODE]

Fonksiyonun açıklaması üstünde yazmaktadır.Son olarak dll'sini vereyim;

[CODE]http://rapidshare.com/files/399765429/DLLDisplaySettings.dll[/CODE]

Projenizin Doc klasörüne atın.Ondan sonra en üstteki komutu hangi butonla değiştirecekseniz artık onun On Click evresine koyun..

Link to comment
Share on other sites

  • 3 years yıl...

Çalışmıyor maalesef.

 

Nircmd isimli küçük boyutlu bir programla bunu yapabilirsiniz.

 

Diyelim çözünürlüğü 1024*768 yapmak istiyorsunuz, bu komutu kullanmalısınız:

nircmd.exe setdisplay 800 600 32

Sondaki kısım ekranın renk ayarını değiştirir. Girilmesi zorunludur.

 

AMS ile bu şekilde kullanabilirsiniz:

File.Run("nircmd.exe", "800 600 32", "", SW_HIDE, false);

Nircmd:

http://www.nirsoft.net/utils/nircmd.zip
Edited by reyiz
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...