Листинг 4
Private Sub TabsOnScreen()
Dim iTop As Integer
'Формирование выходной формы из двух вкладок:
iTop = (dvTabPage1.Style.posTop -_
dvTab1Sel.Style.posHeight) + 2
dvTab1Sel.Style.Top = iTop
dvTab2Sel.Style.Top = dvTab1Sel.Style.Top
dvTabPage2.Style.Top = dvTabPage1.Style.Top
dvTab2Sel.Style.Height = dvTab1Sel.Style.Height
dvTab2Sel.Style.Left = dvTab1Sel.Style.posLeft +_
dvTab1Sel.Style.posWidth
tblPerInfo.Style.Top = tblEmp.Style.Top
' изображение в красивом 3D-виде
With dvTab1Sel
.Style.fontWeight = "bold"
.Style.cursor = "hand"
.Style.backgroundColor = "lightgrey"
.Style.borderLeftStyle = "outset"
.Style.borderLeft = "whitesmoke solid 2px"
.Style.borderRight = "darkgray solid 2px"
.Style.borderTop = "whitesmoke solid 2px"
.Style.visibility = "visible"
End With
With dvTab2Sel
.Style.cursor = "hand"
.Style.backgroundColor = "lightgrey"
.Style.borderLeft = "whitesmoke solid 1px"
.Style.borderRight = "darkgray solid 2px"
.Style.borderTop = "whitesmoke solid 2px"
.Style.borderBottom = "whitesmoke solid 2px"
End With
With dvTabPage1
.Style.backgroundColor = "lightgrey"
.Style.Left = dvTab1Sel.Style.Left
.Style.visibility = "Visible"
.Style.borderTop = "whitesmoke solid 2px"
.Style.borderLeft = "whitesmoke solid 2px"
.Style.borderRight = "darkgray solid 3px"
.Style.borderBottom = "darkgray solid 3px"
.Style.zIndex = "-1"
End With
With dvTabPage2
.Style.backgroundColor = "lightgrey"
.Style.Left = dvTab1Sel.Style.Left
.Style.visibility = "Hidden"
.Style.Height = dvTabPage1.Style.Height
.Style.Width = dvTabPage1.Style.Width
.Style.borderTop = "whitesmoke solid 2px"
.Style.borderLeft = "whitesmoke solid 2px"
.Style.borderRight = "darkgray solid 3px"
.Style.borderBottom = "darkgray solid 3px"
End With
End Sub