Visual Basic, .NET, ASP, VBScript
 

   
   
     

Форум - Общий форум

Страница: 1 |

 

  Вопрос: Daite pliz kod ili ishodnik! Добавлено: 05.12.03 18:35  

Автор вопроса:  Raven | ICQ: 174882249 
To change display mode to 1024 * 768 and 16 colors...

Ответить

  Ответы Всего ответов: 2  

Номер ответа: 1
Автор ответа:
 Crusty



Вопросов: 3
Ответов: 6
 Профиль | | #1 Добавлено: 05.12.03 18:53

Public Const DM_BITSPERPEL = &H40000

Public Const DM_PELSWIDTH = &H80000

Public Const DM_PELSHEIGHT = &H100000

Public Const CCHDEVICENAME = 32

Public Const CCHFORMNAME = 32

Type DEVMODE

dmDeviceName As String * CCHDEVICENAME

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 * CCHFORMNAME

dmUnusedPadding As Integer

dmBitsPerPel As Integer

dmPelsWidth As Long

dmPelsHeight As Long

dmDisplayFlags As Long

dmDisplayFrequency As Long

End Type

Declare Function ChangeDisplaySettings Lib "user32.dll" Alias "ChangeDisplaySettingsA" (lpDevMode As DEVMODE, ByVal dwFalgs As Long) As Long

Public Sub SetVideoMode(Width As Long, height As Long, Depth As Long)

Dim dm As DEVMODE

dm.dmPelsWidth = Width

dm.dmPelsHeight = height

dm.dmBitsPerPel = Depth

dm.dmSize = Len(dm)

dm.dmFields = DM_PELSWIDTH + DM_PELSHEIGHT + DM_BITSPERPEL

ChangeDisplaySettings dm, 0

End Sub

Использование:

SetVideoMode 1024, 768, 8 'Устанавливает видеорежим 1024x768x256

Ответить

Номер ответа: 2
Автор ответа:
 Raven



ICQ: 174882249 

Вопросов: 7
Ответов: 4
 Профиль | | #2 Добавлено: 06.12.03 02:00
Thanks!

Ответить

Страница: 1 |

Поиск по форуму



© Copyright 2002-2011 VBNet.RU | Пишите нам