🚀 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, 13 Dec 1997 00:00
Re: VB4���ʱ������ (ת��)
#2534
Author: ����һ��
Date: Sat, 13 Dec 1997 00:00
59 lines
2972 bytes
�� �� julie (julie) �Ĵ������ᵽ: ��
: ��  ��: Re: VB4���ʱ������ (ת��)
: ����վ: �人���ƻƺ�վ (Tue Dec  9 20:21:51 1997) , վ���ż�
: 
: �� �� LaoWei (����һ��) �Ĵ������ᵽ: ��
: : ������PictureBox,�ڻ�������PictureBoxʱҪע�⻭��.
: : ���Ȼ���һ��, �ڻ��ڶ���ʱҪ���Ȱ�Form�еĹ���
: : �������ڵ�һ��PictureBox������,Ȼ�󻭵ڶ���PictureBox,
: : ����ʾimageʱ�õڶ���PictureBox��ʾ,����image����ʾ��Χ
: : �Ͳ��ᳬ����һ��PictureBox.
: 
: ����ﲻ��Ŀ�ġ�
: ���Թ��ˣ���ͼ���800*600������ȫ����ʾ����������Ҫ�������������ǡ���ؼ��ϣ�
: 
��Ȼ��˵�ķ������޷�һ����ȫ����ʾ����,���Ҫ����Ļ�,�Ǿ͵�800*600��С��
PictureBox�ؼ�ʵ����,ͼ��Ĺ�����Ҫ���Լ�д����,����:
��Ĺ������ֱ�Ϊ:HScroll1(ˮƽ),VScroll1(��ֱ)
ͼ�ο�Ϊ:Picture1,Picture2(��������,��Ҫ�����һ����Picture2
��AutoSize����Ҫ��ΪTRUE)
װ��ͼ��ʱ:(��Ӳ˵���ѡ��,�˵���������ΪmnuFileLoadPicture)

'cmndlgΪһͨ�öԻ���
Private Sub mnuFileLoadPicture_Click()
    On Error GoTo ErrExit
    cmndlg.Filter = "Bitmap file(*.bmp)|*.bmp"
    cmndlg.FilterIndex = 1
    cmndlg.ShowOpen
    Picture2.Picture = LoadPicture(cmndlg.filename)
    VScroll1.Min = 0
    HScroll1.Min = 0
    VScroll1.Max = Picture2.Height - Picture1.Height
    HScroll1.Max = Picture2.Width - Picture1.Width
    If HScroll1.Max < 0 Then HScroll1.Max = 0
    If VScroll1.Max < 0 Then VScroll1.Max = 0
ErrExit:
    
End Sub

'ˮƽ�������ĵ�ǰֵ�ı�ʱ
Private Sub HScroll1_Change()
    Picture2.Left = -HScroll1.Value
    
End Sub

'��ֱ�������ĵ�ǰֵ�ı�ʱ
Private Sub VScroll1_Change()
    Picture2.Top = -VScroll1.Value
    
End Sub

����һ���ܸ㶨
Good Luck!

--
��ҳ:
  http://www.geocities.com/CollegePark/Quad/7895/

�� ��Դ:���人���ƻƺ�վ s1000e.whnet.edu.cn��[FROM: 162.105.201.226]
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