|
Call this
lblTime.Text=DateTime.Now.ToString();<br /> in a loop.
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
Use 100% of CPU to change a string every second or so ?
I would rather recommend a System.Windows.Forms.Timer to periodically update the label...
Luc Pattyn
|
|
|
|
|
As a matter of fact, that was what I had in mind, but I didn't feel like explaining Timers... .
|
|
|
|
|
As already suggested you can use DateTime.Now.ToString(...formatting options...) to assign a value to the label.
However this will only assigned the date time when the code is actually executed. I read your post as wanting it to display the current time.
IMHO I would create a timer that ticks every second (or minute depending on what your clock displays) the tick event would then update the label value with the new DateTime.Now
|
|
|
|
|
I am working in C#.Net. My Application is like SmartClient application. When i try to publish in server it gives the following error. Please Help Me to resolve this problem. But FrontPage extensions is installed in server with accessibility. But I think the problem is in IIS, but not sure.
Error:
Failed to connect to with the following error: Unable to create the Web 'http://192.168.1.224/Smartdesk/'. The Web server does not appear to have the FrontPage server extensions installed.
Thanks in Advance,
Regards,
Prya
|
|
|
|
|
As it says: "The Web server does not appear to have the FrontPage server extensions installed ".
SkyWalker
|
|
|
|
|
Thanks.
But in Webserver FrontPage server extensions is installed.
Prya
|
|
|
|
|
hi
in my vs2005 project,when i set icon for my control(for example taskPane),because the size of icon is 128*128,my control is very big and i want to use icon with 32*32 size for my to fit in my form,how to convert 128*128 to 32*32 pixel in my vs2005 and does exist other way to solve my problem ?
thanks
|
|
|
|
|
Hi
I am trying to create a package programmatically. Transfering 100 or 1000 data no problem if i try to transfer millions of records it is taking more time. If i try the same through intergration project it takes only few minutes.
Any one can help me to speed up the transformation please......
kesavan
|
|
|
|
|
How to assign read,Write,share Permition of Adminstrator Account to a to a certain Directory in C#.give me idea ?
Sanjit.rajbanshi@wlinktech.com
|
|
|
|
|
|
How to add a logarithmic scale for X axis in a bar(Pareto) chart
|
|
|
|
|
HI,
I want to create a DLL for individual aspx pages,i did n't want to build entire project.
this is haneef
|
|
|
|
|
Remove the CodeBehind attribute and replace it with the Src attribute.
.NET will compiles your page on the first request to that page.
SkyWalker
|
|
|
|
|
the function of
AutoOpenComPort(long *Port, unsigned char *ComAdr);
is wrote in c/c++.
now, how could I conver it into C#?
is it :
AutoOpenComPort(ref IntPtr Port, ref Byte[] ComAdr) ?
or
AutoOpenComPort(ref IntPtr Port, ref String ComAdr) ?
or
AutoOpenComPort(ref IntPtr Port, ref StringBuilder ComAdr) ?
or some other?
Thanks your help!
|
|
|
|
|
If I understand correctly, you are using the serial port.
In this case you should, simply use the SerialPort .Net resource
SkyWalker
|
|
|
|
|
If you were to need PInvoke for this, then I guess it would be
AutoOpenComPort(ref IntPtr Port, string ComAdr)
assuming ComAdr is an input argument, not returning anything to the caller.
If SerialPort is available (NET >=2.0) and can do what you need, just use it.
Luc Pattyn
|
|
|
|
|
Hi,
Please help me.
I need to write a get method that will return a my numbers as an array of long using C#.
Please help me. I am new to C#.
|
|
|
|
|
public long[] ReturnArrayOfLong(long urNumber)
{
long[] arrLong = new long[100];
arrLong[0] = urNumber;
return arrLong;
}
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
Hi All!
I am creating an Outlook add-in using C# and VSTO 2005. My problem is, whenever I read a mail item that is accompanied by a digital certificate and is encrypted (padlock icon on the left side of the email), I encounter this message:
"Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘Microsoft.Office.Interop.Outlook.MailItem’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{00063034-0000-0000-C000-000000000046}’ failed due to the following error: No such interface supported (Exception HRESULT: 0x80004002 (E_NOINTERFACE))."
The digital certificate came from Verisign, Inc.
How can I eliminate this and still read my email?
Thanks sooooooooo much for the help.
ayee
|
|
|
|
|
Probably, your item is not a MailItem (perhaps a ReportItem or whatever).
The Inbox can also hold other types of items. Use TypeOf to check the type of the item before you access any item specific properties or methods.
SkyWalker
|
|
|
|
|
Thanks for the answer.
I've tried all possible item types (like you said it could be a ReportItem etc.) but I still can't read the Inbox item. My progarm works fine if the Inbox Item is not encrypted (digitally signed only). Does the encryption have something to do with it? It's really driving me nuts...
Thanks again.
ayee
|
|
|
|
|
The encrypted mail items are not of MailItem type (or others related), therefore you cannot cast to it. Try to declare your variable as System.Object .
SkyWalker
|
|
|
|
|
I tried doing this but I can't seem to get to read the contents of the item (maybe I was doing it the wrong way). I also tried to follow the link about Collaboration Data Objects and Outlook Redemption and it just made me more confused. Apologies for my ignorance because this is the first time that I encountered them. Bottom line is, do i have to do it in the Outlook VBA environment? Or is there any other way (using C#)?
Thanks for being patient with me...
ayee
|
|
|
|
|
it should be ...
we just cannot pinpoint at the problem
SkyWalker
|
|
|
|