|
-
Aug 31st, 2000, 08:52 PM
#1
Thread Starter
Frenzied Member
Hi all. I know I'm being a pain, but I haven't even found a working ss on the web with a sample of picture preview.
The code below doesn't work, but I don't know why. It doesn't show the preview and it makes the "settings" and "preview" buttons stop responding.
Anybody know why?
CODE FOR THE SCREENSAVER FORM:
(one imagebox (image1 set stretch to true))
Private Sub Form_Load()
frmMain.Width = Screen.Width
frmMain.Height = Screen.Height
Image1.Left = 0
Image1.Top = 0
Image1.Width = Screen.Width
Image1.Height = Screen.Height
strFilename = App.Path & "\eol.jpg"
Image1.Picture = LoadPicture(strFilename)
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeySpace: StopSS
End Select
End Sub
Private Sub StopSS()
Unload Me
End
End Sub
AND the code for the Module:
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Sub Main()
Dim strCmdLine As String
Dim strArguments As String
Dim hWndPreview As Long
strArguments = Trim(Command$)
If App.PrevInstance = True Then End
strCmdLine = Left(Command, 2)
If strCmdLine = "/p" Then
hWndPreview = Trim(Right(strArguments, Len(strArguments) - 2))
Call SetParent(frmMain.hWnd, hWndPreview)
frmMain.Show
ElseIf strCmdLine = "/c" Then
MsgBox ("There are no configuration settings for this screensaver.")
Else
Call Load(frmMain)
frmMain.Show
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|