🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.program
1 messages
1 total messages Started by ���ܵ�Сʨ Sat, 18 Apr 1998 00:00
����VB����WINDOWS�µĶ�̬�˵�
#1273
Author: ���ܵ�Сʨ
Date: Sat, 18 Apr 1998 00:00
119 lines
7722 bytes
  �˵���Windows�е�һ����Ҫ��Դ,��Ӧ�ó������ڶ�IJ�������
��ȷ����,ͬʱ��϶༶������Ի�����,ʹ������dz�����,��֮��
���Խ�ʡ��������Ļ�ռ���ŵ�,ʹ�����ڵ�Windows�����һ�����
�����˲˵���Դ����̬�˵��ǶԳ���˵���һ����չ,��ɸ����
���IJ������ݶ�̬�������֮�йصIJ˵����ɾ���޹صIJ˵���,��
��,�˵��е�ѡ����ǹ̶�������ˡ�����:����������File�˵�
�п����Զ�����Ӳ��ı�˵���,���Ա������ε��ù���ļ���
��
    ���汾�Ľ���VB4.0����Ϊ��������,ͨ��һ���������ʵ�����
����������Լ���Win dows�����п�������̬�˵���
    VB�ṩ����������Աһ����ͼ1��ʾ�IJ˵������,�ø������
�ڳ����м���˵�����ʮ��������ʮ���������顪������ֻ����д
һ��"���",�Ϳ��Բ���һ��֧�ֶ༶�������ȼ�����ȹ�����ȫ��W
indows��׼�˵���
    ���ò˵�����������Բ�����в˵�����������IJ˵����˵�
��������������һ�������˵������,��Щ�˵�����¼���̺�
һ�����õ����֡�ÿ���˵������Ψһ������ֵ(Index),�����е�
�˵������ͬ��Nameֵ��������������������ɶ�̬�˵���ǰ��, 
��������߿���ָ��������IJ˵���Ϊһ������������,Ȼ��,�Ϳ�
���������ڼ�,ͨ������˵����������鶯̬�ؼ����ɾ��˵�����
��
    �������ж���˵�����������IJ���Ϊ:

    1.����һ���˵���;

    2.��Index���ֿ�������һ����ֵ,���ֵ���ò˵����ڿ�����
���е�λ��; 
    3.�ٴ���������ͬ����������(NAME)����һ���˵���: ͼ1 VB4.
0�в˵������ʵ�����н���

    4.��Index���ֿ���������һ����ͬ����ֵ;

    5.��������˵����ظ�����2��4��
    VB�������������ķ�������:�������е�ijһ����������Ӧһ
���¼���,VB�͵�����Ӧ���¼����,�����˵��������ֵ��Ϊ����
�ݸ�ù��,ʹ�������жϳ��ĸ�������Ӧ����Ӧ����¼���
    �����²��轨�����Ӧ�ó���:
    ����1:ʹ��ȱʡ�Ĵ���,����������Ϊ"��̬�˵���ʾ����"��
    ����2:���Ͽ����
    �ڱ����п�����Ϊ�������ťCommand1��Command2,�ֱ�����
�����Ӳ˵����ɾ��˵���Ĺ���,���ֱ�����Ϊ"��Ӳ˵���"��"
ɾ��˵���"��
    ����3:���ϲ˵���
    �˵��������ʵ��������ͼ1��ʾ:���������˵���,����"��ʾ��
��"Ϊ���˵���;"�˳���ʾ"�����˳��ó���,����ʼ���ǿɼ��;����
�����˵���,����һ��Caption����Ϊ��,Nam eΪMenu,Indexֵ��Ϊ0,
���ڲ���˵�����������,��һ��Ϊ���߷�"��",���ڷָ���ʾ,����
����ʼ��Ϊ���ɼ�˵���,���ڳ�������й����ʹ�á�
    ����4:��д�¼��Ͳ˵���ͨ�ù�̡�
    �������ڼ���Load��䶯̬�ذ�һ���˵���ӵ��˵�����������
:
    Load menuname(menunum)
    �������ڼ���Unload��䶯̬��ɾ��˵����������е�ij���˵�
��:
    Unload menuname(menunum)
ͼ2 ��Ӷ�̬�˵�ǰ������ʵ��
ͼ3 ��Ӷ�̬�˵��������ʵ��
    ˵��:menuname�Dz˵��������,menunum�Dz˵��������ֵ,����
������ȫ�ֱ���,�ڳ����ͨ��������������������ʵ��������
����ͼ2��ͼ3��ʾ,����ͼ2Ϊ��Ӷ�̬�˵���֮ǰ�IJ˵����,ͼ3Ϊ
��Ӷ�̬�˵���֮��IJ˵������
    �����嵥����:
    ��ȫ�ֱ���������
    Dim menunum As Integer
    Dim menuname As String
    ����Ӷ�̬�˵���Ĺ��
    Private Sub Command1_Click()
    msg$="����������ӵIJ˵������:"
    menuname$=InputBox$(msg$,"�˵����������")
    If menuname$="" Then Exit Sub����Cancle�Ĵ���
    menunum=menunum+1
    If menunum >0 And menu_line.Visible=0 Then
    menu_line.Visible=-1
    Load Menu(menunum)
    Menu(menunum).Caption=menuname$
    Menu(menunum).Visible=-1
    End  Sub
    ��ɾ��̬�˵���Ĺ��
    Private Sub Command2_Click()
    If menunum=0 Then Exit Sub
    num%=0
    msg$="��������ɾ��IJ˵�������:"
    menuname$=InputBox$(msg$"�˵����������")
    If menuname$="" Then Exit Sub����Cancle�Ĵ���
    For i%=1 To menunum
    If Menu(i%).Caption=menuname$ Then
    num%=i%
    Exit For
    End If
    Next i%
    If num% > menunum Or num% < 1 Then
    MsgBox"��ƥ��IJ˵���!"
    Exit Sub
    End If
    For i%=num% to menunum1
    Menu(i%).Caption = Menu(i%+1).Caption
    Next i%
    Unload Menu(menunum)
    menunum=menunum1
    If menunum=0 Then
    menu_line.VisibIe =0
    End Sub
    ��"�˳���ʾ"�˵�������
    Private Sub exit_Click()
    End
    End Sub
    �������ʼ��
    Private Sub Form_Load()
    menunum=0
    menuname=""
    End Sub
    ����Ӻ�Ķ�̬�˵����������Ӧ
    Private Sub Menu_Click(Index As Integer)
    MsgBox("����"+Menu(Index).Caption+"�˵�����¼���Ӧ")
    End Sub

--
�� ��Դ:���ϴ�С�ٺ���Ϣ����վ bbs.nju.edu.cn��[FROM: hsia.nju.edu.cn]
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