home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 6_2008-2009.ISO / data / zips / KE_FormSki2133401172008.psc / FormSkinner.ctl < prev    next >
Text File  |  2008-11-05  |  42KB  |  1,259 lines

  1. VERSION 5.00
  2. Begin VB.UserControl FormSkinner 
  3.    Alignable       =   -1  'True
  4.    AutoRedraw      =   -1  'True
  5.    ClientHeight    =   330
  6.    ClientLeft      =   0
  7.    ClientTop       =   0
  8.    ClientWidth     =   315
  9.    ControlContainer=   -1  'True
  10.    PropertyPages   =   "FormSkinner.ctx":0000
  11.    ScaleHeight     =   330
  12.    ScaleWidth      =   315
  13.    ToolboxBitmap   =   "FormSkinner.ctx":0035
  14.    Begin VB.Image imgLogo 
  15.       Height          =   330
  16.       Left            =   0
  17.       Top             =   600
  18.       Width           =   765
  19.    End
  20.    Begin VB.Image imgClose 
  21.       Height          =   270
  22.       Left            =   6360
  23.       Top             =   0
  24.       Width           =   450
  25.    End
  26.    Begin VB.Image imgHand2 
  27.       Height          =   300
  28.       Left            =   0
  29.       Picture         =   "FormSkinner.ctx":0347
  30.       Stretch         =   -1  'True
  31.       Top             =   3480
  32.       Visible         =   0   'False
  33.       Width           =   300
  34.    End
  35.    Begin VB.Image closeDis 
  36.       Height          =   270
  37.       Left            =   1800
  38.       Top             =   4080
  39.       Visible         =   0   'False
  40.       Width           =   690
  41.    End
  42.    Begin VB.Image closeOnlyDis 
  43.       Height          =   270
  44.       Left            =   2520
  45.       Top             =   4080
  46.       Visible         =   0   'False
  47.       Width           =   690
  48.    End
  49.    Begin VB.Image leftBorder 
  50.       Height          =   4200
  51.       Left            =   360
  52.       Top             =   1440
  53.       Width           =   105
  54.    End
  55.    Begin VB.Image bottomBorder 
  56.       Height          =   60
  57.       Left            =   120
  58.       Top             =   2160
  59.       Width           =   5250
  60.    End
  61.    Begin VB.Image rightBorder 
  62.       Height          =   4500
  63.       Left            =   720
  64.       Top             =   1440
  65.       Width           =   105
  66.    End
  67.    Begin VB.Image closeOnlyDown 
  68.       Height          =   270
  69.       Left            =   2520
  70.       Top             =   3720
  71.       Visible         =   0   'False
  72.       Width           =   690
  73.    End
  74.    Begin VB.Image closeOnlyOver 
  75.       Height          =   330
  76.       Left            =   2520
  77.       Top             =   3360
  78.       Visible         =   0   'False
  79.       Width           =   675
  80.    End
  81.    Begin VB.Image closeOnlyMain 
  82.       Height          =   270
  83.       Left            =   2520
  84.       Top             =   3000
  85.       Visible         =   0   'False
  86.       Width           =   690
  87.    End
  88.    Begin VB.Image imgHand 
  89.       Height          =   300
  90.       Left            =   0
  91.       Picture         =   "FormSkinner.ctx":1011
  92.       Stretch         =   -1  'True
  93.       Top             =   3120
  94.       Visible         =   0   'False
  95.       Width           =   300
  96.    End
  97.    Begin VB.Label lblWeb 
  98.       AutoSize        =   -1  'True
  99.       BackStyle       =   0  'Transparent
  100.       ForeColor       =   &H80000004&
  101.       Height          =   195
  102.       Left            =   4560
  103.       TabIndex        =   1
  104.       Top             =   600
  105.       Width           =   45
  106.    End
  107.    Begin VB.Image imgWeb 
  108.       Height          =   300
  109.       Left            =   2040
  110.       Stretch         =   -1  'True
  111.       Top             =   840
  112.       Width           =   300
  113.    End
  114.    Begin VB.Label lblCaption 
  115.       AutoSize        =   -1  'True
  116.       BackStyle       =   0  'Transparent
  117.       BeginProperty Font 
  118.          Name            =   "MS Sans Serif"
  119.          Size            =   9.75
  120.          Charset         =   0
  121.          Weight          =   700
  122.          Underline       =   0   'False
  123.          Italic          =   0   'False
  124.          Strikethrough   =   0   'False
  125.       EndProperty
  126.       ForeColor       =   &H8000000E&
  127.       Height          =   240
  128.       Left            =   210
  129.       TabIndex        =   0
  130.       Top             =   90
  131.       Width           =   75
  132.    End
  133.    Begin VB.Image imgIcon 
  134.       Height          =   300
  135.       Left            =   0
  136.       Stretch         =   -1  'True
  137.       Top             =   840
  138.       Width           =   300
  139.    End
  140.    Begin VB.Image closeDown 
  141.       Height          =   270
  142.       Left            =   1800
  143.       Top             =   3720
  144.       Visible         =   0   'False
  145.       Width           =   690
  146.    End
  147.    Begin VB.Image minDown 
  148.       Height          =   270
  149.       Left            =   1320
  150.       Top             =   3720
  151.       Visible         =   0   'False
  152.       Width           =   420
  153.    End
  154.    Begin VB.Image closeOver 
  155.       Height          =   330
  156.       Left            =   1800
  157.       Top             =   3360
  158.       Visible         =   0   'False
  159.       Width           =   675
  160.    End
  161.    Begin VB.Image minOver 
  162.       Height          =   330
  163.       Left            =   1320
  164.       Top             =   3360
  165.       Visible         =   0   'False
  166.       Width           =   420
  167.    End
  168.    Begin VB.Image closeMain 
  169.       Height          =   270
  170.       Left            =   1800
  171.       Top             =   3000
  172.       Visible         =   0   'False
  173.       Width           =   690
  174.    End
  175.    Begin VB.Image minMain 
  176.       Height          =   270
  177.       Left            =   1320
  178.       Top             =   3000
  179.       Visible         =   0   'False
  180.       Width           =   420
  181.    End
  182.    Begin VB.Image imgMin 
  183.       Height          =   270
  184.       Left            =   5880
  185.       Top             =   0
  186.       Width           =   420
  187.    End
  188.    Begin VB.Image imgRight 
  189.       Height          =   795
  190.       Left            =   3600
  191.       Top             =   0
  192.       Width           =   4245
  193.    End
  194.    Begin VB.Image imgMiddle 
  195.       Height          =   795
  196.       Left            =   2640
  197.       Top             =   0
  198.       Width           =   2130
  199.    End
  200.    Begin VB.Image imgLeft 
  201.       Height          =   795
  202.       Left            =   0
  203.       Top             =   0
  204.       Width           =   2520
  205.    End
  206. End
  207. Attribute VB_Name = "FormSkinner"
  208. Attribute VB_GlobalNameSpace = False
  209. Attribute VB_Creatable = True
  210. Attribute VB_PredeclaredId = False
  211. Attribute VB_Exposed = True
  212. Attribute VB_Ext_KEY = "PropPageWizardRun" ,"Yes"
  213. Option Explicit
  214.  
  215. '                   By u32. October, 08                   '
  216. '                    ⌐ JRE SOFT.  2008                    '
  217. '==========================================================
  218. ' FormSkinner UserControl lets you create and load-in your
  219. ' own graphics to skin your form with custom Titlebar and
  220. ' borders. You can also put your Logo up along with the
  221. ' caption. It has more useful propertys.
  222.  
  223. ' Check it out!
  224. '==========================================================
  225.  
  226. ' Programming skills...
  227. ' You should know what Property GET, LET and SET is!
  228. ' Else it's pretty easy coding.
  229.  
  230. ' TIP:
  231. ' If you use only rectangular images for Min - Max - Close,
  232. ' then just leave CloseOnlyUp/Over/Down propertys blanc.
  233. ' Those images is only necesarry if you'r using rounded
  234. ' images with transparency... Like this example!
  235.  
  236.  
  237. 'Enum propertys
  238. Enum TitleStyles
  239.     Normal = 0
  240.     [Company Logo] = 1
  241.     Both = 2
  242. End Enum
  243.  
  244. Enum TitleIconSizes
  245.     [16x16 px] = 0
  246.     [20x20 px] = 1
  247.     [24x24 px] = 2
  248.     [32x32 px] = 3
  249.     [48x48 px] = 4
  250. End Enum
  251.  
  252. Enum LinkIconSizes
  253.     [16x16 px] = 0
  254.     [20x20 px] = 1
  255.     [24x24 px] = 2
  256.     [32x32 px] = 3
  257.     [48x48 px] = 4
  258. End Enum
  259.  
  260. Enum LinkMouseIcons
  261.     Default = 0
  262.     [IE Hand] = 1
  263.     [Other Hand] = 2
  264. End Enum
  265.  
  266. Enum MinCloseCursors
  267.     Default = 0
  268.     [IE Hand] = 1
  269.     [Other Hand] = 2
  270. End Enum
  271.  
  272. Enum MinCloseButtonsTop
  273.     [Modern 0px] = 0
  274.     [Standard 4px] = 1
  275.     [Lower 8px] = 2
  276.     [Lower 12px] = 3
  277.     [Bar Centered] = 4
  278. End Enum
  279.  
  280.  
  281. 'Defaults
  282. Const mDefTitleIconVisible = True
  283. Const mDefTitleIconSize = 1
  284. Const mDefTitleCaption = "KE TitleBar and FormSkinner"
  285. Const mDefMinButton = True
  286. Const mDefColorTransp1R = 255
  287. Const mdefColorTransp2G = 255
  288. Const mDefColorTransp3B = 222
  289. Const mDefTitleFontColor = vbWhite
  290. Const mDefLinkForeColorUp = vbWhite
  291. Const mDefLinkForeColorOver = vbBlue
  292. Const mDefToolTipTextMin = " Minimize "
  293. Const mDefToolTipTextClose = " Close "
  294. Const mDefTitleStyle = 0
  295. Const mDefLink = ""
  296. Const mDefLinkVisible = False
  297. Const mDefLinkCaption = ""
  298. Const mDefLinkMouseIcon = 1
  299. Const mDefLinkLeft = 5060
  300. Const mDefLinkTop = 475
  301. Const mDefLinkIconSize = 0
  302. Const mDefMinCloseTop = 0
  303. Const mDefMinCloseCursor = 0
  304. Const mDefLinkUnderlined = True
  305.  
  306.  
  307. 'Privates
  308. Private mTitleIconVisible As Boolean
  309. Private mTitleIconSize As TitleIconSizes
  310. Private mTitleCaption As String
  311. Private mMinButton As Boolean
  312. Private mColorTransp1R As Integer
  313. Private mColorTransp2G As Integer
  314. Private mColorTransp3B As Integer
  315. Private mTitleFontColor As OLE_COLOR
  316. Private mLinkForeColorUp As OLE_COLOR
  317. Private mLinkForeColorOver As OLE_COLOR
  318. Private mToolTipTextMin As String
  319. Private mToolTipTextClose As String
  320. Private mTitleStyle As TitleStyles
  321. Private mLink As String
  322. Private mLinkVisible As Boolean
  323. Private mLinkCaption As String
  324. Private mLinkMouseIcon As LinkMouseIcons
  325. Private mLinkLeft As Integer
  326. Private mLinkTop As Integer
  327. Private mLinkIconSize As LinkIconSizes
  328. Private mMinCloseTop As MinCloseButtonsTop
  329. Private mMinCloseCursor As MinCloseCursors
  330. Private mLinkUnderlined As Boolean
  331.  
  332. Private Down As Boolean
  333.  
  334.  
  335. Public Property Get LinkIconSize() As LinkIconSizes
  336.     LinkIconSize = mLinkIconSize
  337. End Property
  338.  
  339. Public Property Let LinkIconSize(ByVal NewLinkIconSize As LinkIconSizes)
  340.     mLinkIconSize = NewLinkIconSize
  341.     PropertyChanged "LinkIconSize"
  342.     UserControl_Resize
  343. End Property
  344.  
  345. Public Property Get LinkUnderlined() As Boolean
  346.     LinkUnderlined = mLinkUnderlined
  347. End Property
  348.  
  349. Public Property Let LinkUnderlined(ByVal NewLinkUnderlined As Boolean)
  350.     mLinkUnderlined = NewLinkUnderlined
  351.     PropertyChanged "LinkUnderlined"
  352. End Property
  353.  
  354. Public Property Get MinCloseCursor() As MinCloseCursors
  355.     MinCloseCursor = mMinCloseCursor
  356. End Property
  357.  
  358. Public Property Let MinCloseCursor(ByVal NewMinCloseCursor As MinCloseCursors)
  359.     mMinCloseCursor = NewMinCloseCursor
  360.     PropertyChanged "MinCloseCursor"
  361.     UserControl_Resize
  362. End Property
  363.  
  364. Public Property Get MinCloseTop() As MinCloseButtonsTop
  365.     MinCloseTop = mMinCloseTop
  366. End Property
  367.  
  368. Public Property Let MinCloseTop(ByVal NewMinCloseTop As MinCloseButtonsTop)
  369.     mMinCloseTop = NewMinCloseTop
  370.     PropertyChanged "MinCloseTop"
  371.     UserControl_Resize
  372. End Property
  373.  
  374. Public Property Get BackColor() As OLE_COLOR
  375.     BackColor = UserControl.BackColor
  376. End Property
  377.  
  378. Public Property Let BackColor(ByVal NewBackColor As OLE_COLOR)
  379.     UserControl.BackColor = NewBackColor
  380.     PropertyChanged "BackColor"
  381. End Property
  382.  
  383. Public Property Get ToolTipTextMin() As String
  384.     ToolTipTextMin = mToolTipTextMin
  385. End Property
  386.  
  387. Public Property Let ToolTipTextMin(ByVal NewToolTipTextMin As String)
  388.     mToolTipTextMin = NewToolTipTextMin
  389.     PropertyChanged "ToolTipTextMin"
  390.     imgMin.ToolTipText = mToolTipTextMin
  391. End Property
  392.  
  393. Public Property Get ToolTipTextClose() As String
  394.     ToolTipTextClose = mToolTipTextClose
  395. End Property
  396.  
  397. Public Property Let ToolTipTextClose(ByVal newToolTipTextClose As String)
  398.     mToolTipTextClose = newToolTipTextClose
  399.     PropertyChanged "ToolTipTextClose"
  400.     imgClose.ToolTipText = mToolTipTextClose
  401. End Property
  402.  
  403. Public Property Get ToolTipTextWeblink() As String
  404.     ToolTipTextWeblink = lblWeb.ToolTipText
  405. End Property
  406.  
  407. Public Property Let ToolTipTextWeblink(ByVal NewToolTipTextWeblink As String)
  408.     lblWeb.ToolTipText = NewToolTipTextWeblink
  409.     PropertyChanged "ToolTipTextWeblink"
  410. End Property
  411.  
  412. Public Property Get LinkMouseIcon() As LinkMouseIcons
  413.     LinkMouseIcon = mLinkMouseIcon
  414. End Property
  415.  
  416. Public Property Let LinkMouseIcon(ByVal NewLinkMouseIcon As LinkMouseIcons)
  417.     mLinkMouseIcon = NewLinkMouseIcon
  418.     PropertyChanged "LinkMouseIcon"
  419.     UserControl_Resize
  420. End Property
  421.  
  422. Public Property Get LinkVisible() As Boolean
  423.     LinkVisible = mLinkVisible
  424. End Property
  425.  
  426. Public Property Let LinkVisible(ByVal NewLinkVisible As Boolean)
  427.     mLinkVisible = NewLinkVisible
  428.     PropertyChanged "LinkVisible"
  429.     UserControl_Resize
  430. End Property
  431.  
  432. Public Property Get Link() As String
  433.     Link = mLink
  434. End Property
  435.  
  436. Public Property Let Link(ByVal NewLink As String)
  437.     mLink = NewLink
  438.     PropertyChanged "Link"
  439. End Property
  440.  
  441. Public Property Get LinkFont() As Font
  442.     Set LinkFont = lblWeb.Font
  443. End Property
  444.  
  445. Public Property Set LinkFont(ByVal NewLinkFont As Font)
  446.     Set lblWeb.Font = NewLinkFont
  447.     PropertyChanged "LinkFont"
  448.     UserControl_Resize
  449. End Property
  450.  
  451. Public Property Get LinkForeColorUp() As OLE_COLOR
  452.     LinkForeColorUp = mLinkForeColorUp
  453. End Property
  454.  
  455. Public Property Let LinkForeColorUp(ByVal NewLinkForeColorUp As OLE_COLOR)
  456.     mLinkForeColorUp = NewLinkForeColorUp
  457.     PropertyChanged "LinkForeColorUp"
  458.     lblWeb.ForeColor = mLinkForeColorUp
  459. End Property
  460.  
  461. Public Property Get LinkForeColorOver() As OLE_COLOR
  462.     LinkForeColorOver = mLinkForeColorOver
  463. End Property
  464.  
  465. Public Property Let LinkForeColorOver(ByVal NewLinkForeColorOver As OLE_COLOR)
  466.     mLinkForeColorOver = NewLinkForeColorOver
  467.     PropertyChanged "LinkForeColorOver"
  468. End Property
  469.  
  470. Public Property Get LinkIcon() As Picture
  471.     Set LinkIcon = imgWeb.Picture
  472. End Property
  473.  
  474. Public Property Set LinkIcon(ByVal NewLinkIcon As Picture)
  475.     Set imgWeb.Picture = NewLinkIcon
  476.     PropertyChanged "LinkIcon"
  477. End Property
  478.  
  479. Public Property Get LinkLeft() As Integer
  480.     LinkLeft = mLinkLeft
  481. End Property
  482.  
  483. Public Property Let LinkLeft(ByVal NewLinkLeft As Integer)
  484.     mLinkLeft = NewLinkLeft
  485.     PropertyChanged "LinkLeft"
  486.     UserControl_Resize
  487. End Property
  488.  
  489. Public Property Get LinkTop() As Integer
  490.     LinkTop = mLinkTop
  491. End Property
  492.  
  493. Public Property Let LinkTop(ByVal NewLinkTop As Integer)
  494.     mLinkTop = NewLinkTop
  495.     PropertyChanged "LinkTop"
  496.     UserControl_Resize
  497. End Property
  498.  
  499. Public Property Get Logo() As Picture
  500.     Set Logo = imgLogo.Picture
  501. End Property
  502.  
  503. Public Property Set Logo(ByVal NewLogo As Picture)
  504.     Set imgLogo.Picture = NewLogo
  505.     PropertyChanged "Logo"
  506.     UserControl_Resize
  507. End Property
  508.  
  509. Public Property Get TitleStyle() As TitleStyles
  510.     TitleStyle = mTitleStyle
  511. End Property
  512.  
  513. Public Property Let TitleStyle(ByVal NewTitleStyle As TitleStyles)
  514.     mTitleStyle = NewTitleStyle
  515.     PropertyChanged "TitleStyle"
  516.     UserControl_Resize
  517. End Property
  518.  
  519. Public Property Get LinkCaption() As String
  520.     LinkCaption = mLinkCaption
  521. End Property
  522.  
  523. Public Property Let LinkCaption(ByVal newLinkCaption As String)
  524.     mLinkCaption = newLinkCaption
  525.     PropertyChanged "LinkCaption"
  526.     lblWeb.Caption = mLinkCaption
  527. End Property
  528.  
  529. Public Property Get TitleFontColor() As OLE_COLOR
  530.     TitleFontColor = mTitleFontColor
  531. End Property
  532.  
  533. Public Property Let TitleFontColor(ByVal NewTitleFontColor As OLE_COLOR)
  534.     mTitleFontColor = NewTitleFontColor
  535.     PropertyChanged "TitleFontColor"
  536.     lblCaption.ForeColor = mTitleFontColor
  537. End Property
  538.  
  539. Public Property Get ColorTransp1R() As Integer
  540.     ColorTransp1R = mColorTransp1R
  541. End Property
  542.  
  543. Public Property Let ColorTransp1R(ByVal NewColorTransp1R As Integer)
  544.     mColorTransp1R = NewColorTransp1R
  545.     PropertyChanged "ColorTransp1R"
  546.     If mColorTransp1R > 255 Then
  547.         mColorTransp1R = 255
  548.         MsgBox "You can't set a higher value than 255", vbInformation, "Usercontrol"
  549.     End If
  550. End Property
  551.  
  552. Public Property Get ColorTransp2G() As Integer
  553.     ColorTransp2G = mColorTransp2G
  554. End Property
  555.  
  556. Public Property Let ColorTransp2G(ByVal NewColorTransp2G As Integer)
  557.     mColorTransp2G = NewColorTransp2G
  558.     PropertyChanged "ColorTransp2G"
  559.     If mColorTransp2G > 255 Then
  560.         mColorTransp2G = 255
  561.         MsgBox "You can't set a higher value than 255", vbInformation, "Usercontrol"
  562.     End If
  563. End Property
  564.  
  565. Public Property Get ColorTransp3B() As Integer
  566.     ColorTransp3B = mColorTransp3B
  567. End Property
  568.  
  569. Public Property Let ColorTransp3B(ByVal NewColorTransp3B As Integer)
  570.     mColorTransp3B = NewColorTransp3B
  571.     PropertyChanged "ColorTransp3B"
  572.     If mColorTransp3B > 255 Then
  573.         mColorTransp3B = 255
  574.         MsgBox "You can't set a higher value than 255", vbInformation, "Usercontrol"
  575.     End If
  576. End Property
  577.  
  578. Public Property Get MinButton() As Boolean
  579.     MinButton = mMinButton
  580. End Property
  581.  
  582. Public Property Let MinButton(ByVal NewMinButton As Boolean)
  583.     mMinButton = NewMinButton
  584.     PropertyChanged "MinButton"
  585.     UserControl_Resize
  586. End Property
  587.  
  588. Public Property Get TitleCaption() As String
  589.     TitleCaption = mTitleCaption
  590. End Property
  591.  
  592. Public Property Let TitleCaption(ByVal NewTitleCaption As String)
  593.     mTitleCaption = NewTitleCaption
  594.     PropertyChanged "TitleCaption"
  595.     lblCaption.Caption = mTitleCaption
  596.     UserControl.Parent.Caption = mTitleCaption
  597. End Property
  598.  
  599. Public Property Get TitleFont() As Font
  600.     Set TitleFont = lblCaption.Font
  601. End Property
  602.  
  603. Public Property Set TitleFont(ByVal NewTitleFont As Font)
  604.     Set lblCaption.Font = NewTitleFont
  605.     PropertyChanged "TitleFont"
  606. End Property
  607.  
  608. Public Property Get TitleIconVisible() As Boolean
  609.     TitleIconVisible = mTitleIconVisible
  610. End Property
  611.  
  612. Public Property Let TitleIconVisible(ByVal NewTitleIconVisible As Boolean)
  613.     mTitleIconVisible = NewTitleIconVisible
  614.     PropertyChanged "TitleIconVisible"
  615.     UserControl_Resize
  616. End Property
  617.  
  618. Public Property Get TitleIconSize() As TitleIconSizes
  619.     TitleIconSize = mTitleIconSize
  620. End Property
  621.  
  622. Public Property Let TitleIconSize(ByVal NewTitleIconSize As TitleIconSizes)
  623.     mTitleIconSize = NewTitleIconSize
  624.     PropertyChanged "TitleIconSize"
  625.     UserControl_Resize
  626. End Property
  627.  
  628. Public Property Get TitleIcon() As Picture
  629.     Set TitleIcon = imgIcon.Picture
  630. End Property
  631.  
  632. Public Property Set TitleIcon(ByVal NewTitleIcon As Picture)
  633.     Set imgIcon.Picture = NewTitleIcon
  634.     PropertyChanged "TitleIcon"
  635.     If imgIcon.Picture = 0 Then
  636.         mTitleIconVisible = False
  637.     Else
  638.         mTitleIconVisible = True
  639.     End If
  640.     Set UserControl.Parent.Icon = NewTitleIcon
  641.     UserControl_Resize
  642. End Property
  643.  
  644. Private Sub imgClose_Click()
  645.     Unload UserControl.Parent
  646. End Sub
  647.  
  648. Private Sub imgClose_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  649.     If mMinButton = True Then
  650.         imgClose = closeDown
  651.     Else
  652.         If closeOnlyMain.Picture = 0 Then
  653.             imgClose = closeDown
  654.         Else
  655.             imgClose = closeOnlyDown
  656.         End If
  657.     End If
  658.     Down = True
  659. End Sub
  660.  
  661. Private Sub imgClose_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  662.     'Close-button uses different pics depending on if
  663.     'minimize button is visible or not.
  664.     If mMinButton = True Then
  665.         If Down = False Then
  666.             'Over state
  667.             imgClose = closeOver
  668.             'Up
  669.             imgMin = minMain
  670.         Else
  671.             'Down
  672.             imgClose = closeDown
  673.             'Up
  674.             imgMin = minMain
  675.         End If
  676.     Else
  677.         If Down = False Then
  678.             'Over state, but Close only set of images
  679.             If closeOnlyMain.Picture = 0 Then
  680.             imgClose = closeOver
  681.         Else
  682.             imgClose = closeOnlyOver
  683.         End If
  684.             'Up
  685.             imgMin = minMain
  686.         Else
  687.             'Down
  688.             If closeOnlyMain.Picture = 0 Then
  689.             imgClose = closeDown
  690.         Else
  691.             imgClose = closeOnlyDown
  692.         End If
  693.             'Up
  694.             imgMin = minMain
  695.         End If
  696.     End If
  697.     imgClose.ToolTipText = mToolTipTextClose
  698. End Sub
  699.  
  700. Private Sub imgClose_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  701.     Down = False
  702.     imgRight_MouseMove Button, Shift, X, Y
  703. End Sub
  704.  
  705. Private Sub imgLeft_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  706.     MoveForm UserControl.Parent
  707. End Sub
  708.  
  709. Private Sub imgLogo_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  710.     imgRight_MouseDown Button, Shift, X, Y
  711. End Sub
  712.  
  713. Private Sub imgMiddle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  714.     MoveForm UserControl.Parent
  715. End Sub
  716.  
  717. Private Sub imgMiddle_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  718.     imgRight_MouseMove Button, Shift, X, Y
  719. End Sub
  720.  
  721. Private Sub imgMin_Click()
  722.     UserControl.Parent.WindowState = 1
  723. End Sub
  724.  
  725. Private Sub imgMin_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  726.     imgMin = minDown
  727.     Down = True
  728. End Sub
  729.  
  730. Private Sub imgMin_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  731.     If Down = False Then
  732.         imgMin = minOver
  733.         imgClose = closeMain
  734.     Else
  735.         imgMin = minDown
  736.         imgClose = closeMain
  737.     End If
  738.     imgMin.ToolTipText = mToolTipTextMin
  739. End Sub
  740.  
  741. Private Sub imgMin_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  742.     Down = False
  743.     imgRight_MouseMove Button, Shift, X, Y
  744. End Sub
  745.  
  746. Private Sub imgRight_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  747.     MoveForm UserControl.Parent
  748. End Sub
  749.  
  750. Private Sub imgRight_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  751.     If mMinButton = True Then
  752.         imgMin = minMain
  753.         imgClose = closeMain
  754.     Else
  755.         If closeOnlyMain.Picture = 0 Then
  756.             imgClose = closeMain
  757.         Else
  758.             imgClose = closeOnlyMain
  759.         End If
  760.     End If
  761.     lblWeb.ForeColor = mLinkForeColorUp
  762.     lblWeb.FontUnderline = False
  763. End Sub
  764.  
  765. Private Sub imgWeb_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  766.     MoveForm UserControl.Parent
  767. End Sub
  768.  
  769. Private Sub lblCaption_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  770.     MoveForm UserControl.Parent
  771. End Sub
  772.  
  773. Private Sub lblWeb_Click()
  774.     ExecuteURL UserControl.Parent, mLink, Normal
  775. End Sub
  776.  
  777. Private Sub lblWeb_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  778.     lblWeb.ForeColor = mLinkForeColorOver
  779.     lblWeb.FontUnderline = mLinkUnderlined
  780. End Sub
  781.  
  782. Private Sub lblWeb_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  783.     lblWeb.ForeColor = mLinkForeColorUp
  784.     lblWeb.FontUnderline = False
  785. End Sub
  786.  
  787. Private Sub UserControl_InitProperties()
  788.     mTitleIconVisible = mDefTitleIconVisible
  789.     mTitleCaption = mDefTitleCaption
  790.     mMinButton = mDefMinButton
  791.     lblCaption.FontName = "Ms Sans Serif"
  792.     lblCaption.FontSize = 10
  793.     lblCaption.FontBold = True
  794.     mColorTransp1R = mDefColorTransp1R
  795.     mColorTransp2G = mdefColorTransp2G
  796.     mColorTransp3B = mDefColorTransp3B
  797.     mTitleFontColor = mDefTitleFontColor
  798.     mLinkCaption = mDefLinkCaption
  799.     mTitleStyle = mDefTitleStyle
  800.     mLinkForeColorUp = mDefLinkForeColorUp
  801.     mLinkForeColorOver = mDefLinkForeColorOver
  802.     lblWeb.FontName = "MS Sans Serif"
  803.     lblWeb.FontSize = 8
  804.     lblWeb.FontBold = True
  805.     mLink = mDefLink
  806.     mLinkVisible = mDefLinkVisible
  807.     mLinkMouseIcon = mDefLinkMouseIcon
  808.     mToolTipTextClose = mDefToolTipTextClose
  809.     mToolTipTextMin = mDefToolTipTextMin
  810.     mTitleIconSize = mDefTitleIconSize
  811.     mMinCloseTop = mDefMinCloseTop
  812.     mMinCloseCursor = mDefMinCloseCursor
  813.     mLinkLeft = mDefLinkLeft
  814.     mLinkTop = mDefLinkTop
  815.     mLinkUnderlined = mDefLinkUnderlined
  816.     mLinkIconSize = mDefLinkIconSize
  817. End Sub
  818.  
  819. Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  820.     imgRight_MouseMove Button, Shift, X, Y
  821. End Sub
  822.  
  823. Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
  824.     mLinkIconSize = PropBag.ReadProperty("LinkIconSize", mDefLinkIconSize)
  825.     mLinkUnderlined = PropBag.ReadProperty("LinkUnderlined", mDefLinkUnderlined)
  826.     mLinkTop = PropBag.ReadProperty("LinkTop", mDefLinkTop)
  827.     mLinkLeft = PropBag.ReadProperty("LinkLeft", mDefLinkLeft)
  828.     mMinCloseCursor = PropBag.ReadProperty("MinCloseCursor", mDefMinCloseCursor)
  829.     mMinCloseTop = PropBag.ReadProperty("MinCloseTop", mDefMinCloseTop)
  830.     UserControl.BackColor = PropBag.ReadProperty("BackColor", Ambient.BackColor)
  831.     mToolTipTextMin = PropBag.ReadProperty("ToolTipTextMin", mDefToolTipTextMin)
  832.     mToolTipTextClose = PropBag.ReadProperty("ToolTipTextClose", mDefToolTipTextClose)
  833.     lblWeb.ToolTipText = PropBag.ReadProperty("ToolTipTextWeblink", "")
  834.     mLinkMouseIcon = PropBag.ReadProperty("LinkMouseIcon", mDefLinkMouseIcon)
  835.     mLinkVisible = PropBag.ReadProperty("LinkVisible", mDefLinkVisible)
  836.     mLink = PropBag.ReadProperty("Link", mDefLink)
  837.     Set lblWeb.Font = PropBag.ReadProperty("LinkFont", Ambient.Font)
  838.     mLinkForeColorUp = PropBag.ReadProperty("LinkForeColorUp", mDefLinkForeColorUp)
  839.     mLinkForeColorOver = PropBag.ReadProperty("LinkForeColorOver", mDefLinkForeColorOver)
  840.     Set imgWeb.Picture = PropBag.ReadProperty("LinkIcon", Nothing)
  841.     Set imgLogo.Picture = PropBag.ReadProperty("Logo", Nothing)
  842.     mTitleStyle = PropBag.ReadProperty("TitleStyle", mDefTitleStyle)
  843.     mLinkCaption = PropBag.ReadProperty("LinkCaption", mDefLinkCaption)
  844.     Set imgIcon.Picture = PropBag.ReadProperty("TitleIcon", Nothing)
  845.     mTitleIconVisible = PropBag.ReadProperty("TitleIconVisible", mDefTitleIconVisible)
  846.     mTitleIconSize = PropBag.ReadProperty("TitleIconSize", mDefTitleIconSize)
  847.     mTitleCaption = PropBag.ReadProperty("TitleCaption", mDefTitleCaption)
  848.     mMinButton = PropBag.ReadProperty("MinButton", mDefMinButton)
  849.     Set lblCaption.Font = PropBag.ReadProperty("TitleFont", Ambient.Font)
  850.     mColorTransp1R = PropBag.ReadProperty("ColorTransp1R", mDefColorTransp1R)
  851.     mColorTransp2G = PropBag.ReadProperty("ColorTransp2G", mdefColorTransp2G)
  852.     mColorTransp3B = PropBag.ReadProperty("ColorTransp3B", mDefColorTransp3B)
  853.     mTitleFontColor = PropBag.ReadProperty("TitleFontColor", mDefTitleFontColor)
  854.     'Skinning pictures
  855.     Set leftBorder.Picture = PropBag.ReadProperty("ImageBorderLeft", Nothing)
  856.     Set bottomBorder.Picture = PropBag.ReadProperty("ImageBorderBottom", Nothing)
  857.     Set rightBorder.Picture = PropBag.ReadProperty("ImageBorderRight", Nothing)
  858.     Set closeOnlyMain.Picture = PropBag.ReadProperty("ImageCloseOnlyUp", Nothing)
  859.     Set closeOnlyOver.Picture = PropBag.ReadProperty("ImageCloseOnlyOver", Nothing)
  860.     Set closeOnlyDown.Picture = PropBag.ReadProperty("ImageCloseOnlyDown", Nothing)
  861.     Set closeMain.Picture = PropBag.ReadProperty("ImageClose1Up", Nothing)
  862.     Set closeOver.Picture = PropBag.ReadProperty("ImageClose1Over", Nothing)
  863.     Set closeDown.Picture = PropBag.ReadProperty("ImageClose1Down", Nothing)
  864.     Set minMain.Picture = PropBag.ReadProperty("ImageMinUp", Nothing)
  865.     Set minOver.Picture = PropBag.ReadProperty("ImageMinOver", Nothing)
  866.     Set minDown.Picture = PropBag.ReadProperty("ImageMinDown", Nothing)
  867.     Set imgRight.Picture = PropBag.ReadProperty("ImageTBRight", Nothing)
  868.     Set imgMiddle.Picture = PropBag.ReadProperty("ImageTBMiddle", Nothing)
  869.     Set imgLeft.Picture = PropBag.ReadProperty("ImageTBLeft", Nothing)
  870. End Sub
  871.  
  872. Private Sub UserControl_Resize()
  873.  
  874.     'Most of the property changing is set up here.!.
  875.     UserControl.ScaleMode = UserControl.Parent.ScaleMode
  876.     UserControl.Width = UserControl.Parent.Width
  877.     UserControl.Height = UserControl.Parent.Height
  878.     imgLeft.Left = 0
  879.     imgMiddle.Stretch = True
  880.     imgMiddle.Left = imgLeft.Width
  881.     'Form is so slim that imgMiddle goes in minus.
  882.     On Error Resume Next
  883.     imgRight.Left = UserControl.Width - imgRight.Width
  884.     imgMiddle.Width = UserControl.Width - imgLeft.Width - imgRight.Width
  885.     imgMiddle.Height = imgLeft.Height
  886.     imgMin = minMain
  887.     imgMin.Visible = mMinButton
  888.     Select Case mTitleIconSize
  889.         Case 0
  890.             imgIcon.Width = 240  ' 16x16 px
  891.             imgIcon.Height = 240
  892.         Case 1
  893.             imgIcon.Width = 300  ' 20x20 px
  894.             imgIcon.Height = 300
  895.         Case 2
  896.             imgIcon.Width = 360  ' 24x24 px
  897.             imgIcon.Height = 360
  898.         Case 3
  899.             imgIcon.Width = 480  ' 32x32 px
  900.             imgIcon.Height = 480
  901.         Case 4
  902.             imgIcon.Width = 720  ' 48x48 px
  903.             imgIcon.Height = 720
  904.     End Select
  905.     ' Changes
  906.     If imgIcon.Picture = 0 Or mTitleIconVisible = False Then
  907.         imgIcon.Left = 120
  908.         imgIcon.Top = 80
  909.         lblCaption.Left = imgIcon.Left + 80
  910.         imgIcon.Visible = mTitleIconVisible
  911.         lblCaption.Top = 60
  912.     ElseIf mTitleIconVisible = True Then
  913.         imgIcon.Left = 120
  914.         imgIcon.Top = 80
  915.         imgIcon.Visible = True
  916.         lblCaption.Left = imgIcon.Left + imgIcon.Width + 80
  917.         lblCaption.Top = 60
  918.     End If
  919.     
  920.     If mMinButton = False Then
  921.         ' Using only rectangular images, so
  922.         ' the "CloseOnly" is not not needed.
  923.         If closeOnlyMain.Picture = 0 Then
  924.             imgClose = closeMain
  925.             imgClose.Left = UserControl.Width - imgClose.Width - 110
  926.         Else
  927.             imgClose = closeOnlyMain
  928.             imgClose.Left = UserControl.Width - imgClose.Width - 140
  929.         End If
  930.     Else
  931.         imgClose = closeMain
  932.         imgClose.Left = UserControl.Width - imgClose.Width - 110
  933.     End If
  934.     Select Case mMinCloseTop
  935.         Case 0
  936.             imgMin.Top = 0
  937.             imgClose.Top = 0
  938.         Case 1
  939.             imgMin.Top = 60 '4px
  940.             imgClose.Top = 60
  941.         Case 2
  942.             imgMin.Top = 120 '8px
  943.             imgClose.Top = 120
  944.         Case 3
  945.             imgMin.Top = 180 '12px
  946.             imgClose.Top = 180
  947.         Case 4
  948.             imgMin.Top = imgRight.Height / 2 - imgMin.Height / 2
  949.             imgClose.Top = imgMin.Top
  950.     End Select
  951.     imgMin.Left = imgClose.Left - imgMin.Width
  952.     Select Case mTitleStyle
  953.     Case 0
  954.         imgLogo.Visible = False
  955.         If mTitleIconVisible = False Then
  956.             imgIcon.Visible = False
  957.         Else
  958.             imgIcon.Visible = True
  959.         End If
  960.         lblCaption.Visible = True
  961.     Case 1
  962.         imgLogo.Left = 200
  963.         imgLogo.Top = imgLeft.Height / 2 - imgLogo.Height / 2
  964.         imgLogo.Visible = True
  965.         imgIcon.Visible = False
  966.         lblCaption.Visible = False
  967.     Case 2
  968.         imgLogo.Left = lblCaption.Left + 50
  969.         imgLogo.Top = lblCaption.Top + lblCaption.Height + 50
  970.         imgLogo.Visible = True
  971.         lblCaption.Visible = True
  972.     End Select
  973.     Select Case mLinkIconSize
  974.         Case 0
  975.             imgWeb.Width = 240  ' 16x16 px
  976.             imgWeb.Height = 240
  977.         Case 1
  978.             imgWeb.Width = 300  ' 20x20 px
  979.             imgWeb.Height = 300
  980.         Case 2
  981.             imgWeb.Width = 360  ' 24x24 px
  982.             imgWeb.Height = 360
  983.         Case 3
  984.             imgWeb.Width = 480  ' 32x32 px
  985.             imgWeb.Height = 480
  986.         Case 4
  987.             imgWeb.Width = 720  ' 48x48 px
  988.             imgWeb.Height = 720
  989.     End Select
  990.     imgWeb.Left = mLinkLeft
  991.     imgWeb.Top = mLinkTop
  992.     lblWeb.Top = imgWeb.Top + imgWeb.Height / 2 - lblWeb.Height / 2
  993.     lblWeb.Left = imgWeb.Left + imgWeb.Width + 120
  994.     lblWeb.ForeColor = mLinkForeColorUp
  995.     lblWeb.Visible = mLinkVisible
  996.     imgWeb.Visible = mLinkVisible
  997.     Select Case mLinkMouseIcon
  998.         Case 0
  999.             lblWeb.MousePointer = 0
  1000.             Set lblWeb.MouseIcon = Nothing
  1001.         Case 1
  1002.             lblWeb.MousePointer = 99
  1003.             ' Cursor with hotspot
  1004.             lblWeb.MouseIcon = imgHand.Picture
  1005.         Case 2
  1006.             lblWeb.MousePointer = 99
  1007.             ' Cursor with hotspot
  1008.             lblWeb.MouseIcon = imgHand2.Picture
  1009.     End Select
  1010.     Select Case mMinCloseCursor
  1011.         Case 0
  1012.             imgMin.MousePointer = 0
  1013.             Set imgMin.MouseIcon = Nothing
  1014.             imgClose.MousePointer = 0
  1015.             Set imgClose.MouseIcon = Nothing
  1016.         Case 1
  1017.             imgMin.MousePointer = 99
  1018.             ' Cursor with hotspot
  1019.             imgMin.MouseIcon = imgHand.Picture
  1020.             imgClose.MousePointer = 99
  1021.             imgClose.MouseIcon = imgHand.Picture
  1022.         Case 2
  1023.             imgMin.MousePointer = 99
  1024.             ' Cursor with hotspot
  1025.             imgMin.MouseIcon = imgHand2.Picture
  1026.             imgClose.MousePointer = 99
  1027.             imgClose.MouseIcon = imgHand2.Picture
  1028.     End Select
  1029.     leftBorder.Stretch = True
  1030.     leftBorder.Left = 0
  1031.     leftBorder.Top = imgLeft.Height
  1032.     leftBorder.Height = UserControl.Height - imgLeft.Height
  1033.     rightBorder.Stretch = True
  1034.     rightBorder.Left = UserControl.Width - rightBorder.Width
  1035.     rightBorder.Top = leftBorder.Top
  1036.     rightBorder.Height = leftBorder.Height
  1037.     bottomBorder.Stretch = True
  1038.     bottomBorder.Left = leftBorder.Width
  1039.     bottomBorder.Top = UserControl.Height - bottomBorder.Height
  1040.     bottomBorder.Width = UserControl.Width - leftBorder.Width - rightBorder.Width
  1041.     
  1042. End Sub
  1043.  
  1044. Private Sub UserControl_Show()
  1045.     TitleCaption = mTitleCaption
  1046.     LinkCaption = mLinkCaption
  1047.     TitleIconVisible = mTitleIconVisible
  1048.     'MinCloseTop = mMinCloseTop
  1049.     TitleFontColor = mTitleFontColor
  1050.     Transparency UserControl.Parent, mColorTransp1R, mColorTransp2G, ColorTransp3B
  1051.     'Give the form the same
  1052.     'Icon and Caption as your Titlebar
  1053.     UserControl.Parent.Caption = TitleCaption
  1054.     UserControl.Parent.Icon = imgIcon.Picture
  1055.     UserControl_Resize
  1056. End Sub
  1057.  
  1058. Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
  1059.     PropBag.WriteProperty "LinkIconSize", mLinkIconSize, mDefLinkIconSize
  1060.     PropBag.WriteProperty "LinkUnderlined", mLinkUnderlined, mDefLinkUnderlined
  1061.     PropBag.WriteProperty "LinkTop", mLinkTop, mDefLinkTop
  1062.     PropBag.WriteProperty "LinkLeft", mLinkLeft, mDefLinkLeft
  1063.     PropBag.WriteProperty "MinCloseCursor", mMinCloseCursor, mDefMinCloseCursor
  1064.     PropBag.WriteProperty "MinCloseTop", mMinCloseTop, mDefMinCloseTop
  1065.     PropBag.WriteProperty "BackColor", UserControl.BackColor, Ambient.BackColor
  1066.     PropBag.WriteProperty "ToolTipTextMin", mToolTipTextMin, mDefToolTipTextMin
  1067.     PropBag.WriteProperty "ToolTipTextClose", mToolTipTextClose, mDefToolTipTextClose
  1068.     PropBag.WriteProperty "ToolTipTextWeblink", lblWeb.ToolTipText, ""
  1069.     PropBag.WriteProperty "LinkMouseIcon", mLinkMouseIcon, mDefLinkMouseIcon
  1070.     PropBag.WriteProperty "LinkVisible", mLinkVisible, mDefLinkVisible
  1071.     PropBag.WriteProperty "Link", mLink, mDefLink
  1072.     PropBag.WriteProperty "LinkFont", lblWeb.Font, Ambient.Font
  1073.     PropBag.WriteProperty "LinkForeColorUp", mLinkForeColorUp, mDefLinkForeColorUp
  1074.     PropBag.WriteProperty "LinkForeColorOver", mLinkForeColorOver, mDefLinkForeColorOver
  1075.     PropBag.WriteProperty "LinkIcon", imgWeb.Picture, Nothing
  1076.     PropBag.WriteProperty "Logo", imgLogo.Picture, Nothing
  1077.     PropBag.WriteProperty "TitleStyle", mTitleStyle, mDefTitleStyle
  1078.     PropBag.WriteProperty "LinkCaption", mLinkCaption, mDefLinkCaption
  1079.     PropBag.WriteProperty "TitleIcon", imgIcon.Picture, Nothing
  1080.     PropBag.WriteProperty "TitleIconVisible", mTitleIconVisible, mDefTitleIconVisible
  1081.     PropBag.WriteProperty "TitleIconSize", mTitleIconSize, mDefTitleIconSize
  1082.     PropBag.WriteProperty "TitleCaption", mTitleCaption, mDefTitleCaption
  1083.     PropBag.WriteProperty "MinButton", mMinButton, mDefMinButton
  1084.     PropBag.WriteProperty "TitleFont", lblCaption.Font, Ambient.Font
  1085.     PropBag.WriteProperty "ColorTransp1R", mColorTransp1R, mDefColorTransp1R
  1086.     PropBag.WriteProperty "ColorTransp2G", mColorTransp2G, mdefColorTransp2G
  1087.     PropBag.WriteProperty "ColorTransp3B", mColorTransp3B, mDefColorTransp3B
  1088.     PropBag.WriteProperty "TitleFontColor", mTitleFontColor, mDefTitleFontColor
  1089.     'Skinning pictures
  1090.     PropBag.WriteProperty "ImageBorderLeft", leftBorder.Picture, Nothing
  1091.     PropBag.WriteProperty "ImageBorderBottom", bottomBorder.Picture, Nothing
  1092.     PropBag.WriteProperty "ImageBorderRight", rightBorder.Picture, Nothing
  1093.     PropBag.WriteProperty "ImageCloseOnlyUp", closeOnlyMain.Picture, Nothing
  1094.     PropBag.WriteProperty "ImageCloseOnlyOver", closeOnlyOver.Picture, Nothing
  1095.     PropBag.WriteProperty "ImageCloseOnlyDown", closeOnlyDown.Picture, Nothing
  1096.     PropBag.WriteProperty "ImageClose1Up", closeMain.Picture, Nothing
  1097.     PropBag.WriteProperty "ImageClose1Over", closeOver.Picture, Nothing
  1098.     PropBag.WriteProperty "ImageClose1Down", closeDown.Picture, Nothing
  1099.     PropBag.WriteProperty "ImageMinUp", minMain.Picture, Nothing
  1100.     PropBag.WriteProperty "ImageMinOver", minOver.Picture, Nothing
  1101.     PropBag.WriteProperty "ImageMinDown", minDown.Picture, Nothing
  1102.     PropBag.WriteProperty "ImageTBRight", imgRight.Picture, Nothing
  1103.     PropBag.WriteProperty "ImageTBMiddle", imgMiddle.Picture, Nothing
  1104.     PropBag.WriteProperty "ImageTBLeft", imgLeft.Picture, Nothing
  1105. End Sub
  1106.  
  1107.  
  1108. 'Skinning Pictures Propertys
  1109. Public Property Get ImageTBLeft() As Picture
  1110.     Set ImageTBLeft = imgLeft.Picture
  1111. End Property
  1112.  
  1113. Public Property Set ImageTBLeft(ByVal NewImageTBLeft As Picture)
  1114.     Set imgLeft.Picture = NewImageTBLeft
  1115.     PropertyChanged "ImageTBLeft"
  1116.     UserControl_Resize
  1117. End Property
  1118.  
  1119. Public Property Get ImageTBMiddle() As Picture
  1120.     Set ImageTBMiddle = imgMiddle.Picture
  1121. End Property
  1122.  
  1123. Public Property Set ImageTBMiddle(ByVal NewImageTBMiddle As Picture)
  1124.     Set imgMiddle.Picture = NewImageTBMiddle
  1125.     PropertyChanged "ImageTBMiddle"
  1126.     UserControl_Resize
  1127. End Property
  1128.  
  1129. Public Property Get ImageTBRight() As Picture
  1130.     Set ImageTBRight = imgRight.Picture
  1131. End Property
  1132.  
  1133. Public Property Set ImageTBRight(ByVal NewImageTBRight As Picture)
  1134.     Set imgRight.Picture = NewImageTBRight
  1135.     PropertyChanged "ImageTBRight"
  1136.     UserControl_Resize
  1137. End Property
  1138.  
  1139. Public Property Get ImageMinUp() As Picture
  1140.     Set ImageMinUp = minMain.Picture
  1141. End Property
  1142.  
  1143. Public Property Set ImageMinUp(ByVal NewImageMinUp As Picture)
  1144.     Set minMain.Picture = NewImageMinUp
  1145.     PropertyChanged "ImageMinUp"
  1146.     UserControl_Resize
  1147. End Property
  1148.  
  1149. Public Property Get ImageMinOver() As Picture
  1150.     Set ImageMinOver = minOver.Picture
  1151. End Property
  1152.  
  1153. Public Property Set ImageMinOver(ByVal NewImageMinOver As Picture)
  1154.     Set minOver.Picture = NewImageMinOver
  1155.     PropertyChanged "ImageMinOver"
  1156. End Property
  1157.  
  1158. Public Property Get ImageMinDown() As Picture
  1159.     Set ImageMinDown = minDown.Picture
  1160. End Property
  1161.  
  1162. Public Property Set ImageMinDown(ByVal NewImageMinDown As Picture)
  1163.     Set minDown.Picture = NewImageMinDown
  1164.     PropertyChanged "ImageMinDown"
  1165. End Property
  1166.  
  1167. Public Property Get ImageClose1Up() As Picture
  1168.     Set ImageClose1Up = closeMain.Picture
  1169. End Property
  1170.  
  1171. Public Property Set ImageClose1Up(ByVal NewImageClose1Up As Picture)
  1172.     Set closeMain.Picture = NewImageClose1Up
  1173.     PropertyChanged "ImageClose1Up"
  1174.     UserControl_Resize
  1175. End Property
  1176.  
  1177. Public Property Get ImageClose1Over() As Picture
  1178.     Set ImageClose1Over = closeOver.Picture
  1179. End Property
  1180.  
  1181. Public Property Set ImageClose1Over(ByVal NewImageClose1Over As Picture)
  1182.     Set closeOver.Picture = NewImageClose1Over
  1183.     PropertyChanged "ImageClose1Over"
  1184. End Property
  1185.  
  1186. Public Property Get ImageClose1Down() As Picture
  1187.     Set ImageClose1Down = closeDown.Picture
  1188. End Property
  1189.  
  1190. Public Property Set ImageClose1Down(ByVal NewImageClose1Down As Picture)
  1191.     Set closeDown.Picture = NewImageClose1Down
  1192.     PropertyChanged "ImageClose1Down"
  1193. End Property
  1194.  
  1195. Public Property Get ImageCloseOnlyUp() As Picture
  1196.     Set ImageCloseOnlyUp = closeOnlyMain.Picture
  1197. End Property
  1198.  
  1199. Public Property Set ImageCloseOnlyUp(ByVal NewImageCloseOnlyUp As Picture)
  1200.     Set closeOnlyMain.Picture = NewImageCloseOnlyUp
  1201.     PropertyChanged "ImageCloseOnlyUp"
  1202.     UserControl_Resize
  1203. End Property
  1204.  
  1205. Public Property Get ImageCloseOnlyOver() As Picture
  1206.     Set ImageCloseOnlyOver = closeOnlyOver.Picture
  1207. End Property
  1208.  
  1209. Public Property Set ImageCloseOnlyOver(ByVal NewImageCloseOnlyOver As Picture)
  1210.     Set closeOnlyOver = NewImageCloseOnlyOver
  1211.     PropertyChanged "ImageCloseOnlyOver"
  1212. End Property
  1213.  
  1214. Public Property Get ImageCloseOnlyDown() As Picture
  1215.     Set ImageCloseOnlyDown = closeOnlyDown.Picture
  1216. End Property
  1217.  
  1218. Public Property Set ImageCloseOnlyDown(ByVal NewImageCloseOnlyDown As Picture)
  1219.     Set closeOnlyDown.Picture = NewImageCloseOnlyDown
  1220.     PropertyChanged "ImageCloseOnlyDown"
  1221. End Property
  1222.  
  1223. Public Property Get ImageBorderLeft() As Picture
  1224.     Set ImageBorderLeft = leftBorder.Picture
  1225. End Property
  1226.  
  1227. Public Property Set ImageBorderLeft(ByVal NewImageBorderLeft As Picture)
  1228.     Set leftBorder.Picture = NewImageBorderLeft
  1229.     PropertyChanged "ImageBorderLeft"
  1230.     UserControl_Resize
  1231. End Property
  1232.  
  1233. Public Property Get ImageBorderBottom() As Picture
  1234.     Set ImageBorderBottom = bottomBorder.Picture
  1235. End Property
  1236.  
  1237. Public Property Set ImageBorderBottom(ByVal NewImageBorderBottom As Picture)
  1238.     Set bottomBorder.Picture = NewImageBorderBottom
  1239.     PropertyChanged "ImageBorderBottom"
  1240.     UserControl_Resize
  1241. End Property
  1242.  
  1243. Public Property Get ImageBorderRight() As Picture
  1244.     Set ImageBorderRight = rightBorder.Picture
  1245. End Property
  1246.  
  1247. Public Property Set ImageBorderRight(ByVal NewImageBorderRight As Picture)
  1248.     Set rightBorder.Picture = NewImageBorderRight
  1249.     PropertyChanged "ImageBorderRight"
  1250.     UserControl_Resize
  1251. End Property
  1252.  
  1253. Sub ShowAboutBox()
  1254. Attribute ShowAboutBox.VB_UserMemId = -552
  1255.     frmAbout.Show vbModal
  1256.     Unload frmAbout
  1257.     Set frmAbout = Nothing
  1258. End Sub
  1259.