Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 26th, 2006, 2:09 PM   #11
randum77
Programmer
 
randum77's Avatar
 
Join Date: Jun 2006
Location: Fayettehell, NC
Posts: 56
Rep Power: 3 randum77 is on a distinguished road
Bigguy, i never thought of having a Timer.tick sender. That's a good idea. Does it bassically run that Sub for every second on the ticker? So say you want something checked every 5 seconds you can build and if loop to update ever second. Then on the fifth second it runs another Function and 0's out the increment? If so, nice. I might be able to use that in the future.
__________________
_Marshall_

"America has bred a society that is innocent and incapable of accepting responsibility, but yet, is able to place blame on others without guilt."
randum77 is offline   Reply With Quote
Old Jul 26th, 2006, 7:55 PM   #12
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 708
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
Quote:
Originally Posted by randum77
Bigguy, i never thought of having a Timer.tick sender. That's a good idea. Does it bassically run that Sub for every second on the ticker? So say you want something checked every 5 seconds you can build and if loop to update ever second. Then on the fifth second it runs another Function and 0's out the increment? If so, nice. I might be able to use that in the future.
yeah that's basicly how it works. I havent tried it in .NET, but if it's anything like vb6 (which it probably is) you could just set the timer to 5 seconds, and you wouldn't even need an if statement to check the second.
Booooze is offline   Reply With Quote
Old Jul 27th, 2006, 1:36 AM   #13
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 294
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
Yeah it'd work.
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain

We all make mistakes. If it doesn't kill us, it will make us stronger. If it does kill us, then it's to late, but it was a great ride while it lasted. - Seth Hall
bigguy is offline   Reply With Quote
Old Jul 27th, 2006, 4:22 AM   #14
john Wesley
Hobbyist Programmer
 
john Wesley's Avatar
 
Join Date: May 2006
Location: United Kingdom
Posts: 119
Rep Power: 3 john Wesley is on a distinguished road
Send a message via MSN to john Wesley Send a message via Yahoo to john Wesley
The Timers are set to tick as follow's...

tmrRefreshDLB = 1800
tmrRefreshNUD1 = 2000
tmrRefreshNUD2 = 2200
tmrSearchDrives = 100

However, if anybody see's flaws in these time difference please let me know.
so far it hasnt missed a drive insertion for me, but my math is quite bad if that's a valid excuse :\.

    Private Sub tmrRefreshDLB_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrRefreshDLB.Tick
        DriveListBox1.Refresh()
    End Sub

    Private Sub tmrRefreshNUD1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrRefreshNUD1.Tick
        nudCountDrives1.Value = DriveListBox1.Items.Count
    End Sub

    Private Sub tmrRefreshNUD2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrRefreshNUD2.Tick
        nudCountDrives2.Value = nudCountDrives1.Value
    End Sub

    Private Sub tmrSearchDrives_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrSearchDrives.Tick
        If nudCountDrives2.Value < nudCountDrives1.Value Then
            SearchDrives() ' ' ' searches drives when a new one is mounted.
            If nudDriveFile.Value > 0 Then

                frmAuthorization.Visible = True

                frmAuthorization.nudSetTimedAccess.Value = nudDriveFile.Value
                ConvTime()  ' ' ' converts selected number into milliseconds.
                tmrTimedAccess.Enabled = True
                tmrTimedAccess.Start()
                nudDriveFile.Value = 0
            End If
        End If

    End Sub

The two functions used here are a little long to be posting here, but I could send them privatley I guess; If requested.
__________________
Mona Lisa must of had the highway blues you can tell by the way she smiles..
john Wesley is offline   Reply With Quote
Old Jul 27th, 2006, 10:24 AM   #15
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 708
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
Meh, doesn't look too bad. Did you ever use the filesystemwatcher or not?
Booooze is offline   Reply With Quote
Old Jul 28th, 2006, 4:52 AM   #16
john Wesley
Hobbyist Programmer
 
john Wesley's Avatar
 
Join Date: May 2006
Location: United Kingdom
Posts: 119
Rep Power: 3 john Wesley is on a distinguished road
Send a message via MSN to john Wesley Send a message via Yahoo to john Wesley
Nah, couldnt quite figure it out.
__________________
Mona Lisa must of had the highway blues you can tell by the way she smiles..
john Wesley is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware installation guide for Linux beginners coldDeath Coder's Corner Lounge 104 Jul 29th, 2007 4:40 AM
Stupid Windows, stupid DVD-RW drive Prm753 Coder's Corner Lounge 9 Jan 21st, 2006 7:26 PM
Linked list insertion at the tail elford Java 9 Jan 7th, 2006 9:04 AM
Second Hard Drive Issues... ViOLATiON Coder's Corner Lounge 2 Dec 31st, 2005 12:45 AM
minimizing hard drive activity? chepfaust Coder's Corner Lounge 3 Mar 25th, 2005 10:49 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:27 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC