|
You could also add it as a Scheduled Task.
As to keeping track of what it had already processed, I usually store such information in a database, but with such a simple program, a config file should be sufficient.
|
|
|
|
|
I've typed data set and Binding source in the windows form. Data Grid is bound to the Binding Source. Table's primary key is Uniqueidentifier / Guid, which is hidden in DataGrid. Row contains some other NOT NULL columns, i.e Name. I can insert the record by generating the NewGuid() in DataGrid's RowValidating event and assigning to the Primary key field. Its working fine. Problem is this, when DataGrid's New Row is clicked(to add new row), and without typing any value(i.e Name) record pointer is changed (any other row is clicked), error is generated reporting that [Name] can not be null i.e Null value can not b inserted in NOT NULL column Name. I am sure RowValidating is fired, which has populated the ID with new generated Guid value, but Name is not entered thats why error is thrown.
How I can detect row is not entered so that I should not assign new Guid value to ID or How & where I can assign the new generated Guid, when it is sure the row is entered?.
Hope i can get quick response including sample code if possible.
Regards
|
|
|
|
|
Hi,
I want to show a graphical grid in the windows form..its for alingnments of labels....n etc. ......if anyone knows how to do this please do let me know...............................
regards
sindhu tiwari
Always Innovative
|
|
|
|
|
HI guys,
I have resize picturebox (say picMain) to the size of form.There are many picturebox inside picMain. Now I am moving child picturebox ( on mouse_move event) on picMain. I am getting refresh problem while dragging child picturebox. I had use Refresh(),Update() and Invalidate()method of child picturebox but not getting precise solution. It seems like child picturebox ghost is following it.
Instead of picMain if I work with main form then it work very well. I think picturebox has less ability to refresh faster compare
to form (am I write??).
I want same effect as what we dragged item from visual studio toolbox and move around in the form.
pls give the solution
thanks in advance.
Regards
Chintan
www.visharadsoft.com
(I am thinking to change humans to computer, but unfortunately GOD will not give me the source code)
|
|
|
|
|
i am using a usb barcode reader which install as "human interface device" and vender dostn provide any sdk with it.
i want to handill its event of barcode reading
can any one guide me
|
|
|
|
|
No SDK?
Then as HID you need to add a Key Press EventHandler
and decide what the data is. I presume its a Winform?
If the scanner comes with a configuration utility that allows
it to be set as "Serial Emulation Device" then you can use a
SerialDataReceived EventHandler which is easier...
Regards
Michael Curley
A craft is an enemy if not well learned.
|
|
|
|
|
Hi all,
I have the following string:
drwxr-xr-x 1 ftp ftp 0 Nov 09 07:04 Windows
drwxr-xr-x 1 ftp ftp 0 Oct 29 2007 Nvidia
drwxr-xr-x 1 ftp ftp 0 Jan 01 2003 Program Files
I would like to extract only the folder name i.e. "Windows" or "Program Files", but my string manipulation isn't so good in C# can anyone please help me?
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
The string looks broken, doesn't all the entries have both a year and a time?
If they do, the number of characters before the folder name should be constant, and you can just split the string on Environment.NewLine and use .Substring(41) to get each folder name.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
|
Ok, is that the only variations there are, or are the items that are listed with both year and time, and items that are listed without both?
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Guffa wrote: is that the only variations there are, or are the items that are listed with both year and time, and items that are listed without both?
Yes that is the only variants there are.
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Guffa, this is the way the most ?nixe show their directory entries. For older entries they show date without time, for younger date without year, but with time. But in all cases you can't rely on fixed width column structure.
Regards
|
|
|
|
|
mabo42 wrote: But in all cases you can't rely on fixed width column structure.
So what can one rely on ...
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
The columns you showed are always exist, but the width can differ in width (perhaps not in your case, username is always ftp, directory size is always 0...). To be on the safe side, use RegEx.
Regards
|
|
|
|
|
To make it more clear, this is a sample listing:
drwxr-x--- 2 ftp ftp 8192 Nov 19 12:14 .
drwxr-xr-x 11 ftp ftp 8192 Nov 19 12:35 ..
-rw-r----- 1 someone someone 8639750144 Nov 19 12:14 this_is_a_long_file_name.dat
-rw-r----- 1 ftp ftp 6260006912 Nov 19 13:13 shortname.dat
The filename (or directory name) is the 9. group (delimited by whitespace) until line end.
Regards
|
|
|
|
|
|
You could try this function, should work:
using System.Text.RegularExpressions;
public string EntryName(string line)
{
Regex regex = new Regex(@"[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+(?<ENTRY>.*)");
Match match = regex.Match(line);
return match.Groups["ENTRY"].Value.Trim();
}
Regards
|
|
|
|
|
Yeah, one of the worst things about Unix.
|
|
|
|
|
This has suddenly become a real ‘would like to have’ feature in the project I’m currently working on. I know this isn’t possible in standard C#, but I’m trying to find a hammer with the right weight and shape to beat this into some semblance of working. What I would like to achieve is something like this, in the commented line:
public class PersonForm
{
System.Windows.Forms.TextBox textRate = new TextBox();
public void BuildPerson(Person person)
{
Person pers = new Person();
pers.HourlyRate = textRate.Text.Length == 0 ? (double?) null : double.Parse(textRate.Text);
}
}
My SetPropertyFromText should take the pers.HourlyRate as a delegate parameter, not as a double?, determine the correct type conversion based on the type of the pers.HourlyRate, and set the property to the converted object value.
I can easily use a property name as my property parameter for SetPropertyFromText, but then I lose compile time checks. Our generated DAL, nettiers, provides, for each entity, an Enum with all the column properties for each entity, and I think this is about as close as I’ve seen to what I want, but not quite there.
Any ideas on the matter?
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
i am uninstalling the application using batch file,while unistalling i don't want to get command prompt(need to hide this from showing).how to do this programatically in c#
naveen
|
|
|
|
|
try using
Process oProcess = new Process();
oProcess.StartInfo.CreateNoWindow = true;
Chaos, panic and disorder - my work here is done.
|
|
|
|
|
cde is not working,can u tell me any other solution
naveen
|
|
|
|
|
code is not working,can u say the alternate colution
naveen
|
|
|
|
|
hi please tell
How i can change custom level of security (for example ActiveX control and plugins) of trusted sites, programmatically?
Is it possible by using IInternetSecurityManager interface?
Thanks.
-- modified at 0:43 Monday 19th November, 2007
|
|
|
|
|
Hi,
cenories is like i fill dataset from client machin which is in india. now that dataset is updating in Neterland server. but problem is occured that the data on server which have datetime field is oncrement by one day. i.e. is local database have value in datetime field 22/10/2007 then Netherland server database update to 23/10/2007 . this due to time span difference between us. is there any mehtod that will help me to avoid this adding of time span
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|