I have an application that provides a countdown for 60 minutes and I'm currently using the win form timer and it updates some labels and a progressbar. Now I have to change this to be a countdown for 360 minutes. Will the win form timer be sufficient or should I implement a Timers.Timer instead?
I am trying to write a code on auto logoff for an application after certain perioed of time. But not sure how should i start on it. But I got below code, but there is an error (example:
System.Windows.Interop.
System.Windows.Interop is not a member of Windows and System.Windows.Threading is not doesn't contain any public member) and i wonder how should it get fix and merge into my application code
Imports System Imports System.Collections.Generic Imports System.Linq
Im creating an application that will take a screenshot of the desktop. Save the photo, Then upload it via FTP, And do it every 2 minutes. I know how you all like to say how i can do it, But can someone provide a code since.
I would like to try and implement a feature wherby once you have logged into an application (straightforward winforms application) and had your credetials verified the application would then force you to log on again if no activity had been detected in the application for a certain number of minutes. In essence I want to provide some extra security for those occasions when users get up and wander away from their machines for prolonged periods.
I have all the logic for logging into the application, it's just the checking for no activity over a given period and then forcing the user to log back in again that I'm not having much luck with.
I am looking for formula that is accurate in converting Minutes to Decimal Minutes i.e 30 minutes is 50 Minutes in Decimals so 1.3 hours is 1.50 and not 1.5 i have used Minutes/60 but it is not accurate as some times i have to Multiply the result by 100 and some time 1000 to get correct results based on single digit Try 1/60, 10/60 99/60 or 100/60.What would be the most efficient and correct way to Convert the time into Minutes ?
i wanted to develop a application to Refresh the screen.[Simple F5 would work !!] but is it possible.I want a button to start at X:0 Y:0 then on loading the form want the button to move diagonally on the form [ on reaching end the process should repeat ]I want the application that displays current resolution.The supported resolution by monitor and then give user the choice of selecting one.
launch a Modeless Dialog I am used in me.showintaskbar property to remove application from taskmanager.but it removes the form(application)it still refreshes.How to stop the form refresh.
Upon another event, we need to refresh the browser window with different parameters for strItem and strOrder.
If I call the same code above, it opens a new tab in the browser window. Is there any way to refresh the same browser window that was previously opened?
I have several reports that all merge onto the same datatable. The user can click several to run and then hit the 'find records' button to run them all simultaneously. Since they each take so long, I'd like to update the user on the status bar as each of these stored procedures is called successfully. However, when I call the procedure, i only get one update at the very end listing evertyhing.
Lets say i label "label1" , and 2 buttons named "button1" and "btnRefresh " [code]So , when user press the button 1 , the text will change. But what should i put inside btnRefresh to reload the forms ? and display the default label.text = "Form Load" ???
I am working on an application that ties into a SQL database on the back end. Currently the main form contains a series of combo boxes (Graph type, data format, location, and customer), two date pickers, and a button to launch the selections in a new form. Everything works just fine except there are a couple of things I can't seem to accomplish.
Example Data:
[CODE]...........
Case Select (with commented out lines for variations attempted):
[CODE]..........
1) I would like to be able to use some sort of case statement to color the bars in my chart based on value. I have tried approaching this in a couple of different ways but neither of the options seem to work. First, I tried this (the If Not is used because depending on what values are passed to the stored procedure in SQL, different columns will be returned):
[CODE]..........
Only one series is created with this method, so I can see how/why a Select Case would set all bars the same color. I have also tried creating a series for each row in the returned dataset but it results in 22 bars of different colors, for each of the rows (484 bars):
[CODE]..........
So is there any way to modify the second set of code there to only select the value from the "Percent TMHB" cell that corresponds with Row(i), rather than ALL values from the "Percent TMHB" column for EACH Row(i)?
2) Since I am drawing/creating these graphs in a new window, is there any way to also create a new timer on the "newFrm" and have the tick refresh the data? I've struggled with this but I feel like it should be easy. Say someone chooses a "TMHB", "Percentage", "Chicago", "All" (Graph type, data format, location, customer) and launches the graph, which opens in a new window, then they want to do "TMHB", "Percentage", "LA", "All" and have both windows up, refreshing automatically throughout the day. Can I somehow store the SelectCommand.Parameters values in the new form/timer so that it will query the database again every 5 minutes?
Example code for the StoredProcedure and creating the new form:
If combo_GraphType.SelectedItem = "TMHB" Then Dim newFrm As New Form Dim newChart As New Chart
I would like to calculate the difference between hours and minutes from one textbox and the hours and minutes from textbox two. What would be the best way to do this? I think DateTime would be the object to use, but wondered if anyone has any examples or better ways?
I am writting a timer with info and code gathered here. If you just set the Minute list box to 1 you will see what I mean. Also, you need to select each Listbox which turns them blue. I would like to do that with code too. Here is the code that is problematic.
'Timer1 from toolbox needed
'I have 4 textboxes Hours, Minutes,Seconds,Milliseconds.
'When textboxes values are set the count down begins.
'You need 4 labels, label1 is alone, the other 3 are above textbox and listbox the hours minutes second
'You need 4 textboxes. The 4 textbox is hidden or out of the way.
'You need 3 Listboxes.
'Lay out the label1 at top of form. Below that are hr, min, sec. labels.Below that the three textboxes and below that
'are three listboxes.
'Textboxes only show the original time
Public Class Form1 Dim cntDwnVal As New TimeSpan Dim stpw As New Stopwatch
I have a string wich contains a value (let's say 22:30 for example)I need a function wich convert 22:30 to an integer that is equal with total number of minutes in 22 hours and 30 minutes.
I've got a DGV and a timer, I want to hide the DGV after 15 minutes of inactivity on my form. How can i do this? I've got a number of other controls (textboxes, buttons etc).
I thought somehow I could reset my timer every time a mouse moved on my form but would this create to much running on the mouse code when a user moved the mouse on my form?
What is the best way to run a process say every 30 minutes? Or at 0900?
I have an app which does quite a few things, and want to add something that will run every 30 minutes. Don't want to use windows scheduler as i want to keep it all in the one app.
Is the only way to run a thread.sleep for 1800000? If so, can i run 2 background workers on the 1 app?
I'm just starting working on a program and the amount of pages I'm trying to screen scrape take over 20 minutes, so I was hoping I could run like 4 or 5 threads to cut that down??? I'm pretty much still a novice, so be easy on me. I understand good, though.