Results 1 to 7 of 7
http://idgs.in/203012
  1. #1
    carnivora_love's Avatar
    Join Date
    Aug 2007
    Location
    hmm,,,dimana ya....kita komunitas depok deh kayaknya
    Posts
    299
    Points
    384.03
    Thanks: 57 / 36 / 28

    Default [Help] setting screen resolution berlebihan

    kk smua tolong donk,,

    temen gw kan nyetting screen resolution destop di windows xp,,

    krn terlalu berlebihan alhasil layar langsung gelap,,

    saking paniknya dia langsung restart kompi,,
    selesai booting muncul tulisan klo gambar gak bis ditampilin,,

    cara ngereset resolutionnya gmn ya?
    komptrnya ga pake vga card, dah gtu komptr kampus lg,,>.<

    thnks,,

  2. Hot Ad
  3. #2
    Kurt.D.Cobain's Avatar
    Join Date
    Apr 2008
    Location
    =
    Posts
    1,974
    Points
    4,012.20
    Thanks: 0 / 20 / 17

    Default

    Masuk Safe Mode... Lalu System Restore ke Waktu Disaat Resolusi Masih Normal
    For Fun
    www.R-L.me

  4. #3
    carnivora_love's Avatar
    Join Date
    Aug 2007
    Location
    hmm,,,dimana ya....kita komunitas depok deh kayaknya
    Posts
    299
    Points
    384.03
    Thanks: 57 / 36 / 28

    Default

    ga ada cara laen selain system restore ya om kurt..

    takutnya record beberapa bulan yg lalu yg disave di system restore

  5. #4
    gegehare's Avatar
    Join Date
    Oct 2007
    Location
    root@linux:~#
    Posts
    5,365
    Points
    11.50
    Thanks: 153 / 213 / 165

    Default

    Spoiler untuk auto screen :
    Code:
        Option Explicit
        Const WM_DISPLAYCHANGE = &H7E
        Const HWND_BROADCAST = &HFFFF&
        Const EWX_LOGOFF = 0
        Const EWX_SHUTDOWN = 1
        Const EWX_REBOOT = 2
        Const EWX_FORCE = 4
        Const CCDEVICENAME = 32
        Const CCFORMNAME = 32
        Const DM_BITSPERPEL = &H40000
        Const DM_PELSWIDTH = &H80000
        Const DM_PELSHEIGHT = &H100000
        Const CDS_UPDATEREGISTRY = &H1
        Const CDS_TEST = &H4
        Const DISP_CHANGE_SUCCESSFUL = 0
        Const DISP_CHANGE_RESTART = 1
        Const BITSPIXEL = 12
    
        Private Type DEVMODE
        dmDeviceName As String * CCDEVICENAME
        dmSpecVersion As Integer
        dmDriverVersion As Integer
        dmSize As Integer
        dmDriverExtra As Integer
        dmFields As Long
        dmOrientation As Integer
        dmPaperSize As Integer
        dmPaperLength As Integer
        dmPaperWidth As Integer
        dmScale As Integer
        dmCopies As Integer
        dmDefaultSource As Integer
        dmPrintQuality As Integer
        dmColor As Integer
        dmDuplex As Integer
        dmYResolution As Integer
        dmTTOption As Integer
        dmCollate As Integer
        dmFormName As String * CCFORMNAME
        dmUnusedPadding As Integer
        dmBitsPerPel As Integer
        dmPelsWidth As Long
        dmPelsHeight As Long
        dmDisplayFlags As Long
        dmDisplayFrequency As Long
        End Type
    
        Private Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" (ByVal lpszDeviceName As Long, ByVal iModeNum As Long, lpDevMode As Any) As Boolean
        Private Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA"(lpDevMode As Any, ByVal dwFlags As Long) As Long
        Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
        Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
        Private Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As String, ByVal lpInitData As Any) As Long
        Private Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long
    
        Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    
        Dim OldX As Long, OldY As Long, nDC As Long
    
        Sub ChangeRes(X As Long, Y As Long, Bits As Long)
        Dim DevM As DEVMODE, ScInfo As Long, erg As Long, an As VbMsgBoxResult
        'Get the info into DevM
        erg = EnumDisplaySettings(0&, 0&, DevM)
        'This is what we're going to change
        DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT Or DM_BITSPERPEL
        DevM.dmPelsWidth = X 'ScreenWidth
        DevM.dmPelsHeight = Y 'ScreenHeight
        DevM.dmBitsPerPel = Bits '(can be 8, 16, 24, 32 or even 4)
        'Now change the display and check if possible
        erg = ChangeDisplaySettings(DevM, CDS_TEST)
        'Check if succesfull
        Select Case erg&
        Case DISP_CHANGE_RESTART
        an = MsgBox("You've to reboot", vbYesNo + vbSystemModal, "Info")
        If an = vbYes Then
        erg& = ExitWindowsEx(EWX_REBOOT, 0&)
        End If
        Case DISP_CHANGE_SUCCESSFUL
        erg = ChangeDisplaySettings(DevM, CDS_UPDATEREGISTRY)
        ScInfo = Y * 2 ^ 16 + X
        'Notify all the windows of the screen resolution change
        SendMessage HWND_BROADCAST, WM_DISPLAYCHANGE, ByVal Bits, ByVal ScInfo
        MsgBox "Everything's ok", vbOKOnly + vbSystemModal, "It worked!"
        Case Else
        MsgBox "Mode not supported", vbOKOnly + vbSystemModal, "Error"
        End Select
        End Sub
    
        Private Sub Form_Load()
        Dim nDC As Long
        'retrieve the screen's resolution
        OldX = Screen.Width / Screen.TwipsPerPixelX
        OldY = Screen.Height / Screen.TwipsPerPixelY
        'Create a device context, compatible with the screen
        nDC = CreateDC("DISPLAY", vbNullString, vbNullString, ByVal 0&)
        'Change the screen's resolution
        ChangeRes 640, 480, GetDeviceCaps(nDC, BITSPIXEL)
        End Sub
        Private Sub Form_Unload(Cancel As Integer)
        'restore the screen resolution
        ChangeRes OldX, OldY, GetDeviceCaps(nDC, BITSPIXEL)
    
        'delete our device context
        DeleteDC nDC
        End Sub


    Spoiler untuk autoscreen 2 :
    Code:
        Option Explicit
    
        ' if True, also fonts are resized '
        Public ResizeFont As Boolean
    
        ' if True, form's height/width ratio is preserved '
        Public KeepRatio As Boolean
    
        Private Type TControlInfo
               
               ctrl As Control
               Left As Single
               Top As Single
               Width As Single
               Height As Single
               FontSize As Single
               Tag      As String
               
        End Type
    
        Private Type TAllowChanges
         
               AllowChangeTop As Boolean
               AllowChangeLeft As Boolean
               AllowChangeWidth As Boolean
               AllowChangeHeight As Boolean
               
        End Type
    
        ' this array holds the original position  '
        ' and size of all controls on parent form '
        Dim Controls() As TControlInfo
    
        ' a reference to the parent form '
        Private WithEvents ParentForm As Form
    
        ' parent form's size at load time '
        Private ParentWidth As Single
        Private ParentHeight As Single
    
        ' ratio of original height/width '
        Private HeightWidthRatio As Single
    
        Private Function CheckForChanges(ByVal TagToUse As String) As TAllowChanges
          On Error Resume Next
          Dim ChangesToAllow As TAllowChanges
         
          ChangesToAllow.AllowChangeTop = True
          ChangesToAllow.AllowChangeLeft = True
          ChangesToAllow.AllowChangeWidth = True
          ChangesToAllow.AllowChangeHeight = True
           
          If TagToUse <> "" Then
           
            If UCase(Left(TagToUse, 9)) = "MSIRESIZE" Then
             
              ChangesToAllow.AllowChangeTop = False
              ChangesToAllow.AllowChangeLeft = False
              ChangesToAllow.AllowChangeWidth = False
              ChangesToAllow.AllowChangeHeight = False
           
              If MID(TagToUse, 10, 1) = "Y" Then
             
                ChangesToAllow.AllowChangeLeft = True
               
              End If
             
              If MID(TagToUse, 11, 1) = "Y" Then
             
                ChangesToAllow.AllowChangeTop = True
               
              End If
             
              If MID(TagToUse, 12, 1) = "Y" Then
             
                ChangesToAllow.AllowChangeWidth = True
               
              End If
             
              If MID(TagToUse, 13, 1) = "Y" Then
             
                ChangesToAllow.AllowChangeHeight = True
               
              End If
             
            End If
           
          End If
         
          CheckForChanges = ChangesToAllow
         
        End Function
    
        Private Sub ParentForm_Load()
        On Error Resume Next
          ' the ParentWidth variable works as a flag '
          ParentWidth = 0
         
          ' save original ratio '
          HeightWidthRatio = ParentForm.Height / ParentForm.Width
         
        End Sub
    
        Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
          On Error Resume Next
          ResizeFont = PropBag.ReadProperty("ResizeFont", False)
          KeepRatio = PropBag.ReadProperty("KeepRatio", False)
         
          If Ambient.UserMode = False Then
           
            Exit Sub
         
          End If
         
          ' store a reference to the parent form and start receiving events '
          Set ParentForm = Parent
         
        End Sub
        Private Sub UserControl_Resize()
        On Local Error Resume Next
          UserControl.Width = 480
          UserControl.Height = 480
         
        End Sub
    
        ''''''''''''''''''''''''''''''''''''''''''''
        ' trap the parent form's Resize event      '
        ' this include the very first resize event '
        ' that occurs soon after form's load       '
        ''''''''''''''''''''''''''''''''''''''''''''
        Private Sub ParentForm_Resize()
          On Error Resume Next
          If ParentWidth = 0 Then
            Rebuild
         
          Else
            Refresh
         
          End If
         
        End Sub
    
        ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        ' save size and position of all controls on parent form                  '
        ' you should manually invoke this method each time you add a new control '
        ' to the form (through Load method of a control array)                   '
        ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        Sub Rebuild()
          On Error Resume Next
          ' rebuild the internal table
          Dim i As Integer
          Dim ctrl As Control
         
        '  Dim Changes As TAllowChanges
         
          ' this is necessary for controls that don't support
          ' all properties (e.g. Timer controls)
          On Error Resume Next
           
          If Ambient.UserMode = False Then
           
            Exit Sub
           
          End If
           
          ' save a reference to the parent form, and its initial size
          Set ParentForm = UserControl.Parent
          ParentWidth = ParentForm.ScaleWidth
          ParentHeight = ParentForm.ScaleHeight
           
          ' read the position of all controls on the parent form
          ReDim Controls(ParentForm.Controls.Count - 1) As TControlInfo
           
          For i = 0 To ParentForm.Controls.Count - 1
             
             Set ctrl = ParentForm.Controls(i)
               
        '     Changes = CheckForChanges(ctrl)
             Controls(i).Tag = ctrl.Tag
             With Controls(i)
                 
                         Set .ctrl = ctrl
                             
        '                     If Changes.AllowChangeLeft = True Then
                               .Left = ctrl.Left
        '                     End If
        '                     If Changes.AllowChangeTop = True Then
                               .Top = ctrl.Top
        '                     End If
                If .Tag = "" Then
        '                     If Changes.AllowChangeTop = True Then
                               .Width = ctrl.Width
        '                     End If
        '                     If Changes.AllowChangeTop = True Then
                               .Height = ctrl.Height
        '                     End If
                             .FontSize = ctrl.Font.Size
                End If
             End With
               
          Next
         
        End Sub
    
        '''''''''''''''''''''''''''''''''''''''''''''''''''''''
        ' update size and position of controls on parent form '
        '''''''''''''''''''''''''''''''''''''''''''''''''''''''
        Sub Refresh()
          On Error Resume Next
          Dim i As Integer
          Dim ctrl As Control
          Dim minFactor As Single
          Dim widthFactor As Single
          Dim heightFactor As Single
         
          Dim Changes As TAllowChanges
           
          ' inhibits recursive calls if KeepRatio = True '
          Static executing As Boolean
         
          If executing Then
           
            Exit Sub
           
          End If
           
          If Ambient.UserMode = False Then
           
            Exit Sub
           
          End If
           
          If KeepRatio Then
           
            executing = True
           
            ' we must keep original ratio '
            ParentForm.Height = HeightWidthRatio * ParentForm.Width
            executing = False
         
          End If
           
          ' this is necessary for controls that don't support '
          ' all properties (e.g. Timer controls)              '
          On Error Resume Next
    
          widthFactor = ParentForm.ScaleWidth / ParentWidth
          heightFactor = ParentForm.ScaleHeight / ParentHeight
         
          ' take the lesser of the two '
          If widthFactor < heightFactor Then
           
            minFactor = widthFactor
         
          Else
           
            minFactor = heightFactor
         
          End If
           
          ' this is a regular resize '
          For i = 0 To UBound(Controls)
               
             Changes = CheckForChanges(Controls(i).ctrl.Tag)
             
             With Controls(i)
                             
                             ' move and resize the controls - we can't use a Move '
                             ' method because some controls do not support the change '
                             ' of all the four properties (e.g. Height with comboboxes) '
                             If Changes.AllowChangeLeft = True Then
                               
                               .ctrl.Left = .Left * widthFactor
                             
                             End If
                             
                             If Changes.AllowChangeTop = True Then
                               
                               .ctrl.Top = .Top * heightFactor
                             
                             End If
                  If .Tag = "" Then
                             ' the change of font must occur *before* the resizing '
                             ' to account for companion scrollbar of listbox '
                             ' and other similar controls '
                             If ResizeFont Then
                               
                               .ctrl.Font.Size = .FontSize * minFactor
                             
                             End If
                             
                             If Changes.AllowChangeWidth = True Then
                               
                               .ctrl.Width = .Width * widthFactor
                             
                             End If
                             
                             If Changes.AllowChangeHeight = True Then
                               
                               .ctrl.Height = .Height * heightFactor
                             
                             End If
                 End If
             End With
         
          Next
         
        End Sub
    
        Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
         
          Call PropBag.WriteProperty("ResizeFont", ResizeFont, False)
          Call PropBag.WriteProperty("KeepRatio", KeepRatio, False)
    
        End Sub
    
        hasilnya ente taruh di form
    
        :2thumbs:


    kalo pake code autoscreen resolution bisa ga?..
    coba safe mode...
    tuh codenya taruh di usercontrol...
    Last edited by gegehare; 01-06-09 at 21:04.

    Who is Trafalgar Law? The Captain and Doctor of the Heart Pirates? a Man with bounty 200.000.000 Beli? Surgeon of Death? No , He is just a Rookie Pirate who know the meaning about "Will of D."

    "I told you, I'm waiting for the right time...Dont get rushed, "One Piece" isn't going anywhere...Now, enough talking, Shut up and follow my orders...I'll be sure, To steal the proper throne" - Trafalgar Law

    GeGeHaRe One Piece Predictions
    New Nakama - Country Of Brigands - Wano Country - X Mark - Fire Sword

  6. #5
    carnivora_love's Avatar
    Join Date
    Aug 2007
    Location
    hmm,,,dimana ya....kita komunitas depok deh kayaknya
    Posts
    299
    Points
    384.03
    Thanks: 57 / 36 / 28

    Default

    user control itu dimana ya kk??
    maklum newbie >.<

  7. #6
    carnivora_love's Avatar
    Join Date
    Aug 2007
    Location
    hmm,,,dimana ya....kita komunitas depok deh kayaknya
    Posts
    299
    Points
    384.03
    Thanks: 57 / 36 / 28

    Default

    Quote Originally Posted by Kurt.D.Cobain View Post
    Masuk Safe Mode... Lalu System Restore ke Waktu Disaat Resolusi Masih Normal
    om kurt dah coba jalanin system restore di save mode tapi malah muncul system restore has been turn of in save mode. trus klo maw jalanin katanya di normal mode..

  8. #7

    Join Date
    Dec 2007
    Location
    ygy
    Posts
    110
    Points
    122.70
    Thanks: 0 / 0 / 0

    Default

    klo semisal di seting dari safe mode ga bisa yach??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •