Php time elapsed2/28/2024 Math Flash Cards Dots Math Game Video Tutorials Halloween Math Worksheets Thanksgiving Math Worksheets Christmas Math Worksheets Valentine's Day Math Worksheets Saint Patrick's Day Math Worksheets Easter Math Worksheets Seasonal Math Worksheets CodeBank - ASP / ASP.Home Addition Worksheets Subtraction Worksheets Multiplication Facts Worksheets Long Multiplication Worksheets Division Worksheets Mixed Operations WorksheetsĪlgebra Worksheets Base Ten Blocks Worksheets Decimals Worksheets Fact Families Worksheets Fractions Worksheets Geometry Worksheets Graph Paper Integers Worksheets Measurement Worksheets Money Math Worksheets Number Lines Worksheets Number Sense Worksheets Order of Operations Worksheets Patterning Worksheets Percentages Worksheets Place Value Worksheets Powers of Ten Worksheets Statistics Worksheets Time Math Worksheets Math Word Problems Worksheets.Slow Chat with the Microsoft Visual Basic team.Universal Windows Platform and Modern Windows Experience. Quick Navigation Visual Basic 6 and Earlier Top SammiRight here at form load, i need to load text1.text as well, the way you did it getting the 2nd line for label1 i dont like it, i wana something simpler like this:ĭim line1 As String, line2 As String, line3 As String, line4 As String, line5 As String, line6 As String, line7 As String, line8 As StringĬould you implement something like this resend me project? If you find an error (or it is not exactly what you want), let me know. Put in a larger number if you want to test to see # of days and hours and minutes how they change. That 0 will change when you exit the program (will increase by the number of minutes the program has been run), and will be loaded next time at form_load). (The zero represent the total runtime-will change if you run the program for at least one minute) You can experiment by editing the text file.currently it is at: Ok, so this is what I did.one textbox, one label, one "Exit" button (the exit button saves the new runtime to the textfile). Label1.Caption = "Started: " & GetElapsedTimeString(Now - newTime)Ĭonst sFmt$ = " \d\a\y\s | h \h\o\u\r\s | m \m\i\n"Įnd Functionthis is what i got when i saved textfile:īut when i click command2, nothing happened to label1 Open "C:\users\denni\time.txt" For Input As #inFile Open "C:\users\denni\time.txt" For Output As #outFile Put #1,, mStartTime = it says bad file modeĬode: Option ExplicitDim inFile As String Open App.Path & "\1.txt" For Output As #1 (added seconds, just to see the result, dont want to wait minutes for the testing)it works but i need to save label1 time with text1.text in textfile and load it and get second line of textfile which is the saved time to label1 When u open the program again, u will notice it will start over, but if u use Command2 it will take the old starting time and continue from there. GetElapsedTimeString = Int(dT) & Format$(dT, sFmt)Įnd Functionwhen u click Command1 it will save the current time. Label1.Caption = "Started: " & GetElapsedTimeString(Now - mStartTime)įunction GetElapsedTimeString(ByVal dT As Double) As StringĬonst sFmt$ = " \d\a\y\s | h \h\o\u\r\s | m \m\i\n | s \s\e\c\o\n\d\s" Open App.Path & "\time.data" For Binary As #1 'do some stuff here to let the time moves. Public Function ElapsedMilliseconds() As Doubleġ0 ElapsedMilliseconds = ElapsedSeconds * 1000 Public Function ElapsedSeconds() As DoubleĢ0 ElapsedSeconds = (currentTime - m_startTime - m_overhead) / m_freq Private Declare Function QueryPerformanceFrequency Lib "kernel32" (X As Currency) As Boolean Private Declare Function QueryPerformanceCounter Lib "kernel32" (X As Currency) As Boolean I thing i got what are you trying to accomplish ,
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |