|
I don't know what OS this for, but in 2000 & XP there is a function called GetLastInputInfo. The function parameter is LASTINPUTINFO structure:
Private Type LASTINPUTINFO<br />
cbSize As Long ' = 8<br />
dwTime As Long<br />
End Type
As far as the time you can add a windows timer (SetTimer) or add a timer control (vb)
You can compare the LASTINPUTINFO.dwTime against GetTickCount() function to calculate the time elapsed.
Hope this helps
iluha
|
|
|
|
|
How to add a datagrid with data from a textfile?? I am using vb.net!
|
|
|
|
|
If you decide to change your post, edit it, don't create a new one.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How to add a datagrid with data from a textfile?? I am using vb.net!
|
|
|
|
|
You need to first read the text file into an array. Then make the array your data source.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How can I add the contents of one array into another which is already got values in it. The arrays are exactly the same.
|
|
|
|
|
|
|
You have to redim preserve the first array and then copy the contents of the second one on the first by hand (crappy solution), but be wary that redim preserve has some performance issues.
But I think you can use the ".copy" method to achieve the same result.
|
|
|
|
|
korso_rogan wrote:
But I think you can use the ".copy" method to achieve the same result
and me, i think you are talking to the wrong person... i'm not the one who ask the first question. be careful to what you click on...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
My Apologies, but don´t get angry, man
|
|
|
|
|
|
I have a program that was created in VB6. I want to create a serial number for each copy of the program that I will install in the computers. Please can anybody help me on how to do this. Any idea will be great.
|
|
|
|
|
First of all i´d like to say Hi to all the members of this forum, and say thanks to the webmasters of this page; it´s a great one
My problem is the following:
I started developing VB.NET App about 5 months ago, and i am very concerned about database performance, because the software I develope at my job mainly involves using them.
I´ve been working on a project for about 2 months that uses an access database shared on a network folder (yep, that sucks i know) and i´d really like that someone tell me about a webpage or a book from where i can gain some expertise about that.
Currently, my app does one operation where it has to make several select and update commands, making the process very slow... While making that, the form of the app stutters, tried to use application.doevents, but was not very effective... should it be wise to create a thread and complete the operation in that thread?
As you see, i´m very newbie to this, and i feel a little lost... Hope that someone can lead me hand. Thanks a lot for reading, and sorry about my english
|
|
|
|
|
Your problem is probably that the queries take to long on access. Why can't you use SQL Server? If you're stuck with Access I suggest finding a good book on Access SQL. Try writing your queries differently. Make sure each table you are updating has an index and a useful Primary Key. How many users do you have? I wouldn't even try to use access with more then few users.
One thing that may help is to map the network drive to the computer where you are hosting the web ap.
"People who never make mistakes, never do anything."
My blog
http://toddsnotsoamazinglife.blogspot.com/
|
|
|
|
|
Thanks a lot for answering, Todd. In fact, it isn´t a web app, but a desktop app... It uses linked tables to connect to other tables from other Access Databases, so... as you guessed right, performance is very degraded.
Why we are using access? Good question. The reason is that our software must connect to an Access database that our client uses and it´s not possible to convince him to change to another database engine, and that´s not the best thing, the database that our client uses has a web interface in top of it.
Leaving the database question, is it possible to launch my queries process on a new thread so the forms and the app doesn´t stutter when the user tries to move the window or click on some control? (application.doevents doesn´t do the trick).
|
|
|
|
|
Yes it's possible to use threads. You'll have to set the time out property on your connection to something higher then the default. Everything you need to know about threading is right here
"People who never make mistakes, never do anything."
My blog
http://toddsnotsoamazinglife.blogspot.com/
|
|
|
|
|
Thank you for your help, i´ll see what i can do
|
|
|
|
|
Is it possible when populating a datagrid you can use an array of values. What I mean can you use the fill dataset i.e. .Fill(dataset, "Customers")
What I am trying to use, is use the DataGridTableStyle methods i.e. mapping etc
At the moment I am using this method ......
dt.Columns.Add(New DataColumn("Floor", GetType(String)))
This is not very good as I cannot get seperate width etc or the properties of DataGridTableStyle
Am I doing something wrong or how can the above be done.
Thanks in advance
|
|
|
|
|
hi,
I am using sqlDataAdapter select command based on multiple tables using INNER JOIN to populate DataSet . I wanted to update only one table data by using UpdateCommand Property. plz help me to write Update Command. SelectCommand is as
sql = "SELECT a.prepaidID,a.revAccountNo,a.AccountNo AS origAccountNo," & _
"a.totalAmount, .description, .distAmount,b.fromDate,b.toDate,b.vtCode,
b.voucherNo,b.voucherDate" & _
" FROM prepaidDistribution a,prepaidDistributionDetail b" & _
" WHERE a.prepaidID = b.prepaidID and a.companyCode='" & compCode & _
"' and b.fromDate>='" & startDate & "' and b.toDate<='" & endDate & _
"' and b.vtcode IS NULL and a.accountNo like '" & accountNo & "%'"
plz help immediately
|
|
|
|
|
Hello,
How can I export a Interbase/FireBird table into a MS Access table from VB .Net code?
Many thanks
|
|
|
|
|
I have created a project with som classes .... ... I created a second project with a class with inherits a class from the first one ..... Then I create an WinApp-project and make a reference to the second project (with the inherited class) ... try to set some propertied etc ... gets an error because I have not set an reference to the base-class project .... Can I get around this? Both classes belongs to same Nampespace (DOG.xxxx and DOG.yyyy) but resides in different projects/assemblies
//Maw
|
|
|
|
|
right click on the project references to add a reference to the project from which the base class comes from...
then, import it if you want, but be careful to the ambiguous name resolution...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi
I know how to store the image in database but i want to know how to for example :
First Capture an image then allow the user to draw a line as in GRAPH x co ordinate & Y co ordinate on the image
and store this image in the oracle database
Pls help me.
Regards
Lion Heart
Software Engineer
Bangalore
|
|
|
|
|
I am writing a program that will have two purposes and need some guidance. The first purpose is for data entry of survey responses. All responses are numerical and must fall within a range specified for each question, so the input must be validated. For example, if the question is asking the height of the subject, then the response must fall between 48 inches and 84 inches. Is there a way for the program to read the limits from another source, say a file? The client wants to be able to change the limits very easily and I have a separate window that will display and allow them to change these limits for each question. How do I get the system to read these values and validate the responses?
The second purpose is to store the data in some fashion. Each person taking the survey is considered a 'subject'. Each subject will have a response to each of the 20 questions, so I would imagine that a database would work, creating a 'subject number' as a primary key. How would I go about doing this in VB? Is this the best way to go, or I am off the path here. The client would ideally like to see all of the subject data in an excel spreadsheet, so maybe I could go that way too. Any input would be greatly appreciated.
|
|
|
|