|
You should use a manual approach if performance is important and the text is simple (limited formatting). If low maintenance or high reliability is important, use the RichTextBox. There is no point in writing code already provided by Windows - you will simply have more code to introduce bugs into.
|
|
|
|
|
Hi i have a Windows Application!!
In which i need to Display the Time of Two Countries,
For example:
When the application is Loaded, i want to Display the "Local Time/System Time" and "GMT time" and "Eastern Standard Time" on the window!!
In .NET there is option only for getting the current time zone!!("System.TimeZone.CurrentTimeZone");
!
Any helps or any sample codes or suggestion !! Please!
Thanks in advance!
One Shot dont miss you chance to go!!!!
|
|
|
|
|
|
You can do this by using the interop layer to call Win32 functions. The function GetLocalTime will give you the local system time. Calling GetSystemTime will give you the current GMT time. You then can use SystemTimeToTzSpecificLocalTime to convert GMT to Eastern Standard Time.
Andy
Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons
|
|
|
|
|
i want to create a DataSet with 2 Tables, and i would to popolate these tables with this selection string:
Select * FROM TableInfo Where User = "Sasuko"; Select DISTINCT Number FROM TableInfo;
but it is not supported in Microsoft Access? How can i do it?
Futhermore if i have a table like this
|Name|Number|
Sasuko 09
Nichol 07
Joy 07
Michael 09
Simon 09
i want as result 2 becouse 09 and 07 are the only two number inside the table; Select DISTINCT Number FROM TableInfo; return me two rows with 09 and 07. if i do Select Count('DISTINCT Number') FROM TableInfo; i get 5 that is the number of all the rows
|
|
|
|
|
This is not the correct forum.
Use the SQL / ADO / ADO.NET messageboard.
___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]
|
|
|
|
|
Jet/Access doesn't support multiple statements in a query, otherwise known at a batch in the SQL world. Only single statements are allowed. You'll have to break this up into two seperate queries and run them seperately.
I think your second query should look like this:
SELECT COUNT(DISTINCT Number) FROM TableInfo
No quotes around the DISTINCT Number part.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
OK. It works perfectly in SQL Server. I knew I hated Access for some reason. The equivelent in Jet T-SQL is:
SELECT Count(*) AS DistinctNumberCount FROM
(SELECT DISTINCT Number AS DistinctNumbers FROM TableInfo);
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
As for SSL/TLS, sending a notify is important. However it doesn't seem like SSLStream support that.
Please correct me if I am wrong, and what is the solution for this issue?
Thanks
Elapid For The Win
|
|
|
|
|
Need some help here pls
Elapid For The Win
|
|
|
|
|
First, we don't get paid to do this. This is an all-volunteer effort, not a job.
Second, putting this little "I REALLY NEED HELP!" note up 4 hours after you posted the "question" probably got your post ignored even more.
Third, and probably what really got your question ignored, is your question really doesn't make any sense. Why would a stream class concern itself with putting up an Alert messagebox or anything else User Interface related? It's not what a Stream object is concerned with!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 16:08 Thursday 19th January, 2006
|
|
|
|
|
Of course it doesn't support putting up an Alert Message. It supplies a Stream! Why would SSLStream concern itself with anything about a user interface element?
Sending a notification for what? That's going to be up to you and whatever you want to tell the user based on some condition...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sorry for the lack of my courtesy
Okay let me verify my question.
In SSL/TLS, there are a struct called Alert Message. Now what it does is to notify the server/client a few things according to what it is going on.
Now with the SSLStream in .NET 2, it doesnt seem to have an option of handling that alert (notification).
So now my question is .. do i need to implement it? because if there is something that I am missing and can handle that, then i dont have to do it
THANK YOU.
Elapid For The Win
|
|
|
|
|
Thanks for the clarification.
No, the SSL Alert protocol has not been implemented in the .NET Framework, ... yet anyway.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
you are the man!
Thanks
Elapid For The Win
|
|
|
|
|
Hello all,
I have to develop a project which can generate/capture a media streaming of different protocol(e.g. RTP,Microsoft multimedia server(MMS), ...).
So, is there any thing by which i can handle differet protocol?
Also mention that all stream are captured by media player/My own.So, I hava to handle different Encodeing/decoding(e.g. mp3,wav) techniques.
I mention that I see the functionaliy of VLC Player. But I have no idea to handle the component(axVLCPlugin) by C#.Net.
|
|
|
|
|
Hi!
I'm working on some math routines, and I need to see if two double's are *almost* equal. I've read
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
and tried to implement the same thing in C# with doubles. After a bit of fiddling I got this following code:
public static bool CheckedApproximatelyEqual(double a, double b, int maxSteps)
{
if (double.IsInfinity(a) || double.IsInfinity(b))
return false;
if (double.IsNaN(a) || double.IsNaN(b))
return false;
ulong aInt = unchecked((ulong)BitConverter.DoubleToInt64Bits(a));
if ((aInt & 0x8000000000000000) == 0x8000000000000000) aInt = 0x8000000000000000 - aInt;
ulong bInt = unchecked((ulong)BitConverter.DoubleToInt64Bits(b));
if ((bInt & 0x8000000000000000) == 0x8000000000000000) bInt = 0x8000000000000000 - bInt;
long dif = unchecked(Math.Abs((long)aInt - (long)bInt));
return dif <= maxSteps;
}
Now the question is how does this look? Do you have any methods you believe are better for comparing floats?
There's *AT LEAST* one problem with this implementation, and that is denormalized values. Any suggestions on how to handle them? I guess I can just round them off to either zero or the smallest normalized value depending on their value!?
|
|
|
|
|
Hi,
I need a way to search a file with regular expressions to find the following syntax:
somevariable = "daaata on maybe one line" +
"might even be continued on more lines" +
"and so on...";
So actually to get from 'somevariable ..' to the end of it at 'on...";'.
Now, I have been using regular expressions numerous times, but I cannot determine how to check this?
Thanks!
- -
Regards SirErugor
-- modified at 9:43 Thursday 19th January, 2006
|
|
|
|
|
How do i remove white spaces from the beginning of a rich text.
thanks
Nana
|
|
|
|
|
Use the Trim method...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Thanks. But it is not working. I used the enter key to return to the next line. I did that through a couple of lines before typing the data. Now what I need to do is remove those return characters from the beginning while keeping the format.
thx
Nana
|
|
|
|
|
Well those are not spaces, so logically it will not work, eh?
Then you will have to use the Replace method, figuring out the algoritm shouldn't be to hard...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
|
Hi All,
This might stem back to 'C' days and I probably ought to change my 'mindset' and other such phrases but old habits die hard. Call me Cliché Man...
When I write an applicaton, I tend to have a source file or two put aside to put all 'those little useful functions' in. You know, generic things like formatting a postal code, validating things etc. that don't fit in with a specific class anywhere. Well, using C#, I've implementing this as follows:
In library.cs:
<br />
namespace mylib {<br />
public class rog {<br />
static public int DoSomething(int arg) {<br />
return arg+1;<br />
}<br />
}<br />
}<br />
To call this function, I'm putting this in app1.cs:
<br />
using mylib;<br />
...<br />
b = rog.DoSomething(3);<br />
This seems like using a class where there is really no need. I'd like to just call 'DoSomething(3)' without the 'rog.' part.
I'm new to C# so be gentle, I'm old to C and C++ so feel free to be harsh.
Am I being stupid?
Thanks for any confirmation or denial...
Rog
|
|
|
|