Blame | Last modification | View Log
VERSION 5.00Begin VB.UserControl jjShadeFormAppearance = 0 'FlatBackColor = &H80000005&CanGetFocus = 0 'FalseClientHeight = 435ClientLeft = 0ClientTop = 0ClientWidth = 435ClipControls = 0 'FalseHasDC = 0 'FalseInvisibleAtRuntime= -1 'TruePicture = "jjShadeForm.ctx":0000ScaleHeight = 29ScaleMode = 3 'PixelScaleWidth = 29ToolboxBitmap = "jjShadeForm.ctx":0A3ABegin VB.Timer tmr1Enabled = 0 'FalseInterval = 1Left = 60Top = 135EndEndAttribute VB_Name = "jjShadeForm"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = TrueAttribute VB_PredeclaredId = FalseAttribute VB_Exposed = FalseOption ExplicitPublic Enum jjDestinasjonjj_Formjj_PictureBoxEnd EnumPublic Enum jjFadeTypejj_LeftRightjj_TopBottomjj_TriangelEnd Enum'For Triangel-fargefyllPrivate Type TRIANGEL_COLORColorTL As LongColorTR As LongColorBL As LongColorBR As LongEnd Type'For Gradient-fargefyllPrivate Type GRADIENT_COLORColorFrom As LongColorTo As LongEnd TypePrivate Type RECTLeft As LongTop As LongRight As LongBottom As LongEnd TypePrivate Type GRADIENT_TRIANGLEVertex1 As LongVertex2 As LongVertex3 As LongEnd TypePrivate Type TRIVERTEXX As LongY As Longred As Integergreen As Integerblue As IntegerAlpha As IntegerEnd TypePrivate Type GRADIENT_RECTUpperLeft As LongLowerRight As LongEnd TypeConst GRADIENT_FILL_RECT_H As Long = &H0Const GRADIENT_FILL_RECT_V As Long = &H1Const GRADIENT_FILL_TRIANGLE As Long = &H2Private Declare Function GradientFillTriangle Lib "msimg32" Alias "GradientFill" (ByVal hdc As Long, pVertex As TRIVERTEX, ByVal dwNumVertex As Long, pMesh As GRADIENT_TRIANGLE, ByVal dwNumMesh As Long, ByVal dwMode As Long) As LongPrivate Declare Function GradientFill Lib "msimg32" (ByVal hdc As Long, pVertex As TRIVERTEX, ByVal dwNumVertex As Long, pMesh As GRADIENT_RECT, ByVal dwNumMesh As Long, ByVal dwMode As Long) As LongPrivate Declare Sub OleTranslateColor Lib "oleaut32.dll" (ByVal clr As Long, ByVal hpal As Long, ByRef lpcolorref As Long)Private Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As LongPrivate Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long'Private Declare Function FrameRgn Lib "gdi32" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long, ByVal nWidth As Long, ByVal nHeight As Long) As LongPrivate Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long'Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As LongPrivate Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long'Flytte til et punkt og tegne linjerPrivate Type POINTAPIX As LongY As LongEnd TypePrivate Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, lpPoint As POINTAPI) As LongPrivate Declare Function LineTo Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long) As LongPrivate Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long) As LongPrivate Const PS_SOLID = 0'Default Property Values:Const m_def_BorderColor = 0Const m_def_Border = 0Const m_def_MakeRegion = 0Const m_def_FadeDouble = 0Const m_def_Destinasjon = 0Const m_def_FadeType = 0Const m_def_ColorA = vbWhiteConst m_def_ColorB = vbYellowConst m_def_TriColorTL = &HC0E0FFConst m_def_TriColorTR = &HC0FFFFConst m_def_TriColorBL = &H80C0FFConst m_def_TriColorBR = &H80FFFFConst m_def_FadeEnabled = 0'Property Variables:Dim m_BorderColor As OLE_COLORDim m_Border As BooleanDim m_MakeRegion As BooleanDim m_FadeDouble As BooleanDim m_BoxName As PictureBoxDim m_Destinasjon As LongDim m_FadeType As IntegerDim m_ColorA As OLE_COLORDim m_ColorB As OLE_COLORDim m_TriColorTL As OLE_COLORDim m_TriColorTR As OLE_COLORDim m_TriColorBL As OLE_COLORDim m_TriColorBR As OLE_COLORDim m_FadeEnabled As BooleanDim ExtWidth As LongDim ExtHeight As LongPrivate Sub FadeGradient(Farge As GRADIENT_COLOR, LeftRight As Boolean, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long)On Error GoTo PROC_ERRDim gRect As GRADIENT_RECTDim Vert(1) As TRIVERTEXDim f As IntegerDim rgbRed(1) As Long, rgbGreen(1) As Long, rgbBlue(1) As LongDim rHex(1) As String, gHex(1) As String, bHex(1) As StringDim Retning As LongFor f = 0 To 1Select Case fCase Is = 0'Konverter FraFargen til RGBrgbRed(f) = Farge.ColorFrom Mod 256rgbGreen(f) = ((Farge.ColorFrom And &HFF00FF00) / 256)rgbBlue(f) = (Farge.ColorFrom And &HFF0000) / 65536Case Is = 1'Konverter TilFargen til RGBrgbRed(f) = Farge.ColorTo Mod 256rgbGreen(f) = ((Farge.ColorTo And &HFF00FF00) / 256)rgbBlue(f) = (Farge.ColorTo And &HFF0000) / 65536End Select'Gang RGB sin verdi med 256 for å tilpasse maksverdien til GradientFill sin maksverdi som er 65280rgbRed(f) = rgbRed(f) * 256rgbGreen(f) = rgbGreen(f) * 256rgbBlue(f) = rgbBlue(f) * 256'Konverter de nye verdiene til Hex verdierrHex(f) = "&h" & Hex(rgbRed(f))gHex(f) = "&h" & Hex(rgbGreen(f))bHex(f) = "&h" & Hex(rgbBlue(f))Next f'Fra-fargeVert(0).X = X1Vert(0).Y = Y1Vert(0).red = rHex(0)Vert(0).green = gHex(0)Vert(0).blue = bHex(0)Vert(0).Alpha = 0&'Til-fargeVert(1).X = X2Vert(1).Y = Y2Vert(1).red = rHex(1)Vert(1).green = gHex(1)Vert(1).blue = bHex(1)Vert(1).Alpha = 0&'Rektangelets ytterpunktergRect.UpperLeft = 0gRect.LowerRight = 1'Retning på fadingIf LeftRight = False ThenRetning = GRADIENT_FILL_RECT_VElseRetning = GRADIENT_FILL_RECT_HEnd If'APIIf m_Destinasjon = jj_Form ThenGradientFill Extender.Parent.hdc, Vert(0), 2, gRect, 1, RetningExtender.Parent.RefreshElseIf m_Destinasjon = jj_PictureBox ThenGradientFill m_BoxName.hdc, Vert(0), 2, gRect, 1, Retningm_BoxName.RefreshEnd IfPROC_EXIT:Exit SubPROC_ERR:If Err.Number = 91 Then GoTo PROC_EXITEnd SubPrivate Sub FadeTriangel(Farge As TRIANGEL_COLOR, jRect As RECT)On Error GoTo PROC_ERRDim Vert(3) As TRIVERTEXDim Tri(3) As GRADIENT_TRIANGLEDim f As IntegerDim rgbRed(3) As Long, rgbGreen(3) As Long, rgbBlue(3) As LongDim rHex(3) As String, gHex(3) As String, bHex(3) As StringFor f = 0 To 3Select Case fCase Is = 0'Konverter til RGBrgbRed(f) = Farge.ColorTL Mod 256rgbGreen(f) = ((Farge.ColorTL And &HFF00FF00) / 256)rgbBlue(f) = (Farge.ColorTL And &HFF0000) / 65536Case Is = 1'Konverter til RGBrgbRed(f) = Farge.ColorTR Mod 256rgbGreen(f) = ((Farge.ColorTR And &HFF00FF00) / 256)rgbBlue(f) = (Farge.ColorTR And &HFF0000) / 65536Case Is = 2'Konverter til RGBrgbRed(f) = Farge.ColorBR Mod 256rgbGreen(f) = ((Farge.ColorBR And &HFF00FF00) / 256)rgbBlue(f) = (Farge.ColorBR And &HFF0000) / 65536Case Is = 3'Konverter til RGBrgbRed(f) = Farge.ColorBL Mod 256rgbGreen(f) = ((Farge.ColorBL And &HFF00FF00) / 256)rgbBlue(f) = (Farge.ColorBL And &HFF0000) / 65536End Select'Gang RGB sin verdi med 256 for å tilpasse maksverdien til GradientFillTriangle sin maksverdi som er 65280rgbRed(f) = rgbRed(f) * 256rgbGreen(f) = rgbGreen(f) * 256rgbBlue(f) = rgbBlue(f) * 256'Konverter de nye verdiene til Hex verdierrHex(f) = "&h" & Hex(rgbRed(f))gHex(f) = "&h" & Hex(rgbGreen(f))bHex(f) = "&h" & Hex(rgbBlue(f))Next f'Venstre øverstVert(0).X = jRect.LeftVert(0).Y = jRect.TopVert(0).red = rHex(0)Vert(0).green = gHex(0)Vert(0).blue = bHex(0)Vert(0).Alpha = 0&'Høyre øverstVert(1).X = jRect.RightVert(1).Y = jRect.TopVert(1).red = rHex(1)Vert(1).green = gHex(1)Vert(1).blue = bHex(1)Vert(1).Alpha = 0&'Høyre nederstVert(2).X = jRect.RightVert(2).Y = jRect.BottomVert(2).red = rHex(2)Vert(2).green = gHex(2)Vert(2).blue = bHex(2)Vert(2).Alpha = 0&'Venstre nederstVert(3).X = jRect.LeftVert(3).Y = jRect.BottomVert(3).red = rHex(3)Vert(3).green = gHex(3)Vert(3).blue = bHex(3)Vert(3).Alpha = 0&Tri(0).Vertex1 = 0Tri(0).Vertex2 = 1Tri(0).Vertex3 = 2Tri(1).Vertex1 = 0Tri(1).Vertex2 = 2Tri(1).Vertex3 = 3Tri(2).Vertex1 = 1Tri(2).Vertex2 = 2Tri(2).Vertex3 = 3Tri(3).Vertex1 = 0Tri(3).Vertex2 = 1Tri(3).Vertex3 = 3'APIIf m_Destinasjon = jj_Form ThenGradientFillTriangle Extender.Parent.hdc, Vert(0), 4, Tri(0), 4, GRADIENT_FILL_TRIANGLEExtender.Parent.RefreshElseIf m_Destinasjon = jj_PictureBox ThenGradientFillTriangle m_BoxName.hdc, Vert(0), 4, Tri(0), 4, GRADIENT_FILL_TRIANGLEm_BoxName.RefreshEnd IfPROC_EXIT:Exit SubPROC_ERR:If Err.Number = 91 Then GoTo PROC_EXITEnd SubPrivate Function TranslateColor(aColor As OLE_COLOR) As LongDim newcolor As LongOleTranslateColor aColor, UserControl.Palette, newcolorTranslateColor = newcolorEnd Function'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=7,0,0,0Public Property Get FadeType() As jjFadeTypeAttribute FadeType.VB_Description = "Velg graderingstype, Topp-bunn, Venstre-høyre eller Triangel som er en firkant med valgfri farge i hvert hjørne."FadeType = m_FadeTypeEnd PropertyPublic Property Let FadeType(ByVal New_FadeType As jjFadeType)m_FadeType = New_FadeTypePropertyChanged "FadeType"Call FadeEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=10,0,0,0Public Property Get ColorA() As OLE_COLORAttribute ColorA.VB_Description = "Fra farge på vanlig gradering."ColorA = m_ColorAEnd PropertyPublic Property Let ColorA(ByVal New_ColorA As OLE_COLOR)m_ColorA = New_ColorAPropertyChanged "ColorA"Call FadeEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=10,0,0,0Public Property Get ColorB() As OLE_COLORAttribute ColorB.VB_Description = "Til farge på vanlig gradering."ColorB = m_ColorBEnd PropertyPublic Property Let ColorB(ByVal New_ColorB As OLE_COLOR)m_ColorB = New_ColorBPropertyChanged "ColorB"Call FadeEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=10,0,0,0Public Property Get TriColorTL() As OLE_COLORAttribute TriColorTL.VB_Description = "Farge til Triangelgradering, topp-venstre."TriColorTL = m_TriColorTLEnd PropertyPublic Property Let TriColorTL(ByVal New_TriColorTL As OLE_COLOR)m_TriColorTL = New_TriColorTLPropertyChanged "TriColorTL"Call FadeEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=10,0,0,0Public Property Get TriColorTR() As OLE_COLORAttribute TriColorTR.VB_Description = "Farge til Triangelgradering, topp-høyre."TriColorTR = m_TriColorTREnd PropertyPublic Property Let TriColorTR(ByVal New_TriColorTR As OLE_COLOR)m_TriColorTR = New_TriColorTRPropertyChanged "TriColorTR"Call FadeEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=10,0,0,0Public Property Get TriColorBL() As OLE_COLORAttribute TriColorBL.VB_Description = "Farge til Triangelgradering, bunn-venstre."TriColorBL = m_TriColorBLEnd PropertyPublic Property Let TriColorBL(ByVal New_TriColorBL As OLE_COLOR)m_TriColorBL = New_TriColorBLPropertyChanged "TriColorBL"Call FadeEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=10,0,0,0Public Property Get TriColorBR() As OLE_COLORAttribute TriColorBR.VB_Description = "Farge til Triangelgradering, bunn-høyre."TriColorBR = m_TriColorBREnd PropertyPublic Property Let TriColorBR(ByVal New_TriColorBR As OLE_COLOR)m_TriColorBR = New_TriColorBRPropertyChanged "TriColorBR"Call FadeEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=0,0,0,0Public Property Get FadeEnabled() As BooleanAttribute FadeEnabled.VB_Description = "Slår fading av/på."FadeEnabled = m_FadeEnabledEnd PropertyPublic Property Let FadeEnabled(ByVal New_FadeEnabled As Boolean)m_FadeEnabled = New_FadeEnabledPropertyChanged "FadeEnabled"Call FadeEnd PropertyPrivate Sub tmr1_Timer()tmr1.Enabled = FalseCall FadeEnd Sub'Initialize Properties for User ControlPrivate Sub UserControl_InitProperties()m_FadeType = m_def_FadeTypem_ColorA = m_def_ColorAm_ColorB = m_def_ColorBm_TriColorTL = m_def_TriColorTLm_TriColorTR = m_def_TriColorTRm_TriColorBL = m_def_TriColorBLm_TriColorBR = m_def_TriColorBRm_FadeEnabled = m_def_FadeEnabledm_Destinasjon = m_def_Destinasjonm_FadeDouble = m_def_FadeDoublem_MakeRegion = m_def_MakeRegionm_Border = m_def_Borderm_BorderColor = m_def_BorderColorEnd Sub'Load property values from storagePrivate Sub UserControl_ReadProperties(PropBag As PropertyBag)m_FadeType = PropBag.ReadProperty("FadeType", m_def_FadeType)m_ColorA = PropBag.ReadProperty("ColorA", m_def_ColorA)m_ColorB = PropBag.ReadProperty("ColorB", m_def_ColorB)m_TriColorTL = PropBag.ReadProperty("TriColorTL", m_def_TriColorTL)m_TriColorTR = PropBag.ReadProperty("TriColorTR", m_def_TriColorTR)m_TriColorBL = PropBag.ReadProperty("TriColorBL", m_def_TriColorBL)m_TriColorBR = PropBag.ReadProperty("TriColorBR", m_def_TriColorBR)m_FadeEnabled = PropBag.ReadProperty("FadeEnabled", m_def_FadeEnabled)m_Destinasjon = PropBag.ReadProperty("Destinasjon", m_def_Destinasjon)Set m_BoxName = PropBag.ReadProperty("BoxName", Nothing)m_FadeDouble = PropBag.ReadProperty("FadeDouble", m_def_FadeDouble)m_MakeRegion = PropBag.ReadProperty("MakeRegion", m_def_MakeRegion)m_Border = PropBag.ReadProperty("Border", m_def_Border)m_BorderColor = PropBag.ReadProperty("BorderColor", m_def_BorderColor)End SubPrivate Sub UserControl_Resize()UserControl.Width = 435UserControl.Height = 435End Sub'Write property values to storagePrivate Sub UserControl_WriteProperties(PropBag As PropertyBag)Call PropBag.WriteProperty("FadeType", m_FadeType, m_def_FadeType)Call PropBag.WriteProperty("ColorA", m_ColorA, m_def_ColorA)Call PropBag.WriteProperty("ColorB", m_ColorB, m_def_ColorB)Call PropBag.WriteProperty("TriColorTL", m_TriColorTL, m_def_TriColorTL)Call PropBag.WriteProperty("TriColorTR", m_TriColorTR, m_def_TriColorTR)Call PropBag.WriteProperty("TriColorBL", m_TriColorBL, m_def_TriColorBL)Call PropBag.WriteProperty("TriColorBR", m_TriColorBR, m_def_TriColorBR)Call PropBag.WriteProperty("FadeEnabled", m_FadeEnabled, m_def_FadeEnabled)Call PropBag.WriteProperty("Destinasjon", m_Destinasjon, m_def_Destinasjon)Call PropBag.WriteProperty("BoxName", m_BoxName, Nothing)Call PropBag.WriteProperty("FadeDouble", m_FadeDouble, m_def_FadeDouble)Call PropBag.WriteProperty("MakeRegion", m_MakeRegion, m_def_MakeRegion)Call PropBag.WriteProperty("Border", m_Border, m_def_Border)Call PropBag.WriteProperty("BorderColor", m_BorderColor, m_def_BorderColor)End SubPrivate Sub ShadeGradient(LeftRight As Boolean)On Error GoTo PROC_ERRDim Farger As GRADIENT_COLOR'FormIf m_Destinasjon = jj_Form ThenExtWidth = Extender.Parent.ScaleX(Extender.Parent.ScaleWidth, Extender.Parent.ScaleMode, vbPixels)ExtHeight = Extender.Parent.ScaleY(Extender.Parent.ScaleHeight, Extender.Parent.ScaleMode, vbPixels)'PicturBoxElseIf m_Destinasjon = jj_PictureBox ThenExtWidth = m_BoxName.ScaleX(m_BoxName.ScaleWidth, m_BoxName.ScaleMode, vbPixels)ExtHeight = m_BoxName.ScaleY(m_BoxName.ScaleHeight, m_BoxName.ScaleMode, vbPixels)End If'FadeFargeFarger.ColorFrom = TranslateColor(m_ColorA)Farger.ColorTo = TranslateColor(m_ColorB)'EnkelFadeIf m_FadeDouble = False ThenCall FadeGradient(Farger, LeftRight, 0, 0, ExtWidth, ExtHeight)'DobbelFadeElse'ToppBunnIf LeftRight = False ThenCall FadeGradient(Farger, LeftRight, 0, 0, ExtWidth, ExtHeight / 2)Farger.ColorTo = TranslateColor(m_ColorA)Farger.ColorFrom = TranslateColor(m_ColorB)Call FadeGradient(Farger, LeftRight, 0, ExtHeight / 2, ExtWidth, ExtHeight)'VentreHøyreElseCall FadeGradient(Farger, LeftRight, 0, 0, ExtWidth / 2, ExtHeight)Farger.ColorTo = TranslateColor(m_ColorA)Farger.ColorFrom = TranslateColor(m_ColorB)Call FadeGradient(Farger, LeftRight, ExtWidth / 2, 0, ExtWidth, ExtHeight)End IfEnd IfPROC_EXIT:Exit SubPROC_ERR:If Err.Number = 91 Then GoTo PROC_EXITEnd SubPrivate Sub ShadeTriangel()On Error GoTo PROC_ERRDim TriFarger As TRIANGEL_COLORDim rct As RECTTriFarger.ColorTL = TranslateColor(m_TriColorTL)TriFarger.ColorTR = TranslateColor(m_TriColorTR)TriFarger.ColorBL = TranslateColor(m_TriColorBL)TriFarger.ColorBR = TranslateColor(m_TriColorBR)rct.Left = 0rct.Top = 0If m_Destinasjon = jj_Form Thenrct.Right = Extender.Parent.ScaleX(Extender.Parent.ScaleWidth, Extender.Parent.ScaleMode, vbPixels)rct.Bottom = Extender.Parent.ScaleY(Extender.Parent.ScaleHeight, Extender.Parent.ScaleMode, vbPixels)ElseIf m_Destinasjon = jj_PictureBox Thenrct.Right = m_BoxName.ScaleX(m_BoxName.ScaleWidth, m_BoxName.ScaleMode, vbPixels)rct.Bottom = m_BoxName.ScaleY(m_BoxName.ScaleHeight, m_BoxName.ScaleMode, vbPixels)End IfCall FadeTriangel(TriFarger, rct)PROC_EXIT:Exit SubPROC_ERR:If Err.Number = 91 Then GoTo PROC_EXITEnd SubPrivate Sub Fade()On Error Resume NextDim hRgn As LongDim hPen As LongDim pnt As POINTAPIDim RammeFarge As Long'Clear destinasjonen om Enabled blir satt til FalseIf m_FadeEnabled = False ThenIf m_Destinasjon = jj_Form ThenExtender.Parent.ClsElseIf m_Destinasjon = jj_PictureBox Thenm_BoxName.ClsEnd If'Start valgt fading om enabled er satt til TrueElseIf FadeType = jj_LeftRight ThenCall ShadeGradient(True)ElseIf FadeType = jj_TopBottom ThenCall ShadeGradient(False)ElseIf FadeType = jj_Triangel ThenCall ShadeTriangelEnd IfEnd If'Tegn ramme om dette er valgt, ikke på form eller om region er valgtIf m_MakeRegion = False ThenIf m_Border = True ThenIf m_Destinasjon = jj_PictureBox ThenSetWindowRgn m_BoxName.hwnd, 0, TrueRammeFarge = TranslateColor(m_BorderColor)hPen = CreatePen(PS_SOLID, 1, RammeFarge)SelectObject m_BoxName.hdc, hPenMoveToEx m_BoxName.hdc, 0, 0, pntLineTo m_BoxName.hdc, ExtWidth - 1, 0LineTo m_BoxName.hdc, ExtWidth - 1, ExtHeight - 1LineTo m_BoxName.hdc, 0, ExtHeight - 1LineTo m_BoxName.hdc, 0, 0DeleteObject hPenm_BoxName.RefreshEnd IfEnd IfEnd If'Lag region om dette er valgt, bare på PictureBoxIf m_MakeRegion = True ThenIf m_Destinasjon = jj_PictureBox Then'ToppstrekhPen = CreatePen(PS_SOLID, 1, RGB(149, 183, 244))SelectObject m_BoxName.hdc, hPenMoveToEx m_BoxName.hdc, 0, 0, pntLineTo m_BoxName.hdc, ExtWidth, 0DeleteObject hPen'BunnstrekhPen = CreatePen(PS_SOLID, 1, RGB(49, 86, 147))SelectObject m_BoxName.hdc, hPenMoveToEx m_BoxName.hdc, 0, ExtHeight - 2, pntLineTo m_BoxName.hdc, ExtWidth, ExtHeight - 2DeleteObject hPenm_BoxName.Refresh'Lag regionhRgn = CreateRoundRectRgn(2, 0, ExtWidth - 1, ExtHeight, 5, 5)SetWindowRgn m_BoxName.hwnd, hRgn, TrueDeleteObject hRgnEnd IfEnd IfEnd Sub'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=17Public Function Refreshing() As AmbientPropertiestmr1.Enabled = TrueEnd Function'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=8,0,0,0Public Property Get Destinasjon() As jjDestinasjonAttribute Destinasjon.VB_Description = "Settes til Form eller PicturBox, velges PictureBox må BoxName settes i formens Load prosedyre."Destinasjon = m_DestinasjonEnd PropertyPublic Property Let Destinasjon(ByVal New_Destinasjon As jjDestinasjon)m_Destinasjon = New_DestinasjonPropertyChanged "Destinasjon"End Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=22,0,0,0Public Property Get BoxName() As PictureBoxSet BoxName = m_BoxNameEnd PropertyPublic Property Set BoxName(ByVal New_BoxName As PictureBox)Set m_BoxName = New_BoxNamePropertyChanged "BoxName"tmr1.Enabled = TrueEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=0,0,0,0Public Property Get FadeDouble() As BooleanAttribute FadeDouble.VB_Description = "Deler området i to og fader motsatt på siste del. Gjelder bare jj_Gradient."FadeDouble = m_FadeDoubleEnd PropertyPublic Property Let FadeDouble(ByVal New_FadeDouble As Boolean)m_FadeDouble = New_FadeDoublePropertyChanged "FadeDouble"Call FadeEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=0,0,0,0Public Property Get MakeRegion() As BooleanAttribute MakeRegion.VB_Description = "Lager avrundet region om det er valgt PictureBox"MakeRegion = m_MakeRegionEnd PropertyPublic Property Let MakeRegion(ByVal New_MakeRegion As Boolean)m_MakeRegion = New_MakeRegionPropertyChanged "MakeRegion"tmr1.Enabled = TrueEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=0,0,0,0Public Property Get Border() As BooleanAttribute Border.VB_Description = "Om destinasjon er en PictureBox kan det tegnes en tynn ramme på denne. Velg BorderColor for farge på rammen."Border = m_BorderEnd PropertyPublic Property Let Border(ByVal New_Border As Boolean)m_Border = New_BorderPropertyChanged "Border"tmr1.Enabled = TrueEnd Property'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!'MemberInfo=10,0,0,0Public Property Get BorderColor() As OLE_COLORAttribute BorderColor.VB_Description = "Farge på rammen om Border er satt til True."BorderColor = m_BorderColorEnd PropertyPublic Property Let BorderColor(ByVal New_BorderColor As OLE_COLOR)m_BorderColor = New_BorderColorPropertyChanged "BorderColor"tmr1.Enabled = TrueEnd Property