Solved

For MIKEP - ScreenSaver

Posted on 1998-08-19
6
178 Views
Last Modified: 2010-04-30
(I'm using VB5 Enterprise Edition)
I saw your post on ScreenSavers and like it very much.
But I keep getting "Compile Error: Invalid use of
ME keyword" in the following code:



Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

    Dim PWOK As Boolean

    ' If passwords are turned on and we are not on NT check     ' the password.
   
If RunMode = RM_NORMAL Then
       If PWMode = 1 And CurrOS = "95" Then
          ShowCursor True ' Need the cursor for the dialog                            ' box

' compiler doesn't like this!
          PWOK = VerifyScreenSavePwd(Me.hwnd)

          If PWOK = False Then Cancel = True
          ShowCursor False ' Get rid of cursor - turn back                             ' on if exiting
       End If
    End If


Can you give me any help for this? How could I
rewrite it to not use Me keyword?
P.S. Is this code I call when mouse is moved? Or, does
it work automatically somehow?

Any help apreciated............Jerry
0
Comment
Question by:jgore
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:waty
ID: 1429811
If you want a complete code source for screen saver, give me your e-mail, I will send it to you or you can download it from my web site :
 http://www.geocities.com/ResearchTriangle/6311/

It implements sprites accross the screen...
It worth to take a look
0
 

Author Comment

by:jgore
ID: 1429812
Thanks Waty, but I really just wanted the above question answered about the
Me keyword. I really just wanted the Skeleton code ,that MikeP gave us, to work.
It would be much simpler for me to build on.

Incedently, I got the following errors when trying to compile your code:
'Your program won't compile because of this line:
Private WithEvents m_tmr  As CTimer

Which gives this error:
MISSING: Subclassing and Timer Assistant (with
configurable message response, multi-control support + timer bug fix)

There may be others, but it wouldn't let me get past this.
I'm not really interested in your code, although it does look nice, becuase
I wanted to start from scratch. Thanks anyways.

0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1429813
This code is not supposed to be called from anyware. You just paste it into the code window of your form (click on your form and then F7). This will be called when the program unloads automaticly
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:waty
ID: 1429814
To run my screen saver, you need to download the the Subclasser DLL

0
 

Author Comment

by:jgore
ID: 1429815
Waty:
Thanks, I'll try the Subclasses DLL, just downloaded it.
I have the other Screensaver working, but would like to play with yours
because of the sprites.
Now that I have all I need to run yours, go ahead and "Answer" this question
and I'll throw you 50 pts and an"A" (otherwise it will stay in limbo  ;-).  
If you like.

Thanks also to MikeP!  You have both helped me alot!
0
 
LVL 14

Accepted Solution

by:
waty earned 50 total points
ID: 1429816
Tell me what you think about this screen saver. I have used this one to make the one of the company.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Paint/Redraw window while dragging 16 86
Add and format columns in vb6 7 70
Child Form in front 4 56
fso.FolderExists("\\server\HiddenFolder$") 4 88
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question