|
Have you tried using the Stopwach[^] class? It uses a high resolution timer, if available on the system.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
That is the exact class i am using for the timing. It is highly accurate and that class is definetely not the problem.
I know from a very accurate soundbased reaction time measuring device, that my reaction times are about twice as fast, and more consistent than the ones i measure using a SoundPlayer, StopWatch and a KeyDown event. I have the feeling that this is because of small delays everywhere in the system (Windows is not a RTOS), but i have no idea what to do about them.
ASCII tables, HTML entities, types, string formats and more info for the nerdy coder at: www.codecharts.com
|
|
|
|
|
I'm trying to add images dynamically to an open xml spreadsheet.
I can add images to the package easily with
ImagePart imagePart = picturesWorksheet.WorksheetPart.AddImagePart(ImagePartType.Jpeg, imageId);
System.IO.BinaryWriter writer = new System.IO.BinaryWriter(imagePart.GetStream());
writer.Write(System.Convert.FromBase64String(base64Image));
But I can't seem to get them to appear on the worksheet, no matter what I've tried doing with the WorksheetDrawing object it just won't work!
If anyone has some sample code that would be great, as I've been scouring websites for hours with no success.
|
|
|
|
|
Hello All,
Is that possible to acquire a thread by specifying thread ID. Eg. I want to use thread ID 15 (or some number) only for my process, is this possible?
Thanks
|
|
|
|
|
No. You can't steal a thread from another process. If you did, how would you know what to do with it ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
My plan is to get hold of thread waiting for Async IO to complete and make it sleep. so that process will choose different thread to process call back.
E.g. Thread 15 is waiting for IO to complete. I want to make thread 15 to sleep. So, when call back comes after IO completion, that should get processed on different thread than 15. Am Trying to reproduce thread switching scenario.
I guess its difficult to reproduce.
Thanks.
|
|
|
|
|
Member 2324483 wrote: My plan is to get hold of thread waiting for Async IO to complete and make it sleep
The main advantage of async operation is non-blocking fashioned execution. It uses less resources and won't keep any threads in blocking.
Member 2324483 wrote: Thread 15 is waiting for IO to complete. I want to make thread 15 to sleep. So, when call back comes after IO completion, that should get processed on different thread than 15
You said Thread15 is doing IO operation. So if you put it in sleep, how come that operation will end? Also there is no way to put a thread in sleep from another thread. Please explain why you need this.
|
|
|
|
|
Hello gentlemen,
I would like to write a service and an form appl.I need to obtain data from service to my form application(some information). Is it possible? If yes, could you give me a hint?
Thank you very much.
|
|
|
|
|
daavena wrote: Is it possible?
Yes.
daavena wrote: If yes, could you give me a hint?
It can be done via Inter-Process communication. Possible solutions are:
Pipes and .Net Remoting/WCF
|
|
|
|
|
Thank you. I will check it.
|
|
|
|
|
Glad to help you
|
|
|
|
|
I have the Service write an XML file, then many users of the application can read the file.
You could also use a database.
|
|
|
|
|
I`m trying to embed Excel in Windows forms. I`m following the example in
http://www.codeproject.com/KB/office/Embedding_Excel.aspx
Everything seems to work fine, but I want the Tool Bar for Excel [Very Important] . I can`t seem to enable the Toolbar in windows forms. Can anyone please go through the code in demo and see what needs to be done. I`m completely lost and frustrated. Also, I want to save the excel file, what is the way to go about that, since its already open.
|
|
|
|
|
|
Cool App! Not what I`m looking for. I need to use windows forms and excel embedded in it.
|
|
|
|
|
sharat567 wrote: I need to use windows forms and excel embedded in it.
Why not just host it?
|
|
|
|
|
Can you please elaborate. What exactly do you mean by hosting? Like in a web browser? I already do that.
|
|
|
|
|
No, like it is done by Window Tabifier. Start Excel and set parent of excel form to your form.
|
|
|
|
|
Hi
i don't know why the "Create GUID" tool is disable in my Visual Studio 2005 IDE.
also i could not found guidgen.exe in this path :
D:\Program Files\Microsoft Visual Studio 8\Common7\Tools
Can anybody help me about this issue ?
i'm using Microsoft Vidual Studio 2005 Professional Edition
Thanks
|
|
|
|
|
|
hdv212 wrote: also i could not found guidgen.exe in this path :
D:\Program Files\Microsoft Visual Studio 8\Common7\Tools
I think guidgen.exe is installed as part of the SDK.
Is there a copy here? D:\Program Files\Microsoft SDKs\Windows\...<version>...\bin
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
|
Hello everyone,
I'm building my own library. But I'm kind of stuck and it is really tough to explain, but I will try:
I have a class, let's call this X. X has an interface and a base class. X also inherets another class (called Y).
Now I call some base functions and give X as a parameter.
But I would like to know if it is possible in another baseclass?
To sketch it up in code, it looks like this now:
class X : Y, InterfaceX
{
public X()
{
}
bool function1(String txt)
{
return base.function1(this, txt);
}
}
class Y
{
bool function1(InterfaceX x, String txt)
{
return true/false;
}
}
And what I would like to have is something like this:
class X : Y (& Z), InterfaceX
{
public X()
{
}
}
class Y
{
bool function1(InterfaceX x, String txt)
{
return true/false;
}
}
class Z
{
bool function1(String txt)
{
return base.function1(this.getParent(), txt);
}
}
Is this possible, and if it is, how can I implement this?
Thank you very much.
|
|
|
|
|
Class X can't inherit from Y and Z because C# only supports single inheritance (unfortunately). You could have X inherit from Y, and Y inherit from Z. Or you could have X implement multiple interfaces.
Also you need the keyword "virtual" on the virtual methods in your base classes, and the keyword "override" on your overridden methods in the derived classes.
Another possibility is the Decorator design pattern, which lets you define inheritance (single or multiple) at runtime.
|
|
|
|