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

📄 sm1.bas

📁 星子行主机控制系统用于主机管理,方便远程操作,通信等功能.更 方便用于局域网,管理速度快,连接简单方便.注意:星子行连接可用 于带路由主机与带路由主机之间连接,非路由与非路由之间连接.带
💻 BAS
字号:
Attribute VB_Name = "Sm1"

Option Explicit
Private Declare Function SetDIBitsToDevice Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, ByVal dx As Long, ByVal dy As Long, ByVal SrcX As Long, ByVal SrcY As Long, ByVal Scan As Long, ByVal NumScans As Long, Bits As Any, BitsInfo As BitMapInfo, ByVal wUsage As Long) As Long

Private BmpInfo As BitMapInfo
Private bBytes() As Byte


Public Sub m16xa(bmWidth As Long, bmHeight As Long, bmWidthBytes As Long, _
bmBitsPixel As Long)



Form2.Picture1.Move 0, 0, Form2.Picture1.ScaleX(bmWidth, 3, 1), Form2.Picture1.ScaleY(bmHeight, 3, 1)

If ((bmWidth >= Form2.ScaleX(Screen.Width, 1, 3)) And (bmHeight >= Form2.ScaleY(Screen.Height, 1, 3))) Then

Form2.WindowState = 2

Else

Form2.Move 0, 0, Form2.Picture1.Width + 200, Form2.Picture1.Height + 600
Call Form2.vs

End If


Dim Bif As BITMAPFILEHEADERX
Dim Bih As BITMAPINFOHEADER
Dim bmpsize As Long

 
bmpsize = bmWidthBytes * bmHeight
With Bih
  .biBitCount = bmBitsPixel
  .biClrImportant = 0
  .biClrUsed = 0
  .biCompression = BI_RGB
  .biHeight = bmHeight
  .biPlanes = 1
  .biSize = Len(Bih)
  .biSizeImage = bmpsize
  .biWidth = bmWidth
  .biXPelsPerMeter = 0
  .biYPelsPerMeter = 0
End With
With Bif
  .bfOffBits = 54
  .bfReserved1 = .bfReserved2 = 0
  .bfType = IsBitmapFile
  .bfSize = 54 + bmpsize
End With
BmpInfo.bmiHeader = Bih


    
 
End Sub

Public Sub m16xb(bmp16x() As Byte)
Dim ik As Long
ik = SetDIBitsToDevice(formhdc, 0, 0, BmpInfo.bmiHeader.biWidth, BmpInfo.bmiHeader.biHeight, 0, 0, 0, BmpInfo.bmiHeader.biHeight, bmp16x(0), BmpInfo, DIB_RGB_COLORS)

End Sub



⌨️ 快捷键说明

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