View Full Version : Help with VB
01-30-2005, 09:05 AM
I'm new and m creating a screensaver and use the code below to maximize the picture but whenever i try to use the code below, it disables the movements of mouse and keys which means to come out of the screensaver one has to go through Ctrl+Alt+Del
Private Sub Form_Resize()
.TOp = 0
.Left = 0
.Width = Me.ScaleWidth
.Height = Me.ScaleHeight
can anyone tell me what the problem is or is there any other method to maximize the stuff. I uses VB 6, XP pro if u needed to know.
01-31-2005, 04:27 AM
You need to post some more information probably. What is "flash"? What type of object?
02-01-2005, 08:23 AM
"flash" is any picture!!! it disable codes like this ones-
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Private Sub QuitScreenSaver()
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static sngX As Single
Static sngY As Single
'initialize the pointer location
If sngX = 0 And sngY = 0 Then
sngX = X
sngY = Y
'disreguard small moves
If X - Abs(sngX) > 50 Or Y - Abs(sngY) > 50 Then
sngX = X
sngY = Y
02-01-2005, 09:28 AM
The Form has a property that tells the application to give user input to the Form's methods before passing it on to it's components. I forgot the exact name of this property and I don't have VB installed on this computer but it's somethingPreview. Look for it in the form's properties.
02-01-2005, 10:19 AM
hey i have gone thru almost everwhere but i cant fine it! rem' its not a form but a screensaver though its almost the same.
02-01-2005, 11:42 AM
I meant the VB meaning of a Form (ie, the base object for any GUI).
Basically, if for example, you have a button on a form, and you move your mouse over the button, the event raised is the button's mouse_moved and not the form's. In your case, you have a control called Fash on top of the whole form, so all the events are going to it instead of the form (ie, to Flash_MouseMove instead of Form_MouseMove). So you have two choices. Handle everything in flash's events (so the code in Form_MouseMove would be moved to Flash_MouseMove), or set the property I talked about before (which I still can't remember it's name, look for something with "preview" in it in the Form's property dialog).
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.