home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / source / chap21 / frm521.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-08-24  |  3.4 KB  |  112 lines

  1. VERSION 4.00
  2. Begin VB.Form frmdialog 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   6030
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1515
  7.    ClientWidth     =   6720
  8.    Height          =   6435
  9.    Left            =   1035
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   6030
  12.    ScaleWidth      =   6720
  13.    Top             =   1170
  14.    Width           =   6840
  15.    Begin VB.CommandButton cmdcolor 
  16.       Caption         =   "&Color"
  17.       Height          =   495
  18.       Left            =   120
  19.       TabIndex        =   5
  20.       Top             =   4260
  21.       Width           =   1215
  22.    End
  23.    Begin VB.CommandButton cmdhelp 
  24.       Caption         =   "&Help"
  25.       Height          =   495
  26.       Left            =   5400
  27.       TabIndex        =   4
  28.       Top             =   3660
  29.       Width           =   1215
  30.    End
  31.    Begin VB.CommandButton cmdprint 
  32.       Caption         =   "&Print"
  33.       Height          =   495
  34.       Left            =   4080
  35.       TabIndex        =   3
  36.       Top             =   3660
  37.       Width           =   1215
  38.    End
  39.    Begin VB.CommandButton cmdfonts 
  40.       Caption         =   "&Fonts"
  41.       Height          =   495
  42.       Left            =   2760
  43.       TabIndex        =   2
  44.       Top             =   3660
  45.       Width           =   1215
  46.    End
  47.    Begin VB.CommandButton Cmdsave 
  48.       Caption         =   "&Save As"
  49.       Height          =   495
  50.       Left            =   1440
  51.       TabIndex        =   1
  52.       Top             =   3660
  53.       Width           =   1215
  54.    End
  55.    Begin VB.CommandButton cmdopen 
  56.       Caption         =   "&File Open"
  57.       Height          =   495
  58.       Left            =   120
  59.       TabIndex        =   0
  60.       Top             =   3660
  61.       Width           =   1215
  62.    End
  63.    Begin MSComDlg.CommonDialog CommonDialog1 
  64.       Left            =   720
  65.       Top             =   420
  66.       _Version        =   65536
  67.       _ExtentX        =   847
  68.       _ExtentY        =   847
  69.       _StockProps     =   0
  70.    End
  71. Attribute VB_Name = "frmdialog"
  72. Attribute VB_Creatable = False
  73. Attribute VB_Exposed = False
  74. Option Explicit
  75. Private Sub cmdcolor_Click()
  76. CommonDialog1.DialogTitle = " Select A Color "
  77. CommonDialog1.Flags = &H2
  78. CommonDialog1.ShowColor
  79. MsgBox " The following Color has Been Selected " & CommonDialog1.Color
  80. End Sub
  81. Private Sub cmdfonts_Click()
  82. CommonDialog1.DialogTitle = " Select A Font "
  83. CommonDialog1.Flags = &H40000
  84. CommonDialog1.ShowFont
  85. End Sub
  86. Private Sub cmdhelp_Click()
  87. CommonDialog1.DialogTitle = " Select A Help Topic "
  88. CommonDialog1.HelpCommand = &H4
  89. CommonDialog1.ShowHelp
  90. End Sub
  91. Private Sub cmdopen_Click()
  92. CommonDialog1.DialogTitle = " Open A File "
  93. CommonDialog1.Filter = "*.*"
  94. CommonDialog1.filename = "*.*"
  95. CommonDialog1.ShowOpen
  96. MsgBox " You have selected " & CommonDialog1.filename & " As the file to Open "
  97. End Sub
  98. Private Sub cmdprint_Click()
  99. CommonDialog1.DialogTitle = " Select A Printer "
  100. CommonDialog1.Flags = &H100&
  101. CommonDialog1.ShowPrinter
  102. MsgBox " The Selected printer has the windows device handle of " & CommonDialog1.hDC
  103. End Sub
  104. Private Sub Cmdsave_Click()
  105. CommonDialog1.DialogTitle = " Save A File "
  106. CommonDialog1.Filter = "*.*"
  107. CommonDialog1.filename = "*.*"
  108. CommonDialog1.Flags = &H2&
  109. CommonDialog1.ShowSave
  110. MsgBox " You have selected " & CommonDialog1.filename & " As the file to Save to "
  111. End Sub
  112.