Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by �ڰ�֮��
Tue, 16 Dec 1997 00:00
��VBʵ����Ļ��������Ч��
Author: �ڰ�֮��
Date: Tue, 16 Dec 1997 00:00
Date: Tue, 16 Dec 1997 00:00
169 lines
7924 bytes
7924 bytes
��VBʵ����Ļ��������Ч��
��������һ����Ļ��������ֹ����
ĻͻȻ�������»����ҷ����������������ص�
��Ļ����Ч���������������ģ����Ҹ�����
���а���֮����Ҳ��������VB�����ɵء���
��������Ч�����������¹���Ϊ��˵��ʵ
�ֵĹ�̣�����ƪ������ֻ�����ֱ��ʵ��
�ij�������Ļ��������ı�д�ݲ����ۣ�
��
ʵ��Ч��һ����������ڵı�����Ļ���
������˼·�ǽ���������ץ��һ�������ڣ���
����һ������ı����úڣ����ȴ�����������
forml��form2����Au��toRedraw����ΪTrue��
Border��Style����ΪNone���ޱ߿���for
m2��Backcolor��Ϊ��ɫ����forml�б��Ƴ���
���£�
Dim ScreenhWnd����ScreenDC����rc��
��Windows API����
Declare Function BitBlt�� Lib ��GDI��
��ByVal hDest��DC����ByVal dx����ByVal d
y����ByVal nWidth����ByVal nHeight����By
Val hSrcDC����ByVal sx����ByVal sy����By
Val dwRop����
Declare Function GetDesk��topWindow��
Lib ��USER�� ����
Declare Function GetDC�� Lib ��US��ER
�� ��ByVal hWnd����
Declare Function ReleaseDC�� Lib ��US
ER�� ��ByVal hWnd����ByVal hDC����
Sub Form��Load
��form1�����С��λ������Ļ�غ�
form1��Width��Screen��Width
form1��Height��Screen��Height
form1��left��0
form1��top��0
��form2�����С��λ������Ļ�غ�
form2��Width��Screen��Width
form2��Height��Screen��Height
form2��left��0
form2��top��0
�佫��������ץ��form1��
ScreenhWnd����GetDesktopWindow������
ScreenDC����GetDC����ScreenhWnd����
rc����BitBlt����form1��hDC��0��0��for
m1��ScaleWidth��form1��ScaleHeight��
ScreenDC����0��0����HCC0020��
rc����ReleaseDC����ScreenhWnd����Scre
enDC����
����ʾform1��form2
form2��Show
form1��Show
�������ƶ�form1
While True
form1��Top��form1��Top �� 500
��500Ϊ�ƶ��ٶ�
if form1��Top��Screen��Henght Then
�䳬����Ļ�½�ʱ�ص�������
form1��Top����Screen��Height
End if
DoEvents ����Ӧ�����¼�
Wend
End Sub
�����������Ļ
Sub Form��MouseDown����
End
End Sub
ʵ��Ч�����������������ϵط�����
���һ��˼·�ǽ���������ץ������һ��
�Ĵ����н�������ع������֣������������
���������£�
form2��Top����Screen��Henght
�佫form2����form1�Ķ�������
rc����BitBlt����form2��hDC��0��0��for
m2��ScaleWidth��form2��ScaleHeight��Scre
enDC����0��0����HCC0020��
�����Ӵ˾䣬������ץ��form2��
While True
form2��Top��form2��Top��500
If form2��Top��0 Then
form1��Top��form2��Top��Screen��Heigh
t
��form1��form2����
Else
form1��Top��form2��Top��Screen��Heigh
t
��form1��form2����
End If
If form2��Top��Screen��Height Then
form2��Top����Screeen��Height
��form2�����½�ʱ�ص�������
Een if
DoEvents
Wend
���㽭 �½�����
--
[m[1;34m�� ��Դ:���ɰ��ļ�BBSվ bbs.njtu.edu.cn��[IP: 202.112.145.26][m
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads