Skip to content

Commit

Permalink
BackColor default change/Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fafalone authored May 17, 2024
1 parent d891566 commit ec53727
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ucAniGif.twin
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[Description("${ProjectName}.${ComponentName}")]
Class ucAniGif

'ucAniGif v1.0.2
'ucAniGif v1.0.3
'by Jon Johnson (fafalone)
'
'Licensed under the MIT license
Expand All @@ -15,6 +15,7 @@ Class ucAniGif
'
'Updates:
'
'v1.0.3 (17 May 2024) - Back color not saved properly; now defaults to default UF BackColor.
'v1.0.2 (17 May 2024) - Back color wasn't initialized properly.
'

Expand All @@ -31,7 +32,7 @@ Private Const mDefLoop As Boolean = True
Private mFile As String

Private mBk As Long
Private Const mDefBk As Long = &HFFFFFF
Private Const mDefBk As Long = &H8000000F

Private mAuto As Boolean
Private Const mDefAuto As Boolean = False
Expand All @@ -57,6 +58,7 @@ Private Sub UserControl_ReadProperties(PropBag As PropertyBag) Handles UserContr
'mLoop = PropBag.ReadProperty("Loop", mDefLoop)
mAuto = PropBag.ReadProperty("Autoplay", mDefAuto)
mSize = PropBag.ReadProperty("SizeToFit", mDefSize)
mBk = PropBag.ReadProperty("BackColor", mDefBk)
If mInit = False Then
Init
End If
Expand All @@ -67,13 +69,15 @@ Private Sub UserControl_WriteProperties(PropBag As PropertyBag) Handles UserCont
'PropBag.WriteProperty "Loop", mLoop, mDefLoop
PropBag.WriteProperty "Autoplay", mAuto, mDefAuto
PropBag.WriteProperty "SizeToFit", mSize, mDefSize
PropBag.WriteProperty "BackColor", mBk, mDefBk
End Sub

Private Sub UserControl_InitProperties() Handles UserControl.InitProperties
mLoop = mDefLoop
mAuto = mDefAuto
mSize = mDefSize
mBk = mDefBk
UserControl.BackColor = mBk
End Sub

Private Sub UserControl_Show() Handles UserControl.Show
Expand Down
Binary file modified ucAniGif.twinproj
Binary file not shown.
Binary file modified ucAniGifTest.twinproj
Binary file not shown.

0 comments on commit ec53727

Please sign in to comment.