Y
ydzi_
Unregistered / Unconfirmed
GUEST, unregistred user!
1. <br>Public Declare Function DlPortReadPortUlong Lib "dlportio.dll" (ByVal Port As Long) As Long<br><br>Public Declare Sub DlPortReadPortBufferUchar Lib "dlportio.dll" (ByVal Port As Long, Buffer As Any, ByVal Count As Long)<br><br>2. <br>Public Sub CODECONV(SSTR As String, XPLEN As Integer)<br> '****************************************<br> ttext = StrConv(SSTR, 128) <br> SLEN = LenB(ttext) <br> If SLEN > 0 Then<br> If SLEN >= XPLEN Then<br> XTEXT = ttext <br> '****************************************<br> Else<br> Do<br> SSTR = " " & SSTR<br> ttext = StrConv(SSTR, 128) <br> SLEN = LenB(ttext) <br> If SLEN < XPLEN Then<br> SSTR = SSTR & " "<br> ttext = StrConv(SSTR, 128) <br> SLEN = LenB(ttext) <br> End If<br> Loop Until SLEN >= XPLEN<br> XTEXT = ttext<br> End If<br> Else<br> XTEXT = ttext<br> End If<br>End Sub<br><br>3.<br> FORM1.HORPIC(0).Width = FORM1.Width<br> FORM1.VERPIC(0).Height = FORM1.Height<br> If Val(sGetINI('a.ini', "strHH", "HHBB", AppPath)) = 0 Then<br> For I = 1 To 31<br> Unload FORM1.VERPIC(I)<br> Next I<br> YDLT = (FORM1.Picture1.Width - 2) / XDOTS<br> XDLT = (FORM1.Picture1.Height - 2) / YDOTS<br> I = 1<br> Load FORM1.HORPIC(I)<br> With FORM1.HORPIC(I)<br> .Top = 1<br> .Left = 0<br> .Height = XDLT / 4<br> .Width = FORM1.HORPIC(I).Width<br> .ZOrder (0)<br> End With<br> FORM1.HORPIC(I).Visible = True<br> For I = 2 To YDOTS ' + 1<br> Load FORM1.HORPIC(I)<br> With FORM1.HORPIC(I)<br> .Top = ((I - 2) + 3 / 4) * XDLT + 1<br> .Left = 0<br> .Height = XDLT / 2<br> .Width = FORM1.HORPIC(I).Width<br> .ZOrder (0)<br> End With<br> FORM1.HORPIC(I).Visible = True<br> Next I<br> Load FORM1.HORPIC(I)<br> With FORM1.HORPIC(I)<br> .Top = ((I - 2) + 3 / 4) * XDLT + 1<br> .Left = 0<br> .Height = XDLT / 4<br> .Width = FORM1.HORPIC(I).Width<br> .ZOrder (0)<br> End With<br> FORM1.HORPIC(I).Visible = True<br> Else<br> For I = 1 To 31<br> Unload FORM1.HORPIC(I)<br> Next I<br> XDLT = (FORM1.Picture1.Width - 2) / YDOTS<br> YDLT = (FORM1.Picture1.Width - 2) / XDOTS<br> I = 1<br> Load FORM1.VERPIC(I)<br> With FORM1.VERPIC(I)<br> .Top = 0<br> .Left = 1<br> .Width = XDLT / 4<br> .Height = FORM1.VERPIC(I).Height<br> .ZOrder (0)<br> End With<br> FORM1.VERPIC(I).Visible = True<br> For I = 2 To YDOTS<br> Load FORM1.VERPIC(I)<br> With FORM1.VERPIC(I)<br> .Left = ((I - 2) + 3 / 4) * XDLT + 1<br> .Top = 0<br> .Width = XDLT / 2<br> .Height = FORM1.VERPIC(I).Height<br> .ZOrder (0)<br> End With<br> FORM1.VERPIC(I).Visible = True<br> Next I<br> Load FORM1.VERPIC(I)<br> With FORM1.VERPIC(I)<br> .Left = ((I - 2) + 3 / 4) * XDLT + 1<br> .Top = 0<br> .Width = XDLT / 4<br> .Height = FORM1.VERPIC(I).Height<br> .ZOrder (0)<br> End With<br> FORM1.VERPIC(I).Visible = True<br> End If<br> <br>4.<br> SourceDC = CreateDC("DISPLAY", 0, 0, 0)<br> DestDC = CreateCompatibleDC(SourceDC)<br> Bhandle = CreateCompatibleBitmap(SourceDC, FORM2.Width / Screen.TwipsPerPixelX, FORM2.Height / Screen.TwipsPerPixelY)<br> SelectObject DestDC, Bhandle<br> BitBlt DestDC, 0, 0, FORM2.Width / Screen.TwipsPerPixelX, FORM2.Height / Screen.TwipsPerPixelY, SourceDC, FORM2.Left / Screen.TwipsPerPixelX, FORM2.Top / Screen.TwipsPerPixelY, &HCC0020<br> Wnd = Screen.ActiveForm.hwnd<br> OpenClipboard Wnd<br> EmptyClipboard<br> SetClipboardData 2, Bhandle<br> CloseClipboard<br> DeleteDC DestDC<br> ReleaseDC Dhandle, SourceDC<br> FORM1.Picture1.Picture = Clipboard.GetData()<br><br>谢谢