Visual Basic, .NET, ASP, VBA, VBScript
 
  Библиотека кодов  
  Стандартные элементы >>> Label  
     
  Создание 3D Text на Label  
  Добавьте CommandButton на форму и 3 Label
Const GFM_STANDARD = 0
Const GFM_RAISED = 1
Const GFM_SUNKEN = 2
Const GFM_BACKSHADOW = 1
Const GFM_DROPSHADOW = 2
Const BOX_WHITE& = &HFFFFFF
Const BOX_LIGHTGRAY& = &HC0C0C0
Const BOX_DARKGRAY& = &H808080
Const BOX_BLACK& = &H0&
Static Sub FormLabelCaptionEmbossed(L1 As Label, L2 As Label, L3 As Label, label_text As String, label_effect As Integer, label_forecolor As Long, label_depth As Integer)
Dim lt As String
Dim savesm As Integer
Dim f As Form
Set f = L1.Parent
L1.Visible = False
L2.Visible = False
L3.Visible = False
savesm = f.ScaleMode
f.ScaleMode = 3
If label_text = "" Then
lt = L1
Else
lt = label_text
End If
L1 = lt
L2 = lt
L3 = lt
L1.BackStyle = 0
L1.ForeColor = label_forecolor
L2.Width = L1.Width
L2.Height = L1.Height
L2.BackStyle = L1.BackStyle
L2.ForeColor = BOX_DARKGRAY&
L3.Width = L1.Width
L3.Height = L1.Height
L3.BackStyle = L1.BackStyle
L3.ForeColor = BOX_WHITE&
Select Case label_effect
Case GFM_SUNKEN
L2.Left = L1.Left - label_depth
L2.Top = L1.Top - label_depth
L3.Left = L1.Left + label_depth
L3.Top = L1.Top + label_depth
Case GFM_RAISED
L2.Left = L1.Left + label_depth
L2.Top = L1.Top + label_depth
L3.Left = L1.Left - label_depth
L3.Top = L1.Top - label_depth
End Select
f.ScaleMode = savesm
L1.Visible = True
L2.Visible = True
L3.Visible = True
L1.ZOrder
End Sub

Private Sub Command1_Click()
'Replace 'VBTown' with the text you want to display,
'Replace the first '1' with '2' to change the 3D effect.
'Replace 'vbBlack' with the Text Color.
FormLabelCaptionEmbossed Label1, Label2, Label3, "VBTown", 1, vbBlack, 1
End Sub
 
     
  VBNet online (всего: 51586)  
 

Логин:

Пароль:

Регистрация, забыли пароль?


В чате сейчас человек
 
     
  VBNet рекомендует  
   
     
  Лучшие материалы  
 
ActiveX контролы (112)
Hitman74_Library (36119)
WindowsXPControls (20739)
FlexGridPlus (19374)
DSMAniGifControl (18295)
FreeButton (15157)
Примеры кода (546)
Parol (18027)
Passworder (9299)
Screen saver (7654)
Kerish AI (5817)
Folder_L (5768)
Статьи по VB (136)
Мое второе впечатление... (11236)
VB .NET: дорога в будущее (11161)
Основы SQL (9225)
Сообщения Windows в Vi... (8788)
Классовая теория прогр... (8619)
 
     
Техническая поддержка MTW-хостинг | © Copyright 2002-2011 VBNet.RU | Пишите нам