vbAccelerator - Contents of code file: frmTextBoxBack.frmVERSION 5.00
Begin VB.Form frmTextBoxBack
Caption = "TextBox Background Modifier"
ClientHeight = 4305
ClientLeft = 3300
ClientTop = 1695
ClientWidth = 4365
Icon = "frmTextBoxBack.frx":0000
LinkTopic = "Form1"
ScaleHeight = 4305
ScaleWidth = 4365
Begin VB.CommandButton cmdBitmapDialog
Caption = "&Show Dialog..."
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 1620
TabIndex = 3
Top = 3780
Width = 1335
End
Begin VB.CommandButton cmdOK
Caption = "OK"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 3000
TabIndex = 2
Top = 3780
Width = 1335
End
Begin VB.TextBox txtTest
BorderStyle = 0 'None
BeginProperty Font
Name = "Lucida Console"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 495
Left = 60
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 0
Text = "frmTextBoxBack.frx":1272
Top = 540
Width = 4215
End
Begin VB.Label lblInfo
Caption = "vbAccelerator Textbox Background modifier - allows
you to tile a bitmap into the background of a TextBox control."
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 60
TabIndex = 1
Top = 60
Width = 4275
End
End
Attribute VB_Name = "frmTextBoxBack"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private m_cLargeTextBoxBack As cTextBoxBackground
Private Sub pLoad()
Dim iFile As Integer
Dim sBuf As String
iFile = FreeFile
On Error GoTo ErrorHandler
Open App.Path & "\cTextBoxBackground.cls" For Binary Access Read As #iFile
sBuf = Space$(LOF(iFile))
Get #iFile, , sBuf
Close #iFile
txtTest.Text = sBuf
Exit Sub
ErrorHandler:
Close #iFile
Exit Sub
End Sub
Private Sub cmdBitmapDialog_Click()
frmBitmapDialog.Show vbModal, Me
End Sub
Private Sub cmdOK_Click()
Unload Me
End Sub
Private Sub Form_Load()
pLoad
Set m_cLargeTextBoxBack = New cTextBoxBackground
m_cLargeTextBoxBack.SetBackdrop LoadPicture(App.Path & "\back.bmp")
m_cLargeTextBoxBack.Attach txtTest.hwnd
End Sub
Private Sub Form_Resize()
On Error Resume Next
cmdOK.Move _
Me.ScaleWidth - cmdOK.Width - 2 * Screen.TwipsPerPixelX, _
Me.ScaleHeight - cmdOK.Height - 2 * Screen.TwipsPerPixelY
cmdBitmapDialog.Move _
cmdOK.left - cmdBitmapDialog.Width - 2 * Screen.TwipsPerPixelX, _
cmdOK.tOp
txtTest.Move _
txtTest.left, txtTest.tOp, _
Me.ScaleWidth - txtTest.left * 2, _
Me.ScaleHeight - txtTest.tOp - 4 * Screen.TwipsPerPixelY - cmdOK.Height
End Sub
|
|