home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form w_dialogue_demo
- BorderStyle = 3 'Fixed Dialog
- Caption = "Common Dialogue Controls Demo"
- ClientHeight = 4965
- ClientLeft = 1230
- ClientTop = 2235
- ClientWidth = 7605
- Height = 5370
- Icon = "ct_dialg.frx":0000
- Left = 1170
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 4965
- ScaleWidth = 7605
- ShowInTaskbar = 0 'False
- Top = 1890
- Width = 7725
- Begin VB.CommandButton Command2
- Caption = "Dialogue"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 555
- Left = 6300
- TabIndex = 2
- Top = 3360
- Width = 1155
- End
- Begin VB.CommandButton Command1
- Caption = "E&xit"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 555
- Left = 6300
- TabIndex = 1
- Top = 4140
- Width = 1155
- End
- Begin FoldLib.ctFold ctFold
- Height = 3735
- Left = 360
- TabIndex = 0
- Top = 960
- Width = 5715
- _version = 65536
- _extentx = 10081
- _extenty = 6588
- _stockprops = 70
- caption = "Color;Font;File"
- BeginProperty selectedfont {FB8F0823-0164-101B-84ED-08002B2EC713}
- name = "MS Sans Serif"
- charset = 1
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- backcolor = 12632256
- picsequence = "1,2,3"
- backsequence = ""
- textsequence = ""
- disablesequence = ""
- picture = "ct_dialg.frx":030A
- picposition = 3
- piccols = 3
- tabheight = 40
- amount = 3
- Begin FrameLibCtl.ctFrame ctFrame3
- Height = 2715
- Left = 240
- TabIndex = 13
- Top = 840
- Visible = 0 'False
- Width = 5235
- _version = 65536
- _extentx = 9234
- _extenty = 4789
- _stockprops = 32
- outerborder = 5
- backcolor = 12632256
- bordercolor = 8421504
- Begin VB.TextBox file_yText
- Height = 315
- Left = 1080
- TabIndex = 39
- Text = "-1"
- Top = 2280
- Width = 555
- End
- Begin VB.TextBox file_xText
- Height = 315
- Left = 1080
- TabIndex = 38
- Text = "-1"
- Top = 1920
- Width = 555
- End
- Begin VB.TextBox sle_title
- Height = 315
- Left = 2460
- TabIndex = 37
- Top = 960
- Width = 2595
- End
- Begin VB.CheckBox chk_FileHelp
- Caption = "Show Help"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 240
- TabIndex = 33
- Top = 1560
- Width = 1635
- End
- Begin VB.Frame Frame1
- Caption = "File Dialogue"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 675
- Left = 240
- TabIndex = 15
- Top = 720
- Width = 1935
- Begin VB.OptionButton rad_save
- Caption = "Save"
- Height = 315
- Left = 1020
- TabIndex = 17
- Top = 240
- Width = 795
- End
- Begin VB.OptionButton rad_open
- Caption = "Open"
- Height = 315
- Left = 120
- TabIndex = 16
- Top = 240
- Value = -1 'True
- Width = 795
- End
- End
- Begin VB.Label sle_directory
- BorderStyle = 1 'Fixed Single
- Height = 315
- Left = 2460
- TabIndex = 43
- Top = 2280
- Width = 2595
- End
- Begin VB.Label sle_file
- BorderStyle = 1 'Fixed Single
- Height = 315
- Left = 2460
- TabIndex = 42
- Top = 1620
- Width = 2595
- End
- Begin VB.Label Label16
- Caption = "Directory"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2460
- TabIndex = 41
- Top = 2040
- Width = 2415
- End
- Begin VB.Label Label15
- Caption = "File Title"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2460
- TabIndex = 40
- Top = 1380
- Width = 2115
- End
- Begin FileLib.ctFile ctFile
- Left = 4680
- Top = 180
- _version = 65536
- _extentx = 740
- _extenty = 740
- _stockprops = 64
- action = 0
- End
- Begin VB.Label Label14
- Caption = "Dialogue Title"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2460
- TabIndex = 36
- Top = 720
- Width = 2235
- End
- Begin VB.Label Label13
- Caption = "Y Posn :"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 240
- TabIndex = 35
- Top = 2280
- Width = 855
- End
- Begin VB.Label Label12
- Caption = "X Posn :"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 240
- TabIndex = 34
- Top = 1920
- Width = 855
- End
- Begin VB.Label Label6
- Caption = "ctFile : File Dialogue"
- BeginProperty Font
- name = "Times New Roman"
- charset = 0
- weight = 700
- size = 18
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00800000&
- Height = 435
- Left = 240
- TabIndex = 14
- Top = 240
- Width = 3735
- End
- End
- Begin FrameLibCtl.ctFrame ctFrame1
- Height = 2715
- Left = 240
- TabIndex = 4
- Top = 840
- Width = 5235
- _version = 65536
- _extentx = 9234
- _extenty = 4789
- _stockprops = 32
- outerborder = 5
- backcolor = 12632256
- bordercolor = 8421504
- Begin VB.TextBox color_yText
- Alignment = 2 'Center
- Height = 315
- Left = 1080
- TabIndex = 12
- Text = "-1"
- Top = 2280
- Width = 555
- End
- Begin VB.TextBox color_xText
- Alignment = 2 'Center
- Height = 315
- Left = 1080
- TabIndex = 11
- Text = "-1"
- Top = 1860
- Width = 555
- End
- Begin VB.CheckBox chk_help
- Caption = "Show Help"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 240
- TabIndex = 8
- Top = 1380
- Width = 1635
- End
- Begin VB.ComboBox cmb_color
- Height = 315
- Left = 240
- Style = 2 'Dropdown List
- TabIndex = 6
- Top = 840
- Width = 2295
- End
- Begin VB.Label Label5
- Caption = "Y Posn :"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 240
- TabIndex = 10
- Top = 2220
- Width = 795
- End
- Begin VB.Label Label4
- Caption = "X Posn :"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 240
- TabIndex = 9
- Top = 1860
- Width = 795
- End
- Begin VB.Label Label3
- Alignment = 2 'Center
- Caption = "Current Color"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 555
- Left = 3540
- TabIndex = 7
- Top = 1920
- Width = 975
- End
- Begin ColorLib.ctColor ctColor1
- Left = 4620
- Top = 240
- _version = 65536
- _extentx = 740
- _extenty = 740
- _stockprops = 64
- action = 0
- End
- Begin VB.Shape r_color
- FillColor = &H00FF0000&
- FillStyle = 0 'Solid
- Height = 855
- Left = 3540
- Top = 1020
- Width = 975
- End
- Begin VB.Label Label2
- Caption = "ctColor : Color Dialogue"
- BeginProperty Font
- name = "Times New Roman"
- charset = 0
- weight = 700
- size = 18
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00800000&
- Height = 435
- Left = 180
- TabIndex = 5
- Top = 240
- Width = 3975
- End
- End
- Begin FrameLibCtl.ctFrame ctFrame2
- Height = 2715
- Left = 240
- TabIndex = 18
- Top = 840
- Visible = 0 'False
- Width = 5235
- _version = 65536
- _extentx = 9234
- _extenty = 4789
- _stockprops = 32
- outerborder = 5
- backcolor = 12632256
- bordercolor = 8421504
- Begin VB.CheckBox chk_underline
- Caption = "Font Underline"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3060
- TabIndex = 32
- Top = 2160
- Width = 1755
- End
- Begin VB.CheckBox chk_strike
- Caption = "Font StrikeOut"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3060
- TabIndex = 31
- Top = 1860
- Width = 1875
- End
- Begin VB.CheckBox chk_italic
- Caption = "Font Italic"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3060
- TabIndex = 30
- Top = 1560
- Width = 1755
- End
- Begin VB.CheckBox chk_bold
- Caption = "Font Bold"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3060
- TabIndex = 29
- Top = 1260
- Value = 1 'Checked
- Width = 1575
- End
- Begin VB.TextBox font_yText
- Height = 315
- Left = 1080
- TabIndex = 28
- Text = "-1"
- Top = 2280
- Width = 555
- End
- Begin VB.TextBox font_xText
- Height = 315
- Left = 1080
- TabIndex = 27
- Text = "-1"
- Top = 1860
- Width = 555
- End
- Begin VB.CheckBox chk_FontHelp
- Caption = "Show Help"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 180
- TabIndex = 24
- Top = 1500
- Width = 1275
- End
- Begin VB.TextBox lbl_FontSize
- Height = 315
- Left = 1320
- TabIndex = 23
- Text = "10"
- Top = 1140
- Width = 495
- End
- Begin VB.TextBox lbl_FontName
- Height = 315
- Left = 1320
- TabIndex = 22
- Text = "System"
- Top = 720
- Width = 3015
- End
- Begin FontLib.ctFont ctFont
- Left = 4620
- Top = 180
- _version = 65536
- _extentx = 740
- _extenty = 740
- _stockprops = 64
- action = 0
- End
- Begin VB.Label Label11
- Caption = "Y Posn :"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 180
- TabIndex = 26
- Top = 2280
- Width = 795
- End
- Begin VB.Label Label10
- Caption = "X Posn :"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 180
- TabIndex = 25
- Top = 1920
- Width = 795
- End
- Begin VB.Label Label9
- Caption = "Font Size :"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 180
- TabIndex = 21
- Top = 1140
- Width = 1095
- End
- Begin VB.Label Label8
- Caption = "Font Name :"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 180
- TabIndex = 20
- Top = 720
- Width = 1095
- End
- Begin VB.Label Label7
- Caption = "ctFont : Font Dialogue"
- BeginProperty Font
- name = "Times New Roman"
- charset = 0
- weight = 700
- size = 18
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00800000&
- Height = 495
- Left = 240
- TabIndex = 19
- Top = 240
- Width = 3615
- End
- End
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = $"ct_dialg.frx":1EEC
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00800000&
- Height = 555
- Left = 180
- TabIndex = 3
- Top = 180
- Width = 7095
- End
- Attribute VB_Name = "w_dialogue_demo"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Unload w_dialogue_demo
- End Sub
- Private Sub Command2_Click()
- Dim nTemp As Integer
- If ctFold.SelectedTab = 1 Then
- ctColor1.Color = r_color.FillColor
- ctColor1.ShowHelp = chk_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.Show
- ElseIf ctFold.SelectedTab = 2 Then
- ctFont.TextColor = r_color.FillColor
- ctFont.ShowHelp = chk_FontHelp.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.Show
-
- ElseIf ctFold.SelectedTab = 3 Then
- ctFile.ShowHelp = chk_FileHelp.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.ShowOpen
- Else
- 'ctFile.ShowSave
- End If
- End If
- End Sub
- Private Sub ctColor1_Help()
- a = MsgBox("I have no help at this time", vbExclamation, "ctColor Help")
- End Sub
- Private Sub ctColor1_OK()
- r_color.FillColor = ctColor1.Color
- End Sub
- Private Sub ctFile_Help()
- a = MsgBox("I have no help at this time", vbExclamation, "ctFile Help")
- End Sub
- Private Sub ctFile_OK()
- sle_directory.Caption = ctFile.Directory
- sle_file.Caption = ctFile.FileTitle
- End Sub
- Private Sub ctFold_TabChange(nNewTab As Integer, nOldTab As Integer)
- If nNewTab = 1 Then
- ctFrame1.Visible = True
- ctFrame2.Visible = False
- ctFrame3.Visible = False
- ElseIf nNewTab = 2 Then
- ctFrame2.Visible = True
- ctFrame1.Visible = False
- ctFrame3.Visible = False
- ElseIf nNewTab = 3 Then
- ctFrame3.Visible = True
- ctFrame1.Visible = False
- ctFrame2.Visible = False
- End If
- End Sub
- Private Sub ctFont_Help()
- a = MsgBox("I have no help at this time", vbExclamation, "ctFont Help")
- End Sub
- Private Sub ctFont_OK()
- r_color.FillColor = ctFont.TextColor
- If (ctFont.FontBold = True) Then
- chk_bold.Value = 1
- Else
- chk_bold.Value = 0
- End If
- If (ctFont.FontItalic = True) Then
- chk_italic.Value = 1
- Else
- chk_italic.Value = 0
- End If
- If (ctFont.FontStrikeOut = True) Then
- chk_strike.Value = 1
- Else
- chk_strike.Value = 0
- End If
- If (ctFont.FontUnderline = True) Then
- chk_underline.Value = 1
- Else
- chk_underline.Value = 0
- End If
- lbl_FontName.Text = ctFont.FontName
- lbl_FontSize.Text = Str$(ctFont.FontSize)
- End Sub
- Private Sub Form_Load()
- ' Center the window on the screen
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) * 0.25
- cmb_color.AddItem "0 - Regular"
- cmb_color.AddItem "1 - Prevent Full Open"
- cmb_color.AddItem "2 - Full Open"
- cmb_color.ListIndex = 0
- End Sub
- Private Sub Text1_Change()
- End Sub
-