home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / picview / mainform.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-09-21  |  8.2 KB  |  272 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Begin VB.Form MainForm 
  4.    BackColor       =   &H00000000&
  5.    Caption         =   "Picture Viewer 1.0"
  6.    ClientHeight    =   4845
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   10695
  10.    Icon            =   "MainForm.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   4845
  14.    ScaleWidth      =   10695
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin MSComDlg.CommonDialog CommonDialog1 
  17.       Left            =   7800
  18.       Top             =   4320
  19.       _ExtentX        =   847
  20.       _ExtentY        =   847
  21.       _Version        =   393216
  22.       DefaultExt      =   "*.bmp"
  23.       DialogTitle     =   "Copy File:"
  24.    End
  25.    Begin VB.Timer Timer1 
  26.       Interval        =   1
  27.       Left            =   8400
  28.       Top             =   4320
  29.    End
  30.    Begin VB.CommandButton Command4 
  31.       Caption         =   "Exit"
  32.       Height          =   375
  33.       Left            =   9240
  34.       TabIndex        =   12
  35.       Top             =   4320
  36.       Width           =   1335
  37.    End
  38.    Begin VB.Frame Frame3 
  39.       BackColor       =   &H00000000&
  40.       Caption         =   " Test Picture: "
  41.       BeginProperty Font 
  42.          Name            =   "Tahoma"
  43.          Size            =   8.25
  44.          Charset         =   238
  45.          Weight          =   400
  46.          Underline       =   0   'False
  47.          Italic          =   0   'False
  48.          Strikethrough   =   0   'False
  49.       EndProperty
  50.       ForeColor       =   &H00FFFFFF&
  51.       Height          =   1455
  52.       Left            =   5280
  53.       TabIndex        =   9
  54.       Top             =   3240
  55.       Width           =   1935
  56.       Begin VB.CommandButton Command3 
  57.          Caption         =   "Test Picture"
  58.          Height          =   735
  59.          Left            =   120
  60.          Style           =   1  'Graphical
  61.          TabIndex        =   10
  62.          Top             =   480
  63.          Width           =   1695
  64.       End
  65.    End
  66.    Begin VB.Frame Frame2 
  67.       BackColor       =   &H00000000&
  68.       Caption         =   " View Picture: "
  69.       BeginProperty Font 
  70.          Name            =   "Tahoma"
  71.          Size            =   8.25
  72.          Charset         =   238
  73.          Weight          =   400
  74.          Underline       =   0   'False
  75.          Italic          =   0   'False
  76.          Strikethrough   =   0   'False
  77.       EndProperty
  78.       ForeColor       =   &H00FFFFFF&
  79.       Height          =   3015
  80.       Left            =   5280
  81.       TabIndex        =   5
  82.       Top             =   120
  83.       Width           =   5295
  84.       Begin VB.CommandButton Command2 
  85.          Caption         =   "Copy"
  86.          Height          =   375
  87.          Left            =   1560
  88.          TabIndex        =   8
  89.          Top             =   2520
  90.          Width           =   1335
  91.       End
  92.       Begin VB.CheckBox Check1 
  93.          BackColor       =   &H00000000&
  94.          Caption         =   " Strech Picture "
  95.          BeginProperty Font 
  96.             Name            =   "Tahoma"
  97.             Size            =   8.25
  98.             Charset         =   238
  99.             Weight          =   400
  100.             Underline       =   0   'False
  101.             Italic          =   0   'False
  102.             Strikethrough   =   0   'False
  103.          EndProperty
  104.          ForeColor       =   &H00FFFFFF&
  105.          Height          =   255
  106.          Left            =   3120
  107.          TabIndex        =   7
  108.          Top             =   2520
  109.          Width           =   1455
  110.       End
  111.       Begin VB.CommandButton Command1 
  112.          Caption         =   "View"
  113.          Height          =   375
  114.          Left            =   120
  115.          TabIndex        =   6
  116.          Top             =   2520
  117.          Width           =   1335
  118.       End
  119.       Begin VB.Image Image1 
  120.          Height          =   2175
  121.          Left            =   120
  122.          Top             =   240
  123.          Width           =   5055
  124.       End
  125.    End
  126.    Begin VB.Frame Frame1 
  127.       BackColor       =   &H00000000&
  128.       Caption         =   " Chose File: "
  129.       BeginProperty Font 
  130.          Name            =   "Tahoma"
  131.          Size            =   8.25
  132.          Charset         =   238
  133.          Weight          =   400
  134.          Underline       =   0   'False
  135.          Italic          =   0   'False
  136.          Strikethrough   =   0   'False
  137.       EndProperty
  138.       ForeColor       =   &H00FFFFFF&
  139.       Height          =   4575
  140.       Left            =   120
  141.       TabIndex        =   0
  142.       Top             =   120
  143.       Width           =   5055
  144.       Begin VB.DriveListBox Drive2 
  145.          Height          =   315
  146.          Left            =   120
  147.          TabIndex        =   4
  148.          Top             =   240
  149.          Width           =   2295
  150.       End
  151.       Begin VB.DirListBox Dir2 
  152.          Height          =   3465
  153.          Left            =   120
  154.          TabIndex        =   3
  155.          Top             =   600
  156.          Width           =   2295
  157.       End
  158.       Begin VB.FileListBox File2 
  159.          Height          =   4185
  160.          Left            =   2520
  161.          Pattern         =   "*.bmp"
  162.          TabIndex        =   2
  163.          Top             =   240
  164.          Width           =   2415
  165.       End
  166.       Begin VB.ComboBox Combo2 
  167.          Height          =   315
  168.          ItemData        =   "MainForm.frx":030A
  169.          Left            =   120
  170.          List            =   "MainForm.frx":031A
  171.          Sorted          =   -1  'True
  172.          TabIndex        =   1
  173.          Text            =   "*.bmp"
  174.          Top             =   4080
  175.          Width           =   2295
  176.       End
  177.    End
  178.    Begin VB.Label Label1 
  179.       BackStyle       =   0  'Transparent
  180.       Caption         =   "This is program made by Armin Kalajdzija, if you have any questions about my program e-mail me: armin@logosoft.ba."
  181.       BeginProperty Font 
  182.          Name            =   "Tahoma"
  183.          Size            =   8.25
  184.          Charset         =   238
  185.          Weight          =   400
  186.          Underline       =   0   'False
  187.          Italic          =   0   'False
  188.          Strikethrough   =   0   'False
  189.       EndProperty
  190.       ForeColor       =   &H00FFFFFF&
  191.       Height          =   615
  192.       Left            =   7320
  193.       TabIndex        =   11
  194.       Top             =   3480
  195.       Width           =   3135
  196.    End
  197. Attribute VB_Name = "MainForm"
  198. Attribute VB_GlobalNameSpace = False
  199. Attribute VB_Creatable = False
  200. Attribute VB_PredeclaredId = True
  201. Attribute VB_Exposed = False
  202. Private Sub Check1_Click()
  203. If Check1.Value = 1 Then
  204. Image1.Stretch = True
  205. End If
  206. If Check1.Value = 0 Then
  207. Image1.Stretch = False
  208. End If
  209. End Sub
  210. Private Sub Command1_Click()
  211. View.Show 1
  212. End Sub
  213. Private Sub Command2_Click()
  214. CommonDialog1.ShowSave
  215. FileCopy Dir2.Path + "\" + File2.FileName, CommonDialog1.FileName
  216. End Sub
  217. Private Sub Command4_Click()
  218. End Sub
  219. Private Sub Command5_Click()
  220. End Sub
  221. Private Sub Dir2_Change()
  222. File2.Path = Dir2.Path
  223. End Sub
  224. Private Sub Drive2_Change()
  225. Dir2.Path = Drive2.Drive
  226. End Sub
  227. Private Sub File2_Click()
  228. Image1.Picture = LoadPicture(Dir2.Path + "\" + File2.FileName)
  229. Command3.Picture = LoadPicture(Dir2.Path + "\" + File2.FileName)
  230. End Sub
  231. Private Sub Form_Load()
  232. Drive2.Drive = "c:"
  233. Dir2.Path = "c:\"
  234. File2.Path = "c:\"
  235. End Sub
  236. Private Sub Timer1_Timer()
  237. If Combo2.Text = "*.bmp" Then
  238. File2.Pattern = "*.bmp"
  239. End If
  240. If Combo2.Text = "*.jpg" Then
  241. File2.Pattern = "*.jpg"
  242. End If
  243. If Combo2.Text = "*.gif" Then
  244. File2.Pattern = "*.gif"
  245. End If
  246. If Combo2.Text = "*.ico" Then
  247. File2.Pattern = "*.ico"
  248. End If
  249. CommonDialog1.Filter = File2.Pattern
  250. CommonDialog1.FileName = File2.Pattern
  251. If Image1.Visible = False Then
  252. Command3.Enabled = False
  253. Command2.Enabled = False
  254. Command1.Enabled = False
  255. Check1.Enabled = False
  256. Command3.Enabled = True
  257. Command2.Enabled = True
  258. Command1.Enabled = True
  259. Check1.Enabled = True
  260. End If
  261. If Image1.Width <> 5055 Then
  262. Image1.Width = 5055
  263. End If
  264. If Image1.Height <> 2175 Then
  265. Image1.Height = 2175
  266. End If
  267. If File2.ListCount = 0 Then
  268. Image1.Picture = LoadPicture("")
  269. Command3.Picture = LoadPicture("")
  270. End If
  271. End Sub
  272.