home *** CD-ROM | disk | FTP | other *** search
/ Computer Tool Software / soft.iso / Multimed / WINFAST / WFST230 / VB-V300 / VIDEO.BAS < prev    next >
Encoding:
BASIC Source File  |  1996-06-03  |  4.4 KB  |  98 lines

  1. Option Explicit
  2.  
  3. 'VLIB.DLL, video functions declare
  4. Declare Sub VIDEO_SetVideoSource Lib "VLIB.DLL" (ByVal nVideoSrc As Integer)
  5. Declare Sub VIDEO_SetInputFormat Lib "VLIB.DLL" (ByVal nVideoFormat As Integer)
  6. Declare Sub VIDEO_SetVideoMode Lib "VLIB.DLL" (ByVal nVideoMode As Integer)
  7. Declare Function VIDEO_Initialize Lib "VLIB.DLL" () As Integer
  8. Declare Sub VIDEO_End Lib "VLIB.DLL" ()
  9. Declare Sub VIDEO_EnableVideo Lib "VLIB.DLL" ()
  10. Declare Sub VIDEO_DisableVideo Lib "VLIB.DLL" ()
  11. Declare Sub VIDEO_SetColor Lib "VLIB.DLL" (ByVal ncolor As Any, ByVal ncolor As Any)
  12. Declare Sub VIDEO_SetVideoPos Lib "VLIB.DLL" (ByVal word As Integer, ByVal word As Integer, ByVal word As Integer, ByVal word As Integer)
  13. Declare Sub VIDEO_FreezeVideo Lib "VLIB.DLL" ()
  14. Declare Sub VIDEO_UnfreezeVideo Lib "VLIB.DLL" ()
  15. Declare Sub VIDEO_LoadImageRect Lib "VLIB.DLL" (ByVal lpstr As Long, ByVal word1 As Integer, ByVal word2 As Integer, ByVal word3 As Integer, ByVal word4 As Integer, ByVal wtype As Integer, ByVal woffset As Integer)
  16. Declare Sub VIDEO_RestoreImageRect Lib "VLIB.DLL" (ByVal lpstr As Long, ByVal word1 As Integer, ByVal word2 As Integer, ByVal word3 As Integer, ByVal word4 As Integer, ByVal wtype As Integer, ByVal woffset As Integer)
  17. Declare Sub VIDEO_SetHorizontalAlignment Lib "VLIB.DLL" (ByVal word As Integer)
  18. Declare Sub VIDEO_SetVerticalAlignment Lib "VLIB.DLL" (ByVal word As Integer)
  19. Declare Sub VIDEO_SetHorizontalCrop Lib "VLIB.DLL" (ByVal word As Integer)
  20. Declare Sub VIDEO_SetVerticalCrop Lib "VLIB.DLL" (ByVal word As Integer)
  21.  
  22. 'windows api
  23. Type RECT
  24.     Left As Integer
  25.     Top As Integer
  26.     Right As Integer
  27.     Bottom As Integer
  28. End Type
  29.  
  30. Declare Sub GetWindowRect Lib "User" (ByVal hWnd As Integer, lpRect As RECT)
  31. Declare Sub MoveWindow Lib "User" (ByVal hWnd As Integer, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal bRepaint As Integer)
  32. Declare Sub SetWindowPos Lib "User" (ByVal h1%, ByVal h2%, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%, ByVal f%)
  33.  
  34. Global Const SM_CXSCREEN = 0
  35. Global Const SM_CYSCREEN = 1
  36. Global Const SM_CYCAPTION = 4
  37. Global Const SM_CXBORDER = 5
  38. Global Const SM_CYBORDER = 6
  39. Global Const SM_CXDLGFRAME = 7
  40. Global Const SM_CYDLGFRAME = 8
  41. Global Const SM_CYMENU = 15
  42. Global Const SM_CXFRAME = 32
  43. Global Const SM_CYFRAME = 33
  44.  
  45. Declare Function GetSystemMetrics Lib "User" (ByVal nIndex As Integer) As Integer
  46.  
  47. Type BITMAPINFOHEADER '40 bytes
  48.         biSize As Long
  49.         biWidth As Long
  50.         biHeight As Long
  51.         biPlanes As Integer
  52.         biBitCount As Integer
  53.         biCompression As Long
  54.         biSizeImage As Long
  55.         biXPelsPerMeter As Long
  56.         biYPelsPerMeter As Long
  57.         biClrUsed As Long
  58.         biClrImportant As Long
  59. End Type
  60.  
  61. Type BITMAPFILEHEADER
  62.         bfType As Integer
  63.         bfSize As Long
  64.         bfReserved1 As Integer
  65.         bfReserved2 As Integer
  66.         bfOffBits As Long
  67. End Type
  68.  
  69. Declare Function lopen Lib "Kernel" Alias "_lopen" (ByVal lpPathName As String, ByVal iReadWrite As Integer) As Integer
  70. Declare Function lclose Lib "Kernel" Alias "_lclose" (ByVal hFile As Integer) As Integer
  71. Declare Function lcreat Lib "Kernel" Alias "_lcreat" (ByVal lpPathName As String, ByVal iAttribute As Integer) As Integer
  72. Declare Function lread Lib "Kernel" Alias "_lread" (ByVal hFile As Integer, lpBuffer As Any, ByVal wBytes As Integer) As Integer
  73. Declare Function lwrite Lib "Kernel" Alias "_lwrite" (ByVal hFile As Integer, lpBuffer As Any, ByVal wBytes As Integer) As Integer
  74. Declare Function llread Lib "Kernel" Alias "_lread" (ByVal hFile As Integer, ByVal lpBuffer As Long, ByVal wBytes As Integer) As Integer
  75. Declare Function llwrite Lib "Kernel" Alias "_lwrite" (ByVal hFile As Integer, ByVal lpBuffer As Long, ByVal wBytes As Integer) As Integer
  76.  
  77. Global Const GMEM_MOVEABLE = &H2
  78. Global Const GMEM_ZEROINIT = &H40
  79.  
  80. Global Const GHND = (GMEM_MOVEABLE Or GMEM_ZEROINIT)
  81.  
  82. Declare Function GlobalAlloc Lib "Kernel" (ByVal wFlags As Integer, ByVal dwBytes As Long) As Integer
  83. Declare Function GlobalFree Lib "Kernel" (ByVal hMem As Integer) As Integer
  84. Declare Function GlobalLock Lib "Kernel" (ByVal hMem As Integer) As Long
  85. Declare Function GlobalUnlock Lib "Kernel" (ByVal hMem As Integer) As Integer
  86.  
  87. 'set local window size
  88. Global ww As Integer
  89. Global hh As Integer
  90. Global xx As Integer
  91. Global yy As Integer
  92.  
  93. Sub Main ()
  94.     Load Form1
  95.     Form1.Show
  96. End Sub
  97.  
  98.