home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD1103910292000.psc / frmMain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-10-29  |  3.9 KB  |  106 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "PowerPoint demo"
  5.    ClientHeight    =   4980
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4725
  9.    Icon            =   "FRMMAIN.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   4980
  14.    ScaleWidth      =   4725
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin VB.Frame Frame2 
  17.       Caption         =   "Player"
  18.       Height          =   3375
  19.       Left            =   0
  20.       TabIndex        =   1
  21.       Top             =   0
  22.       Width           =   4695
  23.       Begin VB.OLE OLE1 
  24.          Appearance      =   0  'Flat
  25.          AutoActivate    =   3  'Automatic
  26.          BackStyle       =   0  'Transparent
  27.          Class           =   "PowerPoint.Show.8"
  28.          Height          =   3015
  29.          Left            =   120
  30.          OleObjectBlob   =   "FRMMAIN.frx":000C
  31.          SizeMode        =   1  'Stretch
  32.          SourceDoc       =   "C:\Squash Productions\PSC Demos\PowerPoint\example1.ppt"
  33.          TabIndex        =   2
  34.          Top             =   240
  35.          Width           =   4455
  36.       End
  37.    End
  38.    Begin VB.Frame Frame1 
  39.       Caption         =   "Menu"
  40.       Height          =   975
  41.       Left            =   0
  42.       TabIndex        =   0
  43.       Top             =   3600
  44.       Width           =   4695
  45.       Begin VB.CommandButton cmdOpen 
  46.          Caption         =   "&Open"
  47.          Height          =   495
  48.          Left            =   120
  49.          TabIndex        =   4
  50.          Top             =   360
  51.          Width           =   1695
  52.       End
  53.       Begin VB.CommandButton cmdOptions 
  54.          Caption         =   "&Options"
  55.          Height          =   495
  56.          Left            =   2760
  57.          TabIndex        =   3
  58.          Top             =   360
  59.          Width           =   1695
  60.       End
  61.    End
  62.    Begin VB.Label lblText 
  63.       BackStyle       =   0  'Transparent
  64.       Caption         =   "Doble click the file to view it."
  65.       Height          =   255
  66.       Left            =   1320
  67.       TabIndex        =   5
  68.       Top             =   4680
  69.       Width           =   2295
  70.    End
  71. Attribute VB_Name = "frmMain"
  72. Attribute VB_GlobalNameSpace = False
  73. Attribute VB_Creatable = False
  74. Attribute VB_PredeclaredId = True
  75. Attribute VB_Exposed = False
  76. '*****************************************************
  77. '*                   PowerPoint Viewer!              *
  78. '*  Hi, this is an example will show you how to view *
  79. '* powerpoint files inside your VB projects.         *
  80. '* It requires you have PowerPoint installed tho     *
  81. '* it is commented but if you need any help contact  *
  82. '* me.                                               *
  83. '* Thanks a lot, hope this helps. please vote!       *
  84. '* Contact me if you have any trouble:               *
  85. '*                                                   *
  86. '* Email: Squash@cv.cl                               *
  87. '* web site:  http://www.SquashProductions.com       *
  88. '*****************************************************
  89. Private Sub cmdOpen_Click()
  90. On Error Resume Next ' In case of error
  91. Dim sOpen As SelectedFile
  92. FileDialog.sInitDir = OptDefPath
  93. FileDialog.flags = OFN_EXPLORER Or OFN_LONGNAMES Or OFN_HIDEREADONLY Or OFN_ALLOWMULTISELECT ' options
  94. FileDialog.sDlgTitle = "Open PowerPoint file" ' title
  95. FileDialog.sFilter = "PowerPoint file (*.ppt)" & Chr$(0) & "*.ppt" ' filter
  96.      sOpen = ShowOpen(Me.hWnd) ' show open menu
  97.   Screen.MousePointer = 11 ' make mouse icon hour glass
  98.         OLE1.CreateLink FileDialog.sFileTitle ' show the selected file
  99. Screen.MousePointer = 0 ' make mouse icon normal
  100. End Sub
  101. Private Sub cmdOptions_Click()
  102. frmOptions.Show ' show the option form
  103. End Sub
  104. Private Sub Form_Unload(Cancel As Integer)
  105. End Sub
  106.