3.БегСтрока
VERSION 5.00
Begin VB.Form Форма1
BorderStyle = 3 'Fixed Dialog
Caption = "Пошаговая строка"
ClientHeight = 1590
ClientLeft = 2145
ClientTop = 1830
ClientWidth = 5970
LinkTopic = "Форма1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1590
ScaleWidth = 5970
ShowInTaskbar = 0 'False
Begin VB.CommandButton Комманда1
Caption = "Go!"
Height = 375
Left = 3240
TabIndex = 2
Top = 120
Width = 1575
End
Begin VB.TextBox t1
Height = 285
Left = 120
TabIndex = 1
Text = "ВНИМАНИЕ"
Top = 120
Width = 3015
End
Begin VB.Timer timer1
Interval = 100
Left = 2640
Top = 960
End
Begin VB.Label statusbar
Height = 675
Left = 120
TabIndex = 0
Top = 600
Width = 5805
End
End
Attribute VB_Name = "Форма1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Type snaplab
label As String
End Type
Private mega As snaplab
Public Sub go1(lab)
statusbar.Caption = ""
mega.label = lab
timer1.Enabled = -1
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub t1__KeyPress(KeyAscii As Integer)
With t1
If Len(.Text) = "" Then .Text = "": Exit Sub
If Len(.Text) = mega.label Then
.RemoveItem mega.label
End If
End Sub
Private Sub timer1_Timer()
a1 = Len(mega.label)
a2 = Len(statusbar.Caption)
If a1 = a2 Then
timer1.Enabled = False
Exit Sub
End If
a3 = Left(mega.label, a2 + 1)
statusbar.Caption = a3
End Sub
Private Sub Комманда1_Click()
go1 t1.Text
End Sub
3.Настройки
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form пфCommonDialog
BorderStyle = 1 'Fixed Single
Caption = "Все Методы CommonDialog"
ClientHeight = 4755
ClientLeft = 1800
ClientTop = 1935
ClientWidth = 3570
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4755
ScaleWidth = 3570
Begin MSComDlg.CommonDialog одПоказать
Left = 2460
Top = 150
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.OptionButton авМетодCommonDialog
Caption = "ShowOpen"
Height = 405
Index = 0
Left = 120
TabIndex = 1
Top = 600
Width = 1725
End
Begin VB.CommandButton кнПоказать
Caption = "Показать CommonDialog"
Height = 435
Left = 120
TabIndex = 0
Top = 90
Width = 2145
End
End
Attribute VB_Name = "пфCommonDialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Dim i%, всеМетоды
всеМетоды = Array("ShowSave", "ShowColor", "ShowFont", "ShowPrinter", "ShowHelp")
For i = 1 To 5 ' Добавляем ещё пять кнопок выбора методов CommonDialog
Load авМетодCommonDialog(i)
авМетодCommonDialog(i).Top = авМетодCommonDialog(i - 1).Top + 350
авМетодCommonDialog(i).Visible = True
авМетодCommonDialog(i).Caption = всеМетоды(i - 1)
Next i
With авМетодCommonDialog(авМетодCommonDialog.Count - 1)
Me.Height = .Top + 1.3 * .Height + Height - ScaleHeight
End With
End Sub
Private Sub кнПоказать_Click()
Select Case True
Case авМетодCommonDialog(0).Value
With одПоказать
.DialogTitle = "Выбери файл ""Фирма.mdb"""
.ShowOpen
End With
Case авМетодCommonDialog(1).Value
одПоказать.ShowSave
Case авМетодCommonDialog(2).Value
одПоказать.ShowColor
Case авМетодCommonDialog(3).Value
одПоказать.Flags = cdlCFBoth ' Должно быть установлено свойство Flags
одПоказать.ShowFont
Case авМетодCommonDialog(4).Value
одПоказать.ShowPrinter
Case авМетодCommonDialog(5).Value
одПоказать.ShowHelp
Case Else
MsgBox "Метод не выбран !"
End Select
End Sub