|
-
Mar 27th, 2000, 11:23 PM
#1
Thread Starter
_______
I would like to display a jpg on my screen at 12:00 noon to remind me of something.
Anyone know where I can find sample code.
Wayne
-
Mar 27th, 2000, 11:42 PM
#2
Fanatic Member
Timer
Use A Timer. Set the interval to one minute. Hide the form.
Then every time the timer event gets fired, test to see of it is 12:00. if it is then display the form, with a picture on it.
[code]
Dim WithEvents timer1 As Timer
Private Sub Form_Load()
Set timer1 = Me.Controls.Add("vb.timer", "timer1", Me)
timer1.Interval = 60000
timer1.Enabled = True
Me.Hide
Private Sub timer1_Timer()
'test for 12:00
If hour(time) = 12 then
Me.Show
End If
End Sub
[Edited by Iain17 on 03-28-2000 at 11:44 AM]
-
Mar 27th, 2000, 11:59 PM
#3
Thread Starter
_______
Ok..I set this in the startup and it fires on startup...Is there a way that it can be invisible...I don't want a co-worker to close the application and as a result, I miss running my job.
Ie..I am using it as a sort of scheduler to remind myself to run certain jobs at specific times so I need it to be running. If it's invisible then no one can turn it off accidentally or otherwise.
Wayne
-
Mar 28th, 2000, 12:01 AM
#4
Fanatic Member
hidden
isn't hidding the form enough? Explain what you mean
-
Mar 28th, 2000, 12:14 AM
#5
Thread Starter
_______
1st...is there a function for minuites as well
ie...12:45 am
2nd..when you run a vbApp the icon appears in the task tray...therefore it is visible and can be clicked on and closed...
[Edited by HeSaidJoe on 03-28-2000 at 12:15 PM]
-
Mar 28th, 2000, 01:10 AM
#6
Member
There is a property of Forms call ShowInTaskBar, and you need to set that to false so that it will not show it there.
About the minutes if you change:
If hour(time) = 12 then
to
If format(time, "hh:mm") = 12:45 then
that should take of it
-
Mar 28th, 2000, 01:11 AM
#7
Member
I forgot to mention that the method I gave you will check the time in military time format.
-
Mar 28th, 2000, 01:56 AM
#8
Thread Starter
_______
-
Mar 29th, 2000, 10:41 PM
#9
Addicted Member
No turning off!
You can also make the app impossible to turn off (I use it for my reminder-apps).
I don't remember the exact code, but in Form_Unload (Cancel As Integer) you put something like:
Msgbox("Dont turn it off!")
Cancel = -1
When Cancel is set to -1 (or 1 or whatever it is), the termination is canceled. This is the same you use for questions like "Do you really want to close the program?", only here is no Yes-button.
To close the app down, use Ctrl-Alt-Del
Cheers, Pentax
PS.
This can of course be somewhat irritating for your co-worker.
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
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
|