home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form w_common_dialog
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Common Dialogues Demo"
- ClientHeight = 4665
- ClientLeft = 555
- ClientTop = 1590
- ClientWidth = 8130
- Height = 5190
- Icon = CT_DIALG.FRX:0000
- Left = 495
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MDIChild = -1 'True
- ScaleHeight = 4665
- ScaleWidth = 8130
- Top = 1125
- Width = 8250
- Begin CommandButton Command1
- Caption = "Dialogue"
- Height = 375
- Left = 6900
- TabIndex = 4
- Top = 3420
- Width = 975
- End
- Begin CommandButton btn_exit
- Caption = "E&xit"
- Height = 375
- Left = 6900
- TabIndex = 1
- Top = 4020
- Width = 975
- End
- Begin ctFOLD ctFold
- Amount = 3
- BackColor = &H00C0C0C0&
- BackSequence = ""
- Caption = "Colors;Fonts;Files"
- CustomColor1 = &H00FFFFFF&
- CustomColor2 = &H00FFFFFF&
- CustomColor3 = &H00FFFFFF&
- CustomColor4 = &H00FFFFFF&
- CustomColor5 = &H00FFFFFF&
- DisableColor = &H00808080&
- DisableSequence = ""
- FixedSize = 0 'False
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 3855
- Left = 360
- LevelOffset = 20
- Levels = 1
- PicCols = 3
- PicPosition = 3 'Left
- PicRows = 1
- PicSequence = "1,2,3"
- Picture = CT_DIALG.FRX:0302
- PicXOffset = 0
- PicYOffset = 0
- SelectedFontBold= -1 'True
- SelectedFontItalic= 0 'False
- SelectedFontStrikeOut= 0 'False
- SelectedFontUnderline= 0 'False
- SelectedTab = 1
- TabBorder = 1 'Raised
- TabColor = &H00C0C0C0&
- TabHeight = 45
- TabIndex = 0
- TabLine = 0 'False
- TabSide = 0 'Top
- TabWidth = 30
- TextColor = &H00000000&
- TextSequence = ""
- TextXOffset = 0
- TextYOffset = 0
- Top = 600
- UnTabColor = &H00C0C0C0&
- UnTextColor = &H00000000&
- Width = 6195
- Begin ctFRAME frm_dlg
- BackColor = &H00C0C0C0&
- BorderColor = &H00000000&
- DistanceApart = 5
- Height = 2595
- Index = 0
- InnerBorder = 1 'None
- InnerWidth = 1
- Left = 240
- OuterBorder = 0 'Regular
- OuterWidth = 1
- ShadowColor = &H00808080&
- ShowBottom = -1 'True
- ShowLeft = -1 'True
- ShowRight = -1 'True
- ShowTop = -1 'True
- TabIndex = 2
- Top = 1020
- Width = 5655
- Begin TextBox color_yText
- Height = 315
- Left = 1140
- TabIndex = 11
- Text = "-1"
- Top = 2160
- Width = 555
- End
- Begin TextBox color_xText
- Height = 315
- Left = 1140
- TabIndex = 10
- Text = "-1"
- Top = 1800
- Width = 555
- End
- Begin ctCHECK ctColor_Help
- Alignment = 0 'Left Justify
- BackColor = &H00C0C0C0&
- Caption = "Show Help"
- DisableColor = &H00808080&
- ForeColor = &H00000000&
- Height = 255
- Left = 240
- PicStyle = 1 'Style #1
- ShowFocus = -1 'True
- TabIndex = 7
- Top = 1380
- Value = 0 'False
- Width = 1575
- End
- Begin ComboBox cmb_color
- Height = 300
- Left = 240
- Style = 2 'Dropdown List
- TabIndex = 5
- Top = 840
- Width = 2235
- End
- Begin ctCOLOR ctColor1
- Action = 0
- BackColor = &H00FFFFFF&
- Color = &H00FFFFFF&
- CustomColor1 = &H00FFFFFF&
- CustomColor10 = &H00FFFFFF&
- CustomColor11 = &H00FFFFFF&
- CustomColor12 = &H00FFFFFF&
- CustomColor13 = &H00FFFFFF&
- CustomColor14 = &H00FFFFFF&
- CustomColor15 = &H00FFFFFF&
- CustomColor16 = &H00FFFFFF&
- CustomColor2 = &H00FFFFFF&
- CustomColor3 = &H00FFFFFF&
- CustomColor4 = &H00FFFFFF&
- CustomColor5 = &H00FFFFFF&
- CustomColor6 = &H00FFFFFF&
- CustomColor7 = &H00FFFFFF&
- CustomColor8 = &H00FFFFFF&
- CustomColor9 = &H00FFFFFF&
- DialogueLeft = -1
- DialogueTop = -1
- Flags = 0 'Regular
- Left = 5040
- ShowHelp = 0 'False
- Top = 120
- End
- Begin Label Label3
- BackColor = &H00C0C0C0&
- Caption = "Y Posn :"
- Height = 255
- Left = 240
- TabIndex = 9
- Top = 2160
- Width = 795
- End
- Begin Label Label2
- BackColor = &H00C0C0C0&
- Caption = "X Posn :"
- Height = 255
- Left = 240
- TabIndex = 8
- Top = 1800
- Width = 795
- End
- Begin Label Label1
- Alignment = 2 'Center
- BackColor = &H00C0C0C0&
- Caption = "Current Color"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 3960
- TabIndex = 6
- Top = 1920
- Width = 915
- End
- Begin Shape r_color
- BackColor = &H00800000&
- BackStyle = 1 'Opaque
- Height = 915
- Left = 3900
- Top = 900
- Width = 975
- End
- Begin Label ct
- BackColor = &H00C0C0C0&
- Caption = "ctCOLOR Common Dialogue"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Times New Roman"
- FontSize = 18
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 435
- Left = 180
- TabIndex = 3
- Top = 180
- Width = 4635
- End
- End
- Begin ctFRAME frm_dlg
- BackColor = &H00C0C0C0&
- BorderColor = &H00000000&
- DistanceApart = 5
- Height = 2595
- Index = 2
- InnerBorder = 1 'None
- InnerWidth = 1
- Left = 240
- OuterBorder = 0 'Regular
- OuterWidth = 1
- ShadowColor = &H00808080&
- ShowBottom = -1 'True
- ShowLeft = -1 'True
- ShowRight = -1 'True
- ShowTop = -1 'True
- TabIndex = 28
- Top = 1020
- Width = 5655
- Begin TextBox sle_title
- Height = 285
- Left = 2700
- TabIndex = 41
- Top = 900
- Width = 2595
- End
- Begin ctFILE ctFile
- Action = 0
- AllowMultiSelect= 0 'False
- BackColor = &H00FFFFFF&
- DialogueLeft = -1
- DialogueTop = -1
- Directory = ""
- DlgTitle = ""
- File = "*.*"
- FileTitle = "*.*"
- Filter = ""
- HideReadOnly = 0 'False
- Left = 5040
- OverWritePrompt = 0 'False
- ShowHelp = 0 'False
- Top = 120
- End
- Begin Frame Frame1
- BackColor = &H00C0C0C0&
- Caption = "Dialogue Type"
- Height = 675
- Left = 300
- TabIndex = 35
- Top = 600
- Width = 1815
- Begin ctRADIO rad_save
- Alignment = 0 'Left Justify
- BackColor = &H00C0C0C0&
- Caption = "Save"
- DisableColor = &H00808080&
- ForeColor = &H00000000&
- Height = 255
- Left = 960
- PicStyle = 2 'Style #2
- ShowFocus = -1 'True
- TabIndex = 37
- Top = 300
- Value = 0 'False
- Width = 795
- End
- Begin ctRADIO rad_open
- Alignment = 0 'Left Justify
- BackColor = &H00C0C0C0&
- Caption = "Open"
- DisableColor = &H00808080&
- ForeColor = &H00000000&
- Height = 255
- Left = 120
- PicStyle = 2 'Style #2
- ShowFocus = -1 'True
- TabIndex = 36
- Top = 300
- Value = -1 'True
- Width = 735
- End
- End
- Begin TextBox file_yText
- Height = 315
- Left = 1140
- TabIndex = 34
- Text = "-1"
- Top = 2160
- Width = 555
- End
- Begin TextBox file_xText
- Height = 315
- Left = 1140
- TabIndex = 33
- Text = "-1"
- Top = 1800
- Width = 555
- End
- Begin ctCHECK ctFile_Help
- Alignment = 0 'Left Justify
- BackColor = &H00C0C0C0&
- Caption = "Show Help"
- DisableColor = &H00808080&
- ForeColor = &H00000000&
- Height = 315
- Left = 300
- PicStyle = 1 'Style #1
- ShowFocus = -1 'True
- TabIndex = 30
- Top = 1380
- Value = 0 'False
- Width = 1395
- End
- Begin Label sle_directory
- BorderStyle = 1 'Fixed Single
- Height = 255
- Left = 2700
- TabIndex = 43
- Top = 2100
- Width = 2655
- End
- Begin Label sle_file
- BorderStyle = 1 'Fixed Single
- Height = 255
- Left = 2700
- TabIndex = 42
- Top = 1500
- Width = 2595
- End
- Begin Label Label15
- BackColor = &H00C0C0C0&
- Caption = "Directory :"
- Height = 255
- Left = 2700
- TabIndex = 40
- Top = 1860
- Width = 975
- End
- Begin Label Label14
- BackColor = &H00C0C0C0&
- Caption = "File Title :"
- Height = 255
- Left = 2700
- TabIndex = 39
- Top = 1260
- Width = 975
- End
- Begin Label Label13
- BackColor = &H00C0C0C0&
- Caption = "Dialogue Title :"
- Height = 255
- Left = 2700
- TabIndex = 38
- Top = 660
- Width = 1395
- End
- Begin Label Label12
- BackColor = &H00C0C0C0&
- Caption = "Y Posn :"
- Height = 255
- Left = 300
- TabIndex = 32
- Top = 2160
- Width = 795
- End
- Begin Label Label11
- BackColor = &H00C0C0C0&
- Caption = "X Posn :"
- Height = 255
- Left = 300
- TabIndex = 31
- Top = 1800
- Width = 795
- End
- Begin Label Label10
- BackColor = &H00C0C0C0&
- Caption = "ctFILE Common Dialogue"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Times New Roman"
- FontSize = 18
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 435
- Left = 240
- TabIndex = 29
- Top = 180
- Width = 4215
- End
- End
- Begin ctFRAME frm_dlg
- BackColor = &H00C0C0C0&
- BorderColor = &H00000000&
- DistanceApart = 5
- Height = 2595
- Index = 1
- InnerBorder = 1 'None
- InnerWidth = 1
- Left = 240
- OuterBorder = 0 'Regular
- OuterWidth = 1
- ShadowColor = &H00808080&
- ShowBottom = -1 'True
- ShowLeft = -1 'True
- ShowRight = -1 'True
- ShowTop = -1 'True
- TabIndex = 12
- Top = 1020
- Width = 5655
- Begin TextBox lbl_fontsize
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 285
- Left = 1440
- TabIndex = 22
- Text = "10"
- Top = 1020
- Width = 555
- End
- Begin TextBox lbl_fontname
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 285
- Left = 1440
- TabIndex = 23
- Text = "System"
- Top = 660
- Width = 3075
- End
- Begin ctCHECK chk_underline
- Alignment = 0 'Left Justify
- BackColor = &H00C0C0C0&
- Caption = "Font Underline"
- DisableColor = &H00808080&
- ForeColor = &H00000000&
- Height = 255
- Left = 3120
- PicStyle = 1 'Style #1
- ShowFocus = -1 'True
- TabIndex = 27
- Top = 2160
- Value = 0 'False
- Width = 1695
- End
- Begin ctCHECK chk_strike
- Alignment = 0 'Left Justify
- BackColor = &H00C0C0C0&
- Caption = "Font StrikeOut"
- DisableColor = &H00808080&
- ForeColor = &H00000000&
- Height = 255
- Left = 3120
- PicStyle = 1 'Style #1
- ShowFocus = -1 'True
- TabIndex = 26
- Top = 1860
- Value = 0 'False
- Width = 1815
- End
- Begin ctCHECK chk_italic
- Alignment = 0 'Left Justify
- BackColor = &H00C0C0C0&
- Caption = "Font Italic"
- DisableColor = &H00808080&
- ForeColor = &H00000000&
- Height = 255
- Left = 3120
- PicStyle = 1 'Style #1
- ShowFocus = -1 'True
- TabIndex = 25
- Top = 1560
- Value = 0 'False
- Width = 1875
- End
- Begin ctCHECK chk_bold
- Alignment = 0 'Left Justify
- BackColor = &H00C0C0C0&
- Caption = "Font Bold"
- DisableColor = &H00808080&
- ForeColor = &H00000000&
- Height = 255
- Left = 3120
- PicStyle = 1 'Style #1
- ShowFocus = -1 'True
- TabIndex = 24
- Top = 1260
- Value = -1 'True
- Width = 1755
- End
- Begin ctFONT ctFont
- Action = 0
- BackColor = &H00FFFFFF&
- DialogueLeft = -1
- DialogueTop = -1
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 10
- FontStrikeOut = 0 'False
- FontUnderline = 0 'False
- Left = 5100
- ShowHelp = 0 'False
- TextColor = &H00000000&
- Top = 120
- End
- Begin TextBox font_yText
- Height = 315
- Left = 1140
- TabIndex = 19
- Text = "-1"
- Top = 2160
- Width = 555
- End
- Begin TextBox font_xText
- Height = 315
- Left = 1140
- TabIndex = 18
- Text = "-1"
- Top = 1800
- Width = 555
- End
- Begin ctCHECK ctFont_Help
- Alignment = 0 'Left Justify
- BackColor = &H00C0C0C0&
- Caption = "Show Help"
- DisableColor = &H00808080&
- ForeColor = &H00000000&
- Height = 315
- Left = 300
- PicStyle = 1 'Style #1
- ShowFocus = -1 'True
- TabIndex = 15
- Top = 1380
- Value = 0 'False
- Width = 1335
- End
- Begin Label Label9
- BackColor = &H00C0C0C0&
- Caption = "Font Size :"
- Height = 255
- Left = 300
- TabIndex = 21
- Top = 1020
- Width = 1035
- End
- Begin Label Label8
- BackColor = &H00C0C0C0&
- Caption = "Font Name :"
- Height = 255
- Left = 300
- TabIndex = 20
- Top = 660
- Width = 1155
- End
- Begin Label Label7
- BackColor = &H00C0C0C0&
- Caption = "Y Posn :"
- Height = 255
- Left = 300
- TabIndex = 17
- Top = 2160
- Width = 735
- End
- Begin Label Label6
- BackColor = &H00C0C0C0&
- Caption = "X Posn :"
- Height = 255
- Left = 300
- TabIndex = 16
- Top = 1800
- Width = 735
- End
- Begin Label Label4
- BackColor = &H00C0C0C0&
- Caption = "ctFONT Common Dialogue"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Times New Roman"
- FontSize = 18
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 435
- Left = 180
- TabIndex = 13
- Top = 180
- Width = 4335
- End
- End
- End
- Begin Label Label5
- Alignment = 2 'Center
- BackColor = &H00C0C0C0&
- Caption = "The following demo displays some of the comon dialogue VBX controls"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 375
- Left = 420
- TabIndex = 14
- Top = 120
- Width = 7395
- End
- Sub btn_exit_Click ()
- Unload w_common_dialog
- End Sub
- Sub Command1_Click ()
- Dim nTemp As Integer
- If ctFold.SelectedTab = 1 Then
- ctColor1.Color = r_color.BackColor
- ctColor1.ShowHelp = ctColor_Help.Value
- ctColor1.Flags = cmb_color.ListIndex
- If color_xText = "-1" Then
- ctColor1.DialogueLeft = -1
- Else
- ctColor1.DialogueLeft = Int(color_xText)
- End If
- If color_yText = "-1" Then
- ctColor1.DialogueTop = -1
- Else
- ctColor1.DialogueTop = Int(color_yText)
- End If
- ctColor1.Action = 1
- ElseIf ctFold.SelectedTab = 2 Then
- ctFont.TextColor = r_color.BackColor
- ctFont.ShowHelp = ctFont_Help.Value
- ctFont.FontBold = chk_bold.Value
- ctFont.FontItalic = chk_italic.Value
- ctFont.FontStrikeOut = chk_strike.Value
- ctFont.FontUnderline = chk_underline.Value
- ctFont.FontName = lbl_FontName.Text
- nTemp = Int(lbl_FontSize.Text)
- If nTemp < 6 Then
- ctFont.FontSize = 10
- Else
- ctFont.FontSize = nTemp
- End If
- If font_xText = "-1" Then
- ctFont.DialogueLeft = -1
- Else
- ctFont.DialogueLeft = Int(font_xText)
- End If
- If font_yText = "-1" Then
- ctFont.DialogueTop = -1
- Else
- ctFont.DialogueTop = Int(font_yText)
- End If
- ctFont.Action = 1
- ElseIf ctFold.SelectedTab = 3 Then
- ctFile.ShowHelp = ctFile_Help.Value
- ctFile.DlgTitle = sle_title.Text
- If file_xText = "-1" Then
- ctFile.DialogueLeft = -1
- Else
- ctFile.DialogueLeft = Int(file_xText)
- End If
- If file_yText = "-1" Then
- ctFile.DialogueTop = -1
- Else
- ctFile.DialogueTop = Int(file_yText)
- End If
- If rad_open.Value = True Then
- ctFile.Action = 1
- Else
- ctFile.Action = 2
- End If
- End If
- End Sub
- Sub ctColor1_OK ()
- r_color.BackColor = ctColor1.Color
- End Sub
- Sub ctFile_OK ()
- sle_directory.Caption = ctFile.Directory
- sle_file.Caption = ctFile.FileTitle
- End Sub
- Sub ctFold_TabChange (nNewTab As Integer, nOldTab As Integer)
- If ctFold.SelectedTab = 1 Then
- frm_dlg(0).Visible = True
- frm_dlg(1).Visible = False
- frm_dlg(2).Visible = False
- ElseIf ctFold.SelectedTab = 2 Then
- frm_dlg(1).Visible = True
- frm_dlg(0).Visible = False
- frm_dlg(2).Visible = False
- ElseIf ctFold.SelectedTab = 3 Then
- frm_dlg(2).Visible = True
- frm_dlg(0).Visible = False
- frm_dlg(1).Visible = False
- End If
- End Sub
- Sub ctFold1_TabChange ()
- End Sub
- Sub ctFont_OK ()
- r_color.BackColor = ctFont.TextColor
- chk_bold.Value = ctFont.FontBold
- chk_italic.Value = ctFont.FontItalic
- chk_strike.Value = ctFont.FontStrikeOut
- chk_underline.Value = ctFont.FontUnderline
- lbl_FontName.Text = ctFont.FontName
- lbl_FontSize.Text = Str$(ctFont.FontSize)
- End Sub
- Sub Form_Load ()
- ' Center the window on the screen
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) * .25
- w_mdi_main.bt_color = BUTTON_DISABLE
- cmb_color.AddItem "0 Regular"
- cmb_color.AddItem "1 Prevent Full Open"
- cmb_color.AddItem "2 Full Open"
- cmb_color.ListIndex = 0
- End Sub
- Sub Form_Unload (Cancel As Integer)
- w_mdi_main.bt_color = BUTTON_UP
- End Sub
-