Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by ���δ�
Mon, 22 Jun 1998 00:00
vb�������4
Author: ���δ�
Date: Mon, 22 Jun 1998 00:00
Date: Mon, 22 Jun 1998 00:00
105 lines
6398 bytes
6398 bytes
VB �� �� С �� �ɣ�4��
�� ֹ �� �� �� �� �� �� �� �� �� ��
�� �� ��
̷��
---- Visual Basic �� �� �� �� �� �� �� �� �� �� �� �� �� ��
�� �� �� ���� �� �� �� �� �� �� ʹ �á� �� ���� �� �� Ա ��
�� �� ϣ �� �� ʾ һ Щ �� �� �� �� ϣ �� �� �� �� �� �� ��
���� �� �� �� �� �� �� �� �� �� ֻ �� �� �� �� �� �� �� ��
�� �ݡ�
ʹ һ �� �� �� �� �� �� ֻ ��
---- ��Visual Basic �� �� �� �� �� �� �� �� ��MultiLine ��
�� �� �� ΪTrue�� �� �� �� �� �� �� �� �� �� �� �� һ �С�
�� �⣬ �� �� �� �� �� �� �� ��ScrollBars �� �� �� ��
Ϊ3-Both�� �� ��1-Vertical�� �� ��2-Horizontal���� �� �� ��
�� �� �� �� �� �� �� �� �� �ݡ�
---- �� �� Ա Ҫ �� ʵ �� �� �� �� �� �� �� �� �� �� �� ��
�� ���� �� �� �� �� �� �� �� �� �� �� �� �� �� Ϊ ֻ �� ״
̬�� �� �� �� ͨ �� ʹ ��Microsoft Windows Ӧ �� �� �� �� ��
�� �ڣ�API�� ��SendMessage �� �� �� ʵ �֡� SendMessage ��
�� �� �� �� �� �� �� һ ��EM_SETREADONLY �� Ϣ �� �� �� ��
�� �� �У� �� �� ʹ �� �� �� �� �� �� Ϊ ֻ ����
---- Ҫ �� �� �� �� ʹ �� ��SendMessage �� �� �� Ҫ �� ��
�� �� �� �� �� �� �� �� �� �� Ŀ �� ͨ �� �� �� �� �� ��
� ע �� �� �� �� �� �� �� Ҫ �� д �� һ �� �ڣ���
---- Private Declare Function SendMessage Lib "user32" Alias
"SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long,
ByVal wParam As Integer, ByVal lParam As Long) As Long
---- ��SendMessage �� �� �� Ҫ4 �� �� �� �� �� �� ʾ��
---- .hwnd һ �� �� �� �� ֵ�� �� �� �� �� �� �� �� �� �� ��
��
---- .wMsg һ �� �� �� �� ֵ�� �� �� �� �� �� �� �� �� Ϣ��
�� �� �� �� �� � ��EM_SETREADONLY��
---- .wParam һ �� �� �� ֵ�� �� �� �� ΪTrue�� �� �� �� ��
�� �� ֻ �� �� �ǣ� �� �� �� ΪFalse�� �� ɾ �� �� �� �� ֻ
�� �� �ǡ�
---- .lParam һ �� �� �� �� ֵ�� �� Ӧ �� �� �� �� Ϊ0
��EM_SETREADONLY �� ʹ �� ��
---- �� �� �� �� �� �� ��SendMessage �� �� ֮ �� �� �� ��
һ �� �� �� �� ֵ�� ָ �� �� �� �� ���� �� �� ֵ ��0�� �� ��
ʧ �ܣ� �� �� ֵ Ϊ0����
�� �� �� ��
---- �� �� �� �� ʾ �� �� �� �� ֹ �� �� �� �� һ �� �� ��
�� �� �� �� �� �� �ݡ�
---- 1. ��Visual Basic �� �� ʼ һ �� �� �� �� �̣� �� �� ȱ
ʡ �� �� �� �� ��Form1��
---- 2. �� �� �� �� �� �� �� �� �� �� �� �� �� ��Form1 �� ͨ
�� �� �� �� �� �У� ע �� �� �� �� �� �� �� Ҫ �� д �� һ
�� �ڣ���
---- Private Declare Function SendMessage Lib "user32" Alias
"SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long,
ByVal wParam As Integer, ByVal lParam As Long) As Long
---- Const WM_USER = &H400
---- Const EM_SETREADONLY = (WM_USER + 31)
---- 4. ��Form1 �� �� �� һ �� �� �� �� �� ���� �� �� ȱ ʡ
�� �� �� �� ��Text1�� �� ��MultiLine �� �� �� �� ΪTrue�� ��
�� �� �� ��ScrollBars �� �� �� �� Ϊ3-Both��
---- 5. ��Form1 �� �� �� һ �� �� �� �� ť �� ���� �� �� ȱ
ʡ �� �� �� �� ��Command1��
---- 6. �� �� �� �� �� �� �� �� ��Command1 �� �� �� �� ��
�У�
Private Sub Command1_Click()
Dim RetVal As Long
RetVal = SendMessage(Text1.hwnd, EM_SETREADONLY, True, ByVal 0&)
End Sub
---- ͨ �� �� ��F5 �� �� ִ �� �� �� �� �� �� �� �� �� ��
�� �� �� �� һ Щ �� ���� �� �� ʹ �� ˮ ƽ �� �� ֱ �� ��
�� �� �� �� �� ���� �� �� �� �� �� �� �� �� �� �ݡ� �� �� ��
�� �� ť�� �� �� �� Ȼ �� �� ʹ �� �� �� �� �� �� �� �� ��
�� �� �� �� �� �� �� �� �� �� �ݣ� �� �� �� �� �� �� �� ��
--
�� ��Դ:��Yat-sen Channel argo.zsu.edu.cn��[FROM: 202.116.78.75]
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