VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



a very small picture viewer in one minute.

by Happy Coder (1 Submission)
Category: Complete Applications
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (7 Votes)

Your own homemade picture viewer in ONE minute, supports at least jpg, gif, bmp, pcx & many others

Inputs
nothing
Assumes
nothing
Code Returns
nothing

Rate a very small picture viewer in one minute.

'add following code to your form
VERSION 4.00
Begin VB.Form Form1 
 Caption  = "Very simple picture viewer"
 ClientHeight = 9450
 ClientLeft = 1140
 ClientTop = 1515
 ClientWidth = 11460
 Height  = 9855
 Left  = 1080
 LinkTopic = "Form1"
 ScaleHeight = 9450
 ScaleWidth = 11460
 Top  = 1170
 Width  = 11580
 Begin VB.PictureBox Picture1 
 AutoSize = -1 'True
 Height  = 9135
 Left  = 1680
 ScaleHeight = 9075
 ScaleWidth = 9675
 TabIndex = 3
 Top  = 120
 Width  = 9735
 End
 Begin VB.FileListBox File1 
 Height  = 6300
 Left  = 0
 TabIndex = 2
 Top  = 3000
 Width  = 1575
 End
 Begin VB.DirListBox Dir1 
 Height  = 2505
 Left  = 0
 TabIndex = 1
 Top  = 480
 Width  = 1575
 End
 Begin VB.DriveListBox Drive1 
 Height  = 315
 Left  = 0
 TabIndex = 0
 Top  = 120
 Width  = 1575
 End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
On Error Resume Next ' if not supported picture format, don't show it
Picture1.Picture = LoadPicture(Dir1.Path + "\" + File1.filename)
End Sub

Download this snippet    Add to My Saved Code

a very small picture viewer in one minute. Comments

No comments have been posted about a very small picture viewer in one minute.. Why not be the first to post a comment about a very small picture viewer in one minute..

Post your comment

Subject:
Message:
0/1000 characters