⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 enumera.frm

📁 用VB编写一个非常好的赛车游戏,源程序来自网络,这里是转载~谢谢合作~
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Enumera 
   BackColor       =   &H00000000&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "F1 3015"
   ClientHeight    =   4245
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6375
   Icon            =   "Enumera.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   ScaleHeight     =   283
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   425
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "ESCI"
      Height          =   615
      Left            =   5280
      TabIndex        =   3
      Top             =   3240
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "INIZIA"
      Height          =   735
      Left            =   120
      TabIndex        =   2
      Top             =   3120
      Width           =   1575
   End
   Begin VB.ListBox resol 
      Height          =   780
      Left            =   120
      TabIndex        =   1
      Top             =   480
      Width           =   4095
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "RISOLUZIONE"
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   600
      TabIndex        =   0
      Top             =   240
      Width           =   1215
   End
End
Attribute VB_Name = "Enumera"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public elenco As New Collection

Private Sub Command1_Click()

For aus = 0 To resol.ListCount
    If resol.Selected(aus) Then
        Dim d3dm As Direct3D8
        Set d3dm = dx.Direct3DCreate
    
        Dim modetemp As D3DDISPLAYMODE
        '
        Call d3dm.EnumAdapterModes(0, elenco.Item(aus + 1), modetemp)
        modalit郪ideo = modetemp
        Set d3dm = Nothing
        Exit For
    End If
Next aus
        Enumera.Hide
        Call Main
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()

elenca

End Sub

Sub elenca()
    Dim d3dm As Direct3D8
    Set d3dm = dx.Direct3DCreate
    
    Dim modetemp As D3DDISPLAYMODE
    '
    nModes = d3dm.GetAdapterModeCount(0)
    For i = 0 To nModes - 1 '
        Call d3dm.EnumAdapterModes(0, i, modetemp)
        If modetemp.Width <= 1024 Then
        
        Select Case modetemp.Format
        '32 bit
        Case D3DFMT_X8R8G8B8
            If d3dm.CheckDeviceType(0, D3DDEVTYPE_HAL, modetemp.Format, modetemp.Format, False) = D3D_OK Then
                If Not scandisci(modetemp.Width & "x" & modetemp.Height & " 32 bit" & "    [FMT: " & modetemp.Format & "]") Then
                    resol.AddItem modetemp.Width & "x" & modetemp.Height & " 32 bit" & "    [FMT: " & modetemp.Format & "]"
                    elenco.Add i
                End If
            End If
        '16 bit
        Case D3DFMT_R5G6B5
            If d3dm.CheckDeviceType(0, D3DDEVTYPE_HAL, modetemp.Format, modetemp.Format, False) = D3D_OK Then
                If Not scandisci(modetemp.Width & "x" & modetemp.Height & " 16 bit" & "    [FMT: " & modetemp.Format & "]") Then
                    resol.AddItem modetemp.Width & "x" & modetemp.Height & " 16 bit" & "    [FMT: " & modetemp.Format & "]"
                    elenco.Add i
                    
                    'risoluzione base se la risoluzione 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -