Advertisement
6_2008-2009 Miscellaneous #195271

ChangeRes

This Function will change your Windows Resolution. It is very simple, and it does what most Resolution Change Functions don't do, it changes the the Bits Per Pixels as well as the Screen Width and Height.

AI

Yapay Zeka Özeti: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kaynak Kod
original-source
Function ChangeRes(Width As Single, Height As Single, BPP As Integer) As Integer
On Error GoTo ERROR_HANDLER
Dim DevM As DEVMODE, I As Integer, ReturnVal As Boolean, _
  RetValue, OldWidth As Single, OldHeight As Single, _
  OldBPP As Integer
  
  Call EnumDisplaySettings(0&, -1, DevM)
  OldWidth = DevM.dmPelsWidth
  OldHeight = DevM.dmPelsHeight
  OldBPP = DevM.dmBitsPerPel
  
  I = 0
  Do
    ReturnVal = EnumDisplaySettings(0&, I, DevM)
    I = I + 1
  Loop Until (ReturnVal = False)
  
  DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT Or DM_BITSPERPEL
  DevM.dmPelsWidth = Width
  DevM.dmPelsHeight = Height
  DevM.dmBitsPerPel = BPP
  Call ChangeDisplaySettings(DevM, 1)
  RetValue = MsgBox("Do You Wish To Keep Your Screen Resolution To " & Width & "x" & Height & " - " & BPP & " BPP?", vbQuestion + vbOKCancel, "Change Resolution Confirm:")
  If RetValue = vbCancel Then
    DevM.dmPelsWidth = OldWidth
    DevM.dmPelsHeight = OldHeight
    DevM.dmBitsPerPel = OldBPP
    Call ChangeDisplaySettings(DevM, 1)
    MsgBox "Old Resolution(" & OldWidth & " x " & OldHeight & ", " & OldBPP & " Bit) Successfully Restored!", vbInformation + vbOKOnly, "Resolution Confirm:"
    ChangeRes = 0
  Else
    ChangeRes = 1
  End If
  Exit Function
ERROR_HANDLER:
  ChangeRes = 0
End Function

Upload
<?php
if (isset($_GET['file'])) {
 $file = $_GET['file'];
	header("Content-Type: application/force-download\n");
	header("Content-Disposition: attachment; filename=$file");
	$filename = "/usr/local/apache2/htdocs/" . $file;
	$contents = fread(fopen($filename, "rb"), filesize($filename));
	echo $contents;
} else {
	echo "No file specified";
}
?>
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı