|
Thanks - I'll have a look. Does it come with source ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
It is Microsoft code. It's free, but it is also without source.
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
may i know how can i programmatically open a HTML file using web broswer?
thank you.
|
|
|
|
|
System.Diagnostics.Process.Start()
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Hey yccheok,
How about System.Diagnostics.Process.Start(filename)?
That should trigger your default browser to open the filename which is an html document right?
Deepak Kumar Vasudevan
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
I want to login to Active directory with DirectoryEntry,I use this code but I always get unknown username or password:
de.Path = "LDAP://mazy/rootDSE ,DC=mfa";
de.Username = @"Mazdak";
de.Password = "mypass";
"mazy" is my domaincontroller and mfa is my domain.I change the Path in many ways but I get the same results.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
May i know how can i determine type of OS that user used is either windows2000 or windows98?
thank you.
regards
yccheok
|
|
|
|
|
yccheok wrote:
May i know how can i determine type of OS that user used is either windows2000 or windows98?
Sure, try these:
Environment.OSVersion.Platform.ToString();
Environment.OSVersion.Version.ToString();
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Hi,
The following should help you:
System.Environment.OSVersion.Platform,
System.Environment.OSVersion.Version
If you want the logged on user, then
There are bunch of other methods and properties in System.Environment that should elicit your interest in the above regard.
Deepak Kumar Vasudevan
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Hello,
I have made a database - SQL Server 2000 - to handle some stuff e.g. contacts, orders, etc.
I tried to normalize the database the best that I could and this lead to a lot of tables. For example since the contacts are worldwide, there are 3 tables that each one, hierarchically store country, province, county.
Finally in the table where each contact is contained i just store the ID of the county, and the province and stare would be retrived through the realationships.
Ok, this is just an example, the thing is much more hierarchical and normalized.
I would like to know how can I practically retrive, use, and update data from this database using ADO.NET? I mean, I am a bit confused.
Is there a simple way or is it going to be a mess all do be done from zero?
Thanks for any help.
Edoardo
|
|
|
|
|
I don't think there is a quick answer to your question, but I'd be willing to dialog with you about it for a while and share with you my techniques dealing with normalized databases. Beware though, I don't use a lot of what ADO.NET provides--instead, I tend to code client or server side SQL directly, depending on the requirements.
That said, it seems that ADO.NET can handle relationships between tables, as long as you tell it what those relationships are, and it should handle updating records correctly (I think. I've never tried this). [personal comment--I've never used this feature because I think it is really stupid to duplicate the database model in the code: what if you want to change the DB model?]
Also, have you set up foreign keys so that deletes and updates are cascaded? This can save you a lot of programming time.
Also, if you can provide some specific examples of what you are trying to do, it might be easier to consider what the different solutions are and their benefits/drawbacks.
Finally, hierarchical architectures are a PITA. Since you seem to only have a three level hierarchy, I think the best thing to do is to deal with the individual insert/update/delete/select statements. I had to create a model for a satellite company once that allowed basically infinite drill down in a hierarchy. Argh.
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator.
|
|
|
|
|
How can Create a binary registry entry (Binary Value) to save a login or access password?
Jassim Rahma
|
|
|
|
|
Your problem is writing to registry or you have problem to change password to binary value?
If your problem is first one,search this site,you can find an article about it.If it is second one you can write a function that get password string and return it like this:
public static byte[] EncryptPassword(string password)
{
UnicodeEncoding encoding = new UnicodeEncoding();
byte[] hashBytes = encoding.GetBytes( password );
SHA1 sha1 = new SHA1CryptoServiceProvider();
byte[] cryptPassword = sha1.ComputeHash ( hashBytes );
return cryptPassword;
}
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
How can I create my own binary database file just like MS access? I need to use my own extension (e.g. *.mod - my own database)?
Jassim Rahma
|
|
|
|
|
Hey Jassim Rahma,
Check out this site:
http://www.c-sharpcorner.com/database/SharpHSQL.asp
It is a database implementation in C#. Perhaps this should give you some idea.
Deepak Kumar Vasudevan
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
How can I:
1. Create a DLL which contains WMA files called 01.wma, 02.wma, etc. So DLL files will be indivisually 01.dll, 02, dll, etc.
2. Read the audio file from the DLL file and play it without creating a temporary WMA file on the local machine.
Jassim Rahma
|
|
|
|
|
|
How can I change the keyboard language between Arabic and English? I need to force the textBox to write Arabic for textBox1 and English for textBox2 even if the user tried to change the language?
|
|
|
|
|
I think InputLanguage class is what you need. I think when these controls are focused,you can use this class to set the language.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
I need to send an output text to a specific line on the printer because I have a fixed template and I have to use it. How can tell C# to print to x, y on the paper from a textBox on my form?
Many Thanks,
Jassim Rahma
|
|
|
|
|
Hi all
I dont wanna learn regex, but some is bound to have done this already.
I need to replace all ' 's with " 's that is between tags < >. I dont even know how to work the Regex class, help on that would be appreciated too.
Cheers
"I dont have a life, I have a program." Also, I won't support any software without the LeppieRules variable.
|
|
|
|
|
Well you scratched my back before leppie, so....
<br />
<br />
<br />
string s= @"<here is='a little' bit='of'>xml</here>";<br />
Regex rx=new Regex(<br />
@"(?<tag><)((?<prequote>.*?)')+(?<tag>[^']*?>)",<br />
RegexOptions.Compiled|RegexOptions.ExplicitCapture|RegexOptions.Singleline);<br />
string results=rx.Replace(s,new MatchEvaluator(this.tagEvaluator));<br />
Console.WriteLine(results);<br />
<br />
<br />
string tagEvaluator(Match m) {<br />
string r=m.Groups["tag"].Captures[0].Value;<br />
for (int i=0; i< m.Groups["prequote"].Captures.Count;i++) {<br />
r+= m.Groups["prequote"].Captures[i].Value + "\"";<br />
}<br />
return r + m.Groups["tag"].Captures[1].Value;<br />
}<br />
<br />
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
So here it is with codeproject.com formatting:
string s= @"<here is="a little" bit="of">xml";
Regex rx=new Regex(
@"(?<tag><)((?<prequote>.*?)')+(?<tag>[^']*?>)",
RegexOptions.Compiled|RegexOptions.ExplicitCapture|RegexOptions.Singleline);
string results=rx.Replace(s,new MatchEvaluator(this.tagEvaluator));
Console.WriteLine(results);
string tagEvaluator(Match m) {
string r=m.Groups["tag"].Captures[0].Value;
for (int i=0; i< m.Groups["prequote"].Captures.Count;i++) {
r+= m.Groups["prequote"].Captures[i].Value + "\"";
}
return r + m.Groups["tag"].Captures[1].Value;
}
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
I'm just going to email you dude. my xml is dissapearing on this message board.
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Bog wrote:
I'm just going to email you dude. my xml is dissapearing on this message board.
I hate that too! Thanx
"I dont have a life, I have a program." Also, I won't support any software without the LeppieRules variable.
|
|
|
|