activate / deactivate screen server
activate / deactivate screen server
(OP)
POssible to activate/deactivate screen saver, via commandbutton?
Tks.
Tks.
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS Come Join Us!Are you a
Computer / IT professional? Join Tek-Tips Forums!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines |
activate / deactivate screen server
|
activate / deactivate screen serveractivate / deactivate screen server(OP)
POssible to activate/deactivate screen saver, via commandbutton?
Tks. Red Flag SubmittedThank you for helping keep Tek-Tips Forums free from inappropriate posts. Reply To This ThreadPosting in the Tek-Tips forums is a member-only feature.Click Here to join Tek-Tips and talk with other members! Already a Member? Login |
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
Register now while it's still free!
Already a member? Close this window and log in.
RE: activate / deactivate screen server
Experience is something you don't get until just after you need it.
RE: activate / deactivate screen server
My request is:
pseudo code
...
deactivate scree saver
...
do until rs.eof
...
rs.move.next
...
loop
reactivate normal screen saver
....
RE: activate / deactivate screen server
My point is – if you do it more efficiently, you may not need to mess with the screen saver.
---- Andy
"Hmm...they have the internet on computers now"--Homer Simpson
RE: activate / deactivate screen server
And i fill a TXT file with RS valute.
Note:
I have 2 account on forum, sal21 and 2009luca
RE: activate / deactivate screen server
That should not take so long to have a screen saver kick in.
Why are you exceeding the time limit of your screen saver?
---- Andy
"Hmm...they have the internet on computers now"--Homer Simpson
RE: activate / deactivate screen server
Experience is something you don't get until just after you need it.
RE: activate / deactivate screen server
---- Andy
"Hmm...they have the internet on computers now"--Homer Simpson
RE: activate / deactivate screen server
Nice suggestioni,
For example...?
RE: activate / deactivate screen server
Private Declare Sub mouse_event Lib "user32.dll" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Const MOUSEEVENTF_LEFTDOWN = &H2
Private Sub Form_Load()
Timer1.Interval = 50000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Call mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
End Sub
Experience is something you don't get until just after you need it.
RE: activate / deactivate screen server
...
I = I + 1
If I Mod 1000 = 0 Then
Call mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
DoEvents
End If
...
RE: activate / deactivate screen server
I would investigate why my process takes so long (how long anyway?) for so few records...
---- Andy
"Hmm...they have the internet on computers now"--Homer Simpson
RE: activate / deactivate screen server
>wat you think about my knowledge...
I wouldn't do it that way. A tight loop, with DoEvents? No. Use Error7's technique, which uses a timer.
>Will a simple Send Key command periodically prevent the screen saver from kicking in?
No. SendKeys (a horrible kludge, IMO) doesn't do enough to convince the screensaver that there has been activity
RE: activate / deactivate screen server
wath is your approch?
in other case found this:
CODE
RE: activate / deactivate screen server
I already said - I'd use MOUSEEVENTF_MOVE rather than MOUSEEVENTF_LEFTDOWN. You might want to have a quick look at the documentation for the mouse_event API
>in other case found this:
Great at starting a screensaver, rubbish at stopping one
RE: activate / deactivate screen server
CODE
RE: activate / deactivate screen server
CODE -->
Private Declare Sub mouse_event Lib "user32.dll" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) Const MOUSEEVENTF_MOVE = &H1 ' as detailed in one of my previous posts Private Sub Form_Load() Timer1.Interval = 50000 Timer1.Enabled = True End Sub Private Sub Timer1_Timer() ' A tiny wiggle Call mouse_event(MOUSEEVENTF_MOVE, 1, 0, 0, 0) Call mouse_event(MOUSEEVENTF_MOVE, -1, 0, 0, 0) End Sub
RE: activate / deactivate screen server
tks, work!
but possible to stop the execution of timer?
RE: activate / deactivate screen server
Timer1.Enabled=False