$20 to anyone that can fix my program the way I need-VBForums
Results 1 to 8 of 8

Thread: $20 to anyone that can fix my program the way I need

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    1

    $20 to anyone that can fix my program the way I need

    Ive worked for hours on this crap program, It measures your reaction time, and then displayed it in a message box. Ill put the code on medifire anybody with any coding skill at all should be in for a quick 20 bucks via paypal.



    The test needs to run 5 times with a while loop (click button wait for green circle display reaction time in message box) then display the 5 tests from a array in the text box and average them.

    here are the files from vb

    reaction! VB files

  2. #2
    Member
    Join Date
    May 2010
    Posts
    60

    Re: $20 to anyone that can fix my program the way I need


  3. #3
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,961

    Re: $20 to anyone that can fix my program the way I need

    Moved to the Project Request Forum.

    Gary

  4. #4
    Lively Member
    Join Date
    Feb 2008
    Location
    Denmark
    Posts
    113

    Re: $20 to anyone that can fix my program the way I need

    I would not test your time between the timer2 whit a increment.
    Instead i would have made 2 variable.
    Starttime as date
    endtime as date

    And test the time diff between them.

    Edit: remove the file.. and read the message again. See i read it all wrong sorry

    Well i would just print the text out each time the user pressed a button and make a counter for each time timer1 activate it again.
    Stop your timer1 when it reach the 5 times.
    Then have variable saving stats like fastest time and slowest time.
    Then print these out in the message box when it ends.

    That was what i was trying to do in my vb6 project.

    Edit: Well i edit again and made it work in vb6.
    It show result, in text window whit fastet and slowest. Any other data can be added.
    i made so you can choise more than 5 or less
    Attached Files Attached Files
    Last edited by snortop; Dec 20th, 2011 at 07:03 AM.
    PHP: ClassDB

    VB6:
    Own code: Google Translater

    Over and out from Snortop!!

  5. #5
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,572

    Re: $20 to anyone that can fix my program the way I need

    Please go through the comments in the VB file that I have attached.

    Instead of using another Timer to find out the time taken, you could store the starting time and then find the difference using a TimeSpan. It's more flexible.

    Attached Files Attached Files

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  6. #6
    Lively Member
    Join Date
    Feb 2008
    Location
    Denmark
    Posts
    113

    Re: $20 to anyone that can fix my program the way I need

    I like that the vb 2010 ver has "ts.TotalMilliseconds" i saw it in some code on the net but couldent find a way for vb6
    PHP: ClassDB

    VB6:
    Own code: Google Translater

    Over and out from Snortop!!

  7. #7
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,572

    Re: $20 to anyone that can fix my program the way I need

    Quote Originally Posted by snortop View Post
    I like that the vb 2010 ver has "ts.TotalMilliseconds" i saw it in some code on the net but couldent find a way for vb6
    You could use the GetTickCount() API in VB6.

    Example:
    vb Code:
    1. Option Explicit
    2.  
    3. Private Declare Function GetTickCount Lib "kernel32" () As Long
    4.  
    5. Dim lngStart As Long
    6. Dim lngEnd As Long
    7.  
    8. Private Sub Command1_Click()
    9.     '~~~ Start
    10.     lngStart = GetTickCount
    11.        
    12. End Sub
    13.  
    14. Private Sub Command2_Click()
    15.  
    16.     '~~~ End
    17.     lngEnd = GetTickCount
    18.    
    19.     '~~~ Result
    20.     Dim lngResult As Long
    21.     lngResult = lngEnd - lngStart
    22.    
    23.     MsgBox CStr(lngResult) & " milliseconds"
    24.    
    25. End Sub

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  8. #8
    Lively Member
    Join Date
    Feb 2008
    Location
    Denmark
    Posts
    113

    Re: $20 to anyone that can fix my program the way I need

    Well i kind of solved it myself in a diffent way.
    It was in the code i posted, just wanted to mention had a bid of problem finding a solution

    Code:
    Public Function MyTimeReturnMillisec(TimeCheck As Date) As String
        Dim Min As Integer
        
        Dim timetekst As String
        timetekst = "0"
        
        ' Didnt want to go above 1 hours!!
        If Hour(TimeCheck) > 1 Then
            MyTimeReturnMillisec = -1
            Exit Function
        End If
        
        
        If Minute(TimeCheck) > 0 Then
            timetekst = Val(timetekst) + ((Minute(TimeCheck) * 60) * 100)
        End If
        
        If Second(TimeCheck) > 0 Then
            timetekst = Val(timetekst) + (Second(TimeCheck) * 60)
        End If
    
        ' Here i get the millisec
        Min = Format(TimeShow, "ss") & Right(Format(Timer, "#0.00"), 2)
        
        timetekst = Val(timetekst) + Min
        
        MyTimeReturnMillisec = timetekst
    End Function
    But if the code can be improved it some have... maybe make a post "code it better"
    So posted it her

    Edit:
    But looking at your code seem like a much better way anyway.
    Last edited by snortop; Dec 22nd, 2011 at 05:13 AM.
    PHP: ClassDB

    VB6:
    Own code: Google Translater

    Over and out from Snortop!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.