home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
3ctrls
/
indextab.frm
< prev
next >
Wrap
Text File
|
1994-07-01
|
32KB
|
859 lines
VERSION 2.00
Begin Form IndexTab
BackColor = &H00C0C0C0&
Caption = "Double click a tab with the right mouse"
ClientHeight = 6075
ClientLeft = 495
ClientTop = 705
ClientWidth = 7635
Height = 6540
Left = 405
LinkTopic = "Form2"
ScaleHeight = 6075
ScaleWidth = 7635
Top = 330
Width = 7815
Begin VideoSoftElastic ToolTip
BackColor = &H00C0C0C0&
BevelInner = 0 'None
BevelOuterWidth = 1
BorderWidth = 1
Caption = "ToolTip"
CaptionPos = 4 'Center Center
FloodColor = &H0080FFFF&
FloodDirection = 1 'Right
FloodPercent = 100
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 255
IntBkg = &H00C0C0C0&
Left = 5400
TabIndex = 34
Top = 5730
Visible = 0 'False
Width = 615
End
Begin VideoSoftElastic MainElastic
Align = 5 'Fill Container
AutoSizeChildren= 1 'Even Horizontal
BackColor = &H00C0C0C0&
BevelInner = 0 'None
BevelOuter = 1 'Raised
BevelOuterWidth = 1
BorderWidth = 16
Height = 5040
IntBkg = &H00C0C0C0&
Left = 0
MinChildSize = 3500
TabIndex = 0
Top = 0
Width = 7635
Begin VideoSoftIndexTab VSIndexTab
BackSheets = 0 'None
BackTabColor = &H0080FF80&
BorderWidth = 12
Caption = "&Order|&Notes|&Setup"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 13.5
FontStrikethru = 0 'False
FontUnderline = 0 'False
FrontTabColor = &H00C0C0C0&
Height = 4560
Left = 240
Position = 0 'Top
ShowFocusRect = 0 'False
Style = 5 'Chamfered 3D
TabIndex = 1
TabsPerPage = 3
Top = 240
Width = 7155
Begin VideoSoftElastic Page
BackColor = &H00808080&
BevelInner = 7 'Shadow
BevelInnerWidth = 4
BorderWidth = 4
CaptionPos = 2 'Left Bottom
ChildSpacing = 0
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 3705
Index = 2
IntBkg = &H00808080&
Left = 10125
ShadowColor = &H00000000&
TabIndex = 9
Tag = "Setup is the one"
TagPosition = 1 'Above Control
TagWidth = 250
Top = 630
Width = 6705
Begin CommandButton btn_Shadow
Caption = "FrontTabColor"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 555
Index = 1
Left = 3090
TabIndex = 31
Top = 1380
Width = 1665
End
Begin CommandButton btn_Shadow
Caption = "Shadow Color"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 585
Index = 0
Left = 3090
TabIndex = 30
Top = 2070
Width = 1665
End
Begin VideoSoftElastic VSElastic2
AutoSizeChildren= 3 'Even Vertical
BackColor = &H00C0C0C0&
BevelInner = 7 'Shadow
BevelInnerWidth = 4
BorderWidth = 12
ChildSpacing = 12
Height = 2505
IntBkg = &H00C0C0C0&
Left = 270
ShadowColor = &H00404040&
TabIndex = 24
Top = 810
Width = 2595
Begin CheckBox Check1
BackColor = &H0000FFFF&
Caption = "Bold Current Tab"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 285
Index = 0
Left = 180
TabIndex = 29
Top = 180
Value = 1 'Checked
Width = 2235
End
Begin CheckBox Check1
BackColor = &H0000FFFF&
Caption = "Enable Notes Tab"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 285
Index = 1
Left = 180
TabIndex = 28
Top = 645
Value = 1 'Checked
Width = 2235
End
Begin CheckBox Check1
BackColor = &H0000FFFF&
Caption = "Shadows"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 285
Index = 2
Left = 180
TabIndex = 27
Top = 1575
Value = 1 'Checked
Width = 2235
End
Begin CheckBox Check1
BackColor = &H0000FFFF&
Caption = "Pictures"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 285
Index = 3
Left = 180
TabIndex = 26
Top = 2040
Value = 1 'Checked
Width = 2235
End
Begin CheckBox Check1
BackColor = &H0000FFFF&
Caption = "DogEars"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 285
Index = 4
Left = 180
TabIndex = 25
Top = 1110
Value = 1 'Checked
Width = 2235
End
End
Begin ComboBox TabsPerPage
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 360
Left = 270
Style = 2 'Dropdown List
TabIndex = 23
Tag = "TabsPerPage"
Top = 330
Width = 1995
End
End
Begin VideoSoftElastic Page
AutoSizeChildren= 3 'Even Vertical
BackColor = &H00C0C0C0&
BevelInner = 7 'Shadow
BevelInnerWidth = 4
BevelOuter = 6 'Groove
BorderWidth = 12
CaptionPos = 6 'Right Top
ChildSpacing = 8
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 3705
Index = 1
IntBkg = &H00C0C0C0&
Left = 10050
ShadowColor = &H00000000&
TabIndex = 6
Tag = "Moving over Notes"
TagWidth = 700
Top = 630
Width = 6705
Begin ListBox List1
BackColor = &H00E0FFFF&
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1470
Index = 1
Left = 885
TabIndex = 8
Tag = "Notes"
Top = 1920
Width = 5640
End
Begin ListBox List1
BackColor = &H00E0FFFF&
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1470
Index = 0
Left = 885
TabIndex = 7
Tag = "To Do"
Top = 180
Width = 5640
End
End
Begin VideoSoftElastic Page
AutoSizeChildren= 4 'Uneven Vertical
BackColor = &H00C0C0C0&
BevelOuter = 6 'Groove
CaptionPos = 6 'Right Top
Height = 3705
Index = 0
IntBkg = &H00C0C0C0&
Left = 225
TabIndex = 2
Tag = "Moving the mouse on top of the Order tab"
Top = 630
Width = 6705
Begin Grid Grid1
BackColor = &H00FFFFFF&
Cols = 5
FixedCols = 0
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 1785
Left = 90
Rows = 20
ScrollBars = 0 'None
TabIndex = 20
Top = 1830
Width = 6525
End
Begin VideoSoftElastic VSElastic6
AutoSizeChildren= 2 'Uneven Horizontal
BackColor = &H00C0C0C0&
BevelInner = 7 'Shadow
BevelInnerWidth = 4
BevelOuter = 0 'None
BorderWidth = 12
ChildSpacing = 12
Height = 1650
IntBkg = &H00C0C0C0&
Left = 90
TabIndex = 10
Top = 90
Width = 6525
Begin VideoSoftElastic VSElastic3
AccessKey = -1 'True
AutoSizeChildren= 3 'Even Vertical
BackColor = &H00C0C0C0&
ChildSpacing = -1
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H000000FF&
Height = 1290
IntBkg = &H00C0C0C0&
Left = 1890
TabIndex = 11
TagWidth = 700
Top = 180
Width = 4455
Begin ComboBox Combo1
BackColor = &H00FFFFFF&
ForeColor = &H00000000&
Height = 300
Left = 795
Style = 2 'Dropdown List
TabIndex = 16
Tag = "&Bill To"
Top = 90
Width = 3570
End
Begin TextBox Text1
BackColor = &H00FFFFFF&
DragIcon = INDEXTAB.FRX:0000
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 285
Index = 0
Left = 795
TabIndex = 14
Text = "2625 Alcatraz Avenue, Ste 271"
Top = 375
Width = 3570
End
Begin TextBox Text1
BackColor = &H00FFFFFF&
DragIcon = INDEXTAB.FRX:0302
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 285
Index = 2
Left = 795
TabIndex = 13
Text = "Berkeley, CA 94705"
Top = 645
Width = 3570
End
Begin TextBox Text1
BackColor = &H00FFFFFF&
DragIcon = INDEXTAB.FRX:0604
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 285
Index = 3
Left = 795
TabIndex = 12
Top = 915
Width = 3570
End
End
Begin PictureBox Picture1
BackColor = &H00FFFF80&
Height = 1290
Left = 180
ScaleHeight = 1260
ScaleWidth = 1500
TabIndex = 15
Top = 180
Width = 1530
Begin Label Label3
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "2/2/94"
DragIcon = INDEXTAB.FRX:0906
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 300
TabIndex = 19
Top = 870
Width = 885
End
Begin Label Label2
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Order Date"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FF0000&
Height = 225
Left = 210
TabIndex = 18
Top = 600
Width = 1155
End
Begin Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Order ID"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FF0000&
Height = 285
Left = 150
TabIndex = 17
Top = 150
Width = 1215
End
End
End
End
End
Begin Image Image1
Height = 330
Index = 0
Left = -30
Picture = INDEXTAB.FRX:0C08
Stretch = -1 'True
Top = 1380
Visible = 0 'False
Width = 330
End
Begin Image Image1
Height = 330
Index = 1
Left = -30
Picture = INDEXTAB.FRX:0D8A
Stretch = -1 'True
Top = 1770
Visible = 0 'False
Width = 330
End
Begin Image Image1
Height = 330
Index = 2
Left = 0
Picture = INDEXTAB.FRX:0F0C
Stretch = -1 'True
Top = 2130
Visible = 0 'False
Width = 330
End
Begin Image Image1
Height = 330
Index = 3
Left = -60
Stretch = -1 'True
Top = 2580
Visible = 0 'False
Width = 330
End
End
Begin VideoSoftElastic StatusBar
Align = 2 'Align Bottom
AutoSizeChildren= 1 'Even Horizontal
BackColor = &H00C0C0C0&
BevelInner = 0 'None
BevelInnerWidth = 4
BevelOuter = 1 'Raised
BevelOuterWidth = 1
BorderWidth = 8
ChildSpacing = 16
Height = 630
Index = 0
IntBkg = &H00C0C0C0&
Left = 0
TabIndex = 3
Top = 5040
Width = 7635
Begin CommandButton Btn
BackColor = &H00C0C0C0&
Caption = "&Cool"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 390
Index = 4
Left = 6240
TabIndex = 33
Tag = "Cool"
Top = 120
Width = 1275
End
Begin CommandButton Btn
BackColor = &H00C0C0C0&
Caption = "&ForeColor"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 390
Index = 3
Left = 4710
TabIndex = 22
Tag = "ForeColor"
Top = 120
Width = 1290
End
Begin CommandButton Btn
BackColor = &H00C0C0C0&
Caption = "&BackTabColor"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 390
Index = 2
Left = 3180
TabIndex = 21
Tag = "See tabs"
Top = 120
Width = 1290
End
Begin CommandButton Btn
BackColor = &H00C0C0C0&
Caption = "St&yle"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 390
Index = 1
Left = 1650
TabIndex = 5
Tag = "Style"
Top = 120
Width = 1290
End
Begin CommandButton Btn
BackColor = &H00C0C0C0&
Caption = "&Position"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 390
Index = 0
Left = 120
TabIndex = 4
Tag = "Position"
Top = 120
Width = 1290
End
End
Begin VideoSoftElastic StatusBar
Align = 2 'Align Bottom
BackColor = &H00C0C0C0&
BevelInner = 0 'None
BevelOuter = 1 'Raised
BevelOuterWidth = 1
Caption = "StatusBar"
CaptionPos = 4 'Center Center
ForeColor = &H00800000&
Height = 405
Index = 1
IntBkg = &H00C0C0C0&
Left = 0
TabIndex = 32
Top = 5670
Width = 7635
End
End
Option Explicit
Dim OldTip
Sub Btn_Click (Index As Integer)
Select Case Index
Case 0 'Changes Tab positions
VSIndexTab.Position = (VSIndexTab.Position + 1) Mod 5
Case 1 'Changes tab styles
VSIndexTab.Style = (VSIndexTab.Style + 1) Mod 8
Case 2 'Changes back tab color
' disable pictures
Dim i%
Check1(3).Value = 0
For i = 0 To 2
VSIndexTab.TabPicture(i) = Image1(3)
Next
VSIndexTab.BackTabColor = QBColor(Rnd * 15)
Case 3 'Changes Caption text color
VSIndexTab.ForeColor = QBColor(Rnd * 15)
Case 4 'Cool
MsgBox "Click VideoSoft Address with the right button, drag it to Notes tab, and drop it in one of the List boxes. WAY COOL!!"
End Select
End Sub
Sub Btn_MouseMove (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If OldTip = Index Then Exit Sub
ToolTip.Visible = True
ToolTip.Caption = Btn(Index).Tag
ToolTip.Width = TextWidth(Btn(Index).Tag)
ToolTip.Move Btn(Index).Left + Btn(Index).Height * .75, StatusBar(0).Top + Btn(Index).Top + Btn(Index).Height * 1.1
OldTip = Index
End Sub
Sub btn_Shadow_Click (Index%)
Select Case Index
Case 0
Page(2).ShadowColor = QBColor(Rnd * 15)
Case 1
VSIndexTab.FrontTabForeColor = QBColor(Rnd * 15)
End Select
End Sub
Sub Button_Click (Index As Integer)
End Sub
Sub Button_MouseMove (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
End Sub
Sub Check1_click (Index%)
Dim i%
Select Case Index
Case 0 'BoldCurrentTab
VSIndexTab.BoldCurrent = Not VSIndexTab.BoldCurrent
Case 1 'Enable/Disable Notes Tab
VSIndexTab.TabEnabled(1) = Not VSIndexTab.TabEnabled(1)
VSIndexTab.Refresh
Case 2 'Shadows
If Check1(2).Value = 0 Then
Page(2).BevelInnerWidth = 1
Page(2).BevelInner = 3 'Inset
Else
Page(2).BevelInnerWidth = 4
Page(2).BevelInner = 7 'Shadows
End If
Case 3 'Pictures
If Check1(3).Value = 1 Then
For i = 0 To 2
VSIndexTab.TabPicture(i) = Image1(i)
Next
VSIndexTab.BackTabColor = &HC0C0C0
Else
For i = 0 To 2
VSIndexTab.TabPicture(i) = Image1(3)
Next
End If
Case 4 'DogEars
VSIndexTab.DogEars = Not VSIndexTab.DogEars
End Select
End Sub
Sub Form_Load ()
'============================================================
' To create an IndexTab at design time
'============================================================
' * Place an IndexTab on your form
' * Set the Autoswitch to False
' * Set the Caption for tabs separated by a pipe (One|Two)
' * Place one container (Elastic or PictureBox) per tab on
' the white area of the indextab. The containers should
' not touch each other.
' * Set the Autoswitch to False
' * Double click with the right mouse on the tab to
' populate the controls
'============================================================
Me.Caption = "VideoSoft Indextab"
'Fill lists and Combox
TabsPerPage.AddItem "1"
TabsPerPage.AddItem "2"
TabsPerPage.AddItem "3"
TabsPerPage.ListIndex = 2
Combo1.AddItem "VideoSoft"
Combo1.ListIndex = 0
' show pictures
Check1_click 3
Grid1.Row = 0
Grid1.Col = 0
Grid1.ColWidth(0) = 1000
Grid1.Text = "Prod ID"
Grid1.Col = 1
Grid1.ColWidth(1) = 2500
Grid1.Text = "Description"
Grid1.Col = 2
Grid1.Text = "Qty"
Grid1.Col = 3
Grid1.ColWidth(3) = 4500
Grid1.Text = "Price"
End Sub
Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
ToolTip.Visible = False
End Sub
Sub Label3_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then Label3.Drag 1
End Sub
Sub List1_DragDrop (Index As Integer, Source As Control, X As Single, Y As Single)
List1(Index).AddItem Source
End Sub
Sub MainElastic_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
ToolTip.Visible = False
OldTip = -1
End Sub
Sub StatusBar_MouseMove (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
ToolTip.Visible = False
OldTip = -1
End Sub
Sub TabsPerPage_Click ()
VSIndexTab.TabsPerPage = TabsPerPage.ListIndex + 1
VSIndexTab.FirstTab = 3 - VSIndexTab.TabsPerPage
'Enable DogEars option
If VSIndexTab.TabsPerPage = 3 Then
Check1(4).Enabled = False
Else
Check1(4).Enabled = True
End If
End Sub
Sub Text1_MouseDown (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then Text1(Index).Drag 1
End Sub
Sub VSIndexTab_DragOver (Source As Control, X As Single, Y As Single, State As Integer)
If VSIndexTab.MouseOver <> -1 Then VSIndexTab.CurrTab = VSIndexTab.MouseOver
End Sub
Sub VSIndexTab_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
ToolTip.Visible = False
On Error Resume Next
If VSIndexTab.MouseOver = -1 Then
' Current page
If StatusBar(1) <> "Current Page" Then StatusBar(1) = "Current Page"
Else
' Move Over other page
If StatusBar(1) <> Page(VSIndexTab.MouseOver).Tag Then StatusBar(1) = Page(VSIndexTab.MouseOver).Tag
End If
End Sub