Time Computations In A Rental System?
Aug 21, 2009
i'm having a problem in my project. what i want was if a user chooses to rent a computer for 15 mins, when there's a minute left in his time, a msgbox will appear as notice to the admin and user as well that his time will soon expire. i have this code running but it shows about nine messageboxes. how can i make it to just one messagebox?
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
TextBox2.Text = Format(Date.Now, "hh:mm:ss tt")
[Code].....
View 4 Replies
ADVERTISEMENT
Jan 20, 2012
How can i call a procedure to calculate the cost of the suv and compact car mileage twice with that same procedure? Thats the only part i cant figure out with this function/procedure stuff. Also am i doing the procedures right?
Quote:
'Developer: John Nelson
'Date: Janurary 18 , 2012
'App Name: Compare Fuel Cost
[code]....
View 5 Replies
May 9, 2009
Want to make a movie rental program first part is for dvd's the other form is for blu rays(for blu-ray the price of rental is $5.00)This is what im thinking about doing on the dvd one
1. first it lets you select the movies you want new releases are $3.25 and the rest are $1.25*here i want to use check boxes for the new release and radio buttons for the rest of the moives *note: have to use one type of decision structure (if, if...else...or select cases)
2. As you select the moives it display the amount of movies selected in a label
3. now you click the rent button then
4. type in your 16 numeric numbers of your debit card (use a input box here) and * if it is a debit card and its 16 numbers long display = enter 4 number password or 4 digit pin number
5. if it is not display a message saying it must be 16 numbers long and a debit card or numeric *use error cathing and input validation
6. then let the user enter the 4 number pin for the debit card
7. if the pin is 4 numbers then display the total in a list box display total and the due date of the movie (don't know how im going to display due dates) * Note two other things i must use a procedure or a function and passing of arguments by reference or by value in procedure or fuction. "no late fees kinda like netflix" I got the part on how two diplay the total but dont know where to use the decision sturctured or the repetition structures the use ref procedure or funciton or passing arguments by ref or by val in my procedures or functions thats the only part im lost and i was thinking instead of using radio button or check boxes for the movies like selecting them i was thinking of using a drop-down combo box instead?
View 12 Replies
Nov 4, 2010
I was working on a project afew months ago and I came back to it and been trying to figure out how come I cant get this to work right.I cam across this site and did not know if this is how to show it but if anyone like to help me out I added a pic. [code]
View 2 Replies
Oct 30, 2011
I am new to VB. I use Visual Studio 2010. I got most of my rental program to work, but I am having trouble with the easy part. I can't get the driver's license textbox to display on the bottom in the summary section.
[Code]...
View 3 Replies
Nov 13, 2010
Basically i'm trying making a task manager program for myself. I want to know how I can display a message box and or play a sound when system time = time displayed in listview. I have used a dropdown box for the user to select which option they would like to select - sound or message box to popup. The data for the task will be stored in a listview box. I want it so that when the date and the time is = to the date and time set for the reminder the action will follow.Here is my code so far:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim notext As String = ""
If TextBox1.Text = notext Then[code]....
View 12 Replies
Jan 24, 2012
I'm using
Days = Dat2.Subtract(Dat1).Days
where
Dat2 = today
Dat1 = installed date
to trace the days of a program installed in user's computer.However, the user can changes the system time of his computer to a advancing date. How can I get a SNTP time from internet to solve this problem?
View 2 Replies
Mar 19, 2012
When I run my app at first its keeps time accurately for the first minute or so there after it starts loosing seconds, and by the end of the day its minutes behind.I've created a class called ServerTimeTimer that has a timers.timer object that elapses every second and adds a second to a dateTime variable, and a property to retrieve the date time.[code]
View 5 Replies
Nov 24, 2009
The Now() function in VB.NET returns date and time which is different from the system time that I see on the right-bottom on the notification bar. It is 15 hours slower than the system time. Has anyone ever met this problem? I'm using .NET 2.0.
View 2 Replies
Mar 8, 2012
How does one check to see if the system time is equal or not equal to a specific time? So, say I want to perform an action if your system time is between 6pm and 6am. Or something similar?
View 1 Replies
Jul 24, 2009
I want to get the GMT time of the system. how to find it?
I tried in 2 ways.here below i am writing the the way through which i tried
TimeZone.CurrentTimeZone.GetUtcOffset(Date.Now).To String()
DateTime.Now.ToString("zzz")
I tested the above functions by changing the TimeZones of my system clock. in these both ways i got the GMT time.but here i am facing once problem.its giving correct GMT time for some Time zones.but not in many of the time zones.here below i am mentioning some of those zones fo which GMT time not came correctly.
(GMT-09:00) Alaska
(GMT-08:00) Pacific Time
(GMT-07:00) Chihuahua, La Paz, Mazatlan-New
(GMT-07:00) Chihuahua, La Paz, Mazatlan-Old
[Code]......
View 3 Replies
Nov 26, 2011
I'm making an application in which I'm implementing auto-monitor turn off when system is idle, i.e. when user is not interacting with the system. [URL]it does provides the componenent to know when system is idle. But when I include:
Public WM_SYSCOMMAND As Integer = &H112
Public SC_MONITORPOWER As Integer = &Hf170
<DllImport("user32.dll")> _
[code]....
It shows this error: Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on.
View 3 Replies
Jan 1, 2010
I am trying to change the PC's System Date/Time using the following code. Everything works but the Hour. The Hour seems to change to 9:00 AM no matter what value st.hour is set to.
I have also tried:
<DllImport("kernel32.dll", setLastError:=True)> _
Public Shared Function SetSystemTime(ByRef theDateTime As SYSTEMTIME) As Boolean
End Function
[Code].....
View 4 Replies
Feb 6, 2009
Im making a scheduling program and I have three columns in my DB AgentName, Type, and DueBack. My DueBack Column will have a value of like 10:30 PM. Im needing to see if the Column value is the same as the System Time then it will delete the value from the DB and update the DGV> I know hwo to do everything else besides Compare and Delete.
[Code]...
View 2 Replies
May 6, 2009
I am trying to set up an "AT" job to export some registry keys on a remote computer, the problem is that DOS command requires a time to run. I want to get the system time of the remote computer so i can schedule it to run 1 minute from the time i send the command.
Is there any way to get the system time of a remote computer with VB.Net code?
View 3 Replies
Jan 15, 2012
Anyone here who knows how to convert system month,Day,Hour,Minutes,Seconds each into number format like [code]
View 3 Replies
Jan 15, 2012
Im trying to put current system time in YYMMDD format but having problem with day function. is Day() which returned day of month in VB6 not available in VB.Net? If I want to get the current day of month, how would I do that?
Dim dt As Date
Dim dtString As String
dtString = Year(now()) + Month(now()) + Day(now())
View 3 Replies
Jul 30, 2010
It is possible to create a real-time application where 2 or more pc will operate on it, for e.g, a cinema ticketing system, when a seat is occupied, all the other machine will be updated in realtime accordingly.
View 2 Replies
Mar 11, 2009
How do you set the system Time/Date programatically?
View 2 Replies
Apr 8, 2009
I need to get the sytem idle time.It must be developed in vc++ and the code should not use hooks is there any possible way of getting SystemIdleTime from taskmanager
View 1 Replies
Aug 2, 2010
I have an application that I'm writing that needs to run 3 different Timers. One that will run every 5 minutes, 1 that will run every hour and 1 that has to run once a day sometime after 5:00 P.M. I know that I can seperate the application into 3 seperate applications and use Windows Scheduled Tasks to perform this however I would prefer to have everything in 1 application and just run the different Sub/Functions off of the appropriate Timer. I'm trying also figure out a way to avoid 2 timers firing at the same time.
What i would like to do is tell the 5 minute timer to run say 2 minutes after every 5 minute mark in the our so the first one would be at 12:07 and then the next would be at 12:12 and so on. The hour timer should run sa at 12:20. The daily one run at say 5:31.Is it possible to use the System.timer or the System.Threading.timer in this way?
View 17 Replies
Sep 19, 2011
i have been looking for a code to change date time in kernel32, which is I will get a date time from server and update current PC date and time based on server date and time.
[Code]...
View 3 Replies
Nov 11, 2009
I have created a windows service in C# .net and now I want it to alert me if its going to shutdown. For this I make use of Dispose/Unload events but now I want if the services are stopping due to system shutdown process it will alert me.
View 1 Replies
Feb 19, 2010
How do I get the system time using vb.net and copy it into clipboard automatically?Is there a built-in function in vb.net for this?
View 2 Replies
Oct 2, 2009
I'm rather new to programming in general, but I have written a rather useful program for the company I work for. What I am trying to do is control the way a dialog box is displayed. I want a dialog box to pop up at certain times like 7:00 PM, 8:00 PM, etc.
View 1 Replies
Sep 25, 2009
I'm relatively new to visual basic and programming all together but I've managed to write a pretty useful program for my division. I am trying to add some more functionality however and that's why I'm here...because I am having trouble understanding how to make a windows dialog box pop up after the system time reaches a certain time.
View 9 Replies
May 8, 2009
Is there a way to find out the system time format? (If it's 24hour or 12 hour)
View 10 Replies
Apr 28, 2011
how to Change the System Date/Time via VB.Net?
View 1 Replies
Sep 28, 2007
While trying to set date time using SetSystemTime by passing the Structure.Only the date of the system is changed.Time is also gets changed but incorect time is showing in the System Clock of the Taskbar.e.g When I pass the following Structure(timeStru) to the SetSystemTime [code]...
View 5 Replies
Jun 21, 2010
I am looping through a list of DateTime variables and have got the .ToUniversalTime variable. I want to find out from the list which is the closest one approaching Now.ToUniversalTime but am having difficulty trying to work it out I had it looping through like this but this isn't much good as I only want to return the one that is the closest approaching to the system time. If TodaysCard(i).eventDate.ToUniversalTime < Now.ToUniversalTime
View 3 Replies