|
Then you would be better changing it to a class.
|
|
|
|
|
The struct could have a static member to use in that case, kinda like String.Empty and Guid.Empty
|
|
|
|
|
Doh! That hadn't crossed my mind - thanks
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
I want to make a program to monitor the useage of my system,
In short a keylogger like program.
Now i don't know which method i should use,
I dont care for precision just performance.
So i use a timer then get the current active window and GetKeyboardState using getkeyboardstate does mean i wont have the correct order of letters but thats not really the point.
Or i could use a keyboard and mouse hook but im wondering if this is unstable for my system or has heavy workload which i dont really want.
So what should i do?
Thanks
|
|
|
|
|
Scalee wrote: I want to make a program to monitor the useage of my system,
In short a keylogger like program.
Why? Do you type in your sleep?
led mike
|
|
|
|
|
1) Convince us you're not trying to write malware
2) see )1
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
If i wanted to write malware then i would care about the order the letters where typed,
And i would give a crap about system stability because it wouldn't be my system.
And second why try to make a keylogger while you can download a ton online, So i hope this convinces you.
The reason why i want to create this is because i often leave my laptop unattended for a while at work and probably because im paranoid.
|
|
|
|
|
"Why try to make a keylogger while you can download a ton online" would then be my answer
|
|
|
|
|
|
I want to use the "SELECT " statement on DataTable, which fetches records between these 2 date ranges:
StartDate : 01-01-2007 and,
EndDate : 01-01-2008
The code is as follows:
if (newPDS.Tables[0].Columns["ADM_DATE"]== null)
{
DataColumn dCol = new DataColumn(newPDS.Tables[0].Columns.Add("ADM_DATE", typeof(DateTime), "").ToString());
}
for(Int32 i = 0; i < newPDS.Tables[0].Rows.Count; i++)
{
row = newPDS.Tables[0].Rows[i];
row["ADM_DATE"] = row["CADMMM"] + "/" + row["CADMDD"] + "/" + row["CADMHH"] + row["CADMYY"];
DateTime newDT = new DateTime();
newDT = Convert.ToDateTime(row["ADM_DATE"]).Date;
row["ADM_DATE"] = newDT.ToShortDateString();
string newQuery = "ADM_DATE between StartDate and EndDate";
newDR = myTable.Select(newQuery);
}
myReport.SetDataSource(newDR);
crystalReportViewer1.ReportSource = myReport;
Thanking you in anticipation.
modified on Tuesday, August 5, 2008 3:33 PM
|
|
|
|
|
Hi,
Try using syntax #m/d/yy# for literal date strings. For example:
string newQuery = "ADM_DATE between #1/1/2007# and #1/1/2008#";
Mika
|
|
|
|
|
Thanks Mika.
Just now I learned that, ADO.Net expressions do not support the "BETWEEN" keyword (it's showing an error as : Expression contains unsupported operator"BETWEEN").......so I just break it up into clauses with an "AND" as
"ADM_DATE > StartDate AND ADM_DATE < EndDate"
And when I'm using the above lines, its showing up the database connection popup, where it asks for Server Name, Database Type, LoginId, Password etc. That means that its still looking for the Crystal Reports datasource as DataSet's Table.
My previously working Crystal Reports datasource expression was like this :
myReport.SetDataSource(newPDS.Tables["SAMFILE_CLIENTP"]);
where : <br />
newPDS - DataSet <br />
SAMFILE_CLIENTP - DataSet Table
Any idea ???
|
|
|
|
|
Glad it solved.
It's been a while since I last used Crystal but if I remember correctly, try also to use SetDatabaseLogon method and after setting databases and datasources, use VerifyDatabase -method. This way you have full control over datasources and their logon information and you can catch any possible problems while executing VerifyDatabase.
Hope this helps,
Mika
|
|
|
|
|
when changing the Image property of a picturebox, the select resource dialogue is showing up with two options...
local resource and project resource file. What is the difference?
thank you
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Hi,
Project resources are *shared* throughout all the classes in the project but local resources are stored in the current form's resx file so they are usable only through current form.
Hope this helps,
Mika
|
|
|
|
|
thank you..
but is there any relation between these options and the project
distribution ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
|
thank you
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
You're welcome
Mika
|
|
|
|
|
Hi,
I have an application which transfers file from one location to another specified by the path given by the user.Right now it overwrites the file if the same path and file name is given. But I want it to version the file and store it instead of overwriting it to have all the versions of the file transferred. I want to know the best way to do it in C#.
Uday
|
|
|
|
|
I would believe that this is purely a naming issue. For example keep all the files but vary the name like ..ver1, ...ver2 etc or place the older files in a different directory and separate different versions in history directory with a different name.
File system doesn't typically allow several files with the same name so this cannot be overridden using c#
Mika
|
|
|
|
|
The problem is the file transfer is predefined so the naming would also be.So the application should check and add version to the file automatically.
Uday
|
|
|
|
|
Let's take an example. If your destination directory is named DirA and it already contains a file named AnyFile.txt. When you transfer a newer version of this file (for example by greater timestamp), what would you like the directory to contain?
\DirA\AnyFile.txt (<- older version)
\dirA\???
Mika
|
|
|
|
|
Hi,
Currently I have developed a service.It is working fine.
Now I want to Implement thread synchronization using Mutex.
Iam very new to threading concept..I unable to do that
Kindly help me in doing the same
|
|
|
|
|
balu12345 wrote: Implement thread synchronization using Mutex.
If it's just a single service, why Mutex ? You shoud read the basic concepts from here[^]
|
|
|
|