|
Yes, since you need to do any updates to the UI from the thread they were created on (this would usually be the main thread in your program). I suggest using a BackgroundWorker[^]. You can assign it to do all non UI related work in DoWork and then use ReportProgress and RunWorkerCompleted to update your UI in a thread safe way.
Standards are great! Everybody should have one!
|
|
|
|
|
|
Programm3r,
Just on a side note, you don't need to declare two delegates. Only one. Since a delegate is determined by the params its passed.
Just thought i'd tell you that so it saves you time in the future if you need to use a lot of delegates. I hope you understand, if not, say so and i'll find a URL that explains it better.
Regards,
Gareth.
|
|
|
|
|
Hi Everybody,
I have an application, in which many parameters has to be combined and it has to be encrypted and then it has to be resized to a smaller text and the it has to be stored and in future this has to be expanded and I have to decrypt and restore the same parameters.
Can any one help in this regard?
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Chain some streams together. You want to write your data to a compression stream and feed that to an encryption stream.
Going the other way read from a decryption stream to a decompression stream to a normal stream.
This http://support.microsoft.com/kb/307010[^] tells you about encryption streams.
Off the top of my head I believe there is a compression stream somewhere in .NET2.0. If not the free assembly ICSharpZipLib has what you need.
Regards,
Rob Philpott.
|
|
|
|
|
My question pertains to the native code.
When i underwent the following line ----
When you compile code that uses the .NET Framework library, you don't immediately create operating system–specific native code. Instead, you compile your code into Microsoft Intermediate Language (MSIL) code. This code isn't specific to any operating system and isn't specific to C#.
Just-in-Time (JIT) compiler compiles MSIL into native code that is specific to the OS.
I understood that native code is the binary code (0,1)
Am i right ?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Yes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Pankaj Garg wrote: I understood that native code is the binary code (0,1)
Am i right ?
Not really, no. Binary is a number system. Native code is referring to Machine Code[^]
led mike
|
|
|
|
|
Hello,
I am using Domain Specific Language(DSL) tool to create some task flows.
We can add Icon Decorator in DSL designer which can contain an image but this image can not be modified at run time.
How should i make sure that the DSL can supply the default image as an Icon Decorator but it can be overridden at run time?
Thanks.
|
|
|
|
|
Getting the current cpu temperature is proving very very difficult.
Ive looked into WMI which although there is a WIN32_temperatureProbe [CurrentReading] this is not currently
availble (future production) or is very limited to certain boards.
So Ive hunted around and come across that I can get the information via Ring0 access!
Great! errrh.......what do I do?
So I havent found any info on how to actually program this (apart from c# wont work with it).
I really just want a assembly object that my c# can call
1.amount of cpu(and cores)
2. cpu temp?
has anyone or does aanyone got the know how on how to do this?
being a c# and vb programmer my knoweldge is limited.
|
|
|
|
|
ziwez0 wrote: I can get the information via Ring0 access
ring0 basically means kernel level in windows world, which is to be expected if you want to query hardware properties and state. you have found the way to interact with kernel through
ziwez0 wrote: WIN32_temperatureProbe . You can't improve much on this, and not at all in managed code.
CPU usage is another thing, which u can access through managed code(c#). Try looking into System.Diagnostics namespace especially PerformanceCounter class and related.
there are no facts, only interpretations
|
|
|
|
|
Hi, nah dont need usage just need temperature for each cpu.
|
|
|
|
|
hi i tried to compare 2 dates where i stored both in database
both dates are in mm/dd/yyyy format
cmd.CommandText = "select birthday from contact where birthday- reminder <= 7";
how do i run that query ?
thanks
|
|
|
|
|
If you are using Sql Server 2005 you can use DateDiff[^]
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
U can Put the value of Birthday and Reminder on Veriable then U can Easily Companre .
Else
u can use Datediff function
:~9250168195
anubhava.prodata@gmail.com
|
|
|
|
|
U can Put the value of Birthday and Reminder on Veriable then U can Easily Companre .
Else
u can use Datediff function
Anubhava Dimri
9250168195
anubhava.prodata@gmail.com
|
|
|
|
|
can i take ( 2/13/2008) - 3 days..
i cant use the datediff to deduct..
please help..
|
|
|
|
|
Put the Value of Date in DateTime Variable
Then U can easily deduct date value
Like
Dim var_date as datetime
Var_date = "2/13/2008"
var_Date = Var_Date.days - 3
Anubhava Dimri
9250168195
anubhava.prodata@gmail.com
|
|
|
|
|
hi friends..
How to draw grid dots using graphics (like autocad) and i want to differentiate the grid point when the cursor is in grid point(like the grid point blinks).. How can i do this ..
|
|
|
|
|
hi all,
I am a beginner in C#. I want to Send and receive files through parallel port. Since i am working in Windows 2000 Professional, I used Inpout32.dll for parallel port access. I used 0x378(data register)(888) for sending and 0x379(status register) for receiving. I can send data as 1 byte . But on receiving side, data received is different.
Eg: If i send 1 , i will get ---- as 136
for 2, i wil get 144.
for 15 - i wil get 0.
Does anyone can help........?
Thanks
Anez.A
|
|
|
|
|
Hi,
Some of the status inputs are inverted...
Here is a link showing which ones are.
http://www.doc.ic.ac.uk/~ih/doc/par/[^]
Also... there only appears to be 5 inputs... so how can you receive 8 bits (1byte).
Matthew Butler
|
|
|
|
|
Thanks Matthew.....
then, how would i get the data?
i wan to get the data i sent. On sending, we send as 8bits.(1 byte).
How can we receive tat data using 5 bits?
any idea...?
Please help yar..........
Once again Thanks..................
Anez.A
|
|
|
|
|
If your are using a DB-25 port then...
According to Wikipedia... (Quote)
<br />
Monodirectional parallel ports<br />
In early parallel ports the data lines were monodirectional (data out only) so it was not easily possible to feed data in to the computer. However, a workaround was possible by using 4 of the 5 status lines. A circuit could be constructed to split each 8-bit byte into two 4-bit nibbles which were fed in sequentially through the status lines. Each pair of nibbles was then re-combined into an 8-bit byte.<br />
The general idea with parallel ports is that you only send 'Data' in one direction (away from the computer) and only send back status bits.
When you receive data it shouldn't go 'into' a parallel port, it should be read (all 8 bits) onto the controller (microcontroller etc) port.
When sending data back, 4 bits of the controller's port should be connected to four of the status bits (see wiki page) and then the fifth status bit could be used to say which nibble (half-byte) is being sent.
To summarise...
The computer (the master) has 8 bits output, and 4 (or 5) bits input.
The device (the slave) will have as many pins as needed (8 bits receive, 4 (or 5) bits send).
You need to send data from the slave to the master in two (half-byte) sections.
[Also: Is there any particular reason why you are using parallel ports? (Serial is really simple to use)]
Hope this helps.
Matthew Butler
|
|
|
|
|
Thank u dear...
as u said, serial is better. But i used to transfer data between an instument and Computer via parallel port(Since interface provided by the instrument is Parallel Port (db 25 pin connector), i have to use this port for data transfer)...
Once again,
thank u for ur reply
|
|
|
|
|
hi friends..
I am doing my coding in console application... How to add images to tool strip menuitem without giving the image path like
Image im = Image.FromFile(@"C:\\Local Files\\VisualStudio Projects\\new.bmp");.....Can any one know help me....i want to create image form itself(like resource file in visulstudio)...
|
|
|
|