VB Code:
Private Sub lblLink_Click(Index As Integer)
Dim imgHandle As Long: imgHandle = -1
Dim strHeading As String, strContent As String
Set callingForm = Me
Select Case True
Case Index = 0 Or Index = 1:
[b]imgHandle = getAddressOf(AddressOf modScreenShot1.getFile)[/b]
strHeading = "Create & Share Folder"
strContent = STR_DOC_1
Case Index = 3:
[b]imgHandle = getAddressOf(AddressOf modScreenShot3.getFile)[/b]
strHeading = "Copy Files"
strContent = STR_DOC_2
Case Index = 4:
[b]imgHandle = getAddressOf(AddressOf modScreenShot2.getFile)[/b]
strHeading = "Modify User Scripts"
strContent = STR_DOC_3
End Select
makeDocumentationWindow strHeading, strContent, imgHandle
End Sub
VB Code:
Public Sub makeDocumentationWindow(ByVal strTitle As String, ByVal strContent As String, Optional imgHandle As Long = -1)
With frmDoc
.Hide
.Caption = .Caption & strTitle
.lblShowImage.Visible = Not imgHandle = -1
.lblShowImage.Enabled = .lblShowImage.Visible
.imgImageHandle = imgHandle
With .rtbText1
.Text = strTitle
.Find (strTitle)
.SelBold = True
.Text = .Text & vbCrLf & vbCrLf & strContent
.SelStart = Len(strTitle)
.SelLength = Len(Mid(.Text, InStr(.Text, strTitle) + .SelStart))
.SelBold = False
.SelStart = 0
End With
centerMe frmDoc: .Show
SetTopmost frmDoc, True
.cmdClose.SetFocus
End With
End Sub
VB Code:
Option Explicit
Public imgImageHandle As Long
Private Declare Function CallWindowProc& Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc&, ByVal hWnd&, ByVal Msg&, ByVal wParam&, ByVal lParam&)
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
If callingForm Is frmA_1_Splash2 Then frmA_1_Splash2.cmdNext.SetFocus
End Sub
Private Sub lblShowImage_Click()
MousePointer = vbHourglass
[b] CallWindowProc imgImageHandle, 0, 0, 0, 0[/b]
imagesUsed(UBound(imagesUsed)) = tempPathToUse
ReDim Preserve imagesUsed(UBound(imagesUsed) + 1)
SetTopmost Me, False
[i]StartDoc tempPathToUse[/i]
MousePointer = vbNormal
End Sub