Jump to content
Xtreme .Net Talk

Real-Time applications


Recommended Posts

Posted

Hi!

 

I've created a Windows application in Visual Basic 6. Now I'm implementing some new features in the application which requires that I use threading. This leads to that I need to redesign the whole class structure.

 

Since I'm redesigning I'm considering rewriting the program in C# mostly for learning purposes.

 

My question is now, what method is best to use to make real-time C# applications. I've been looking a bit at Messaging but someone told me that you use something callled Delegates in C#. My need is basically to have a listener thread that just waits for incoming requests and forwards them to a handler-thread. This handler-thread then creates standalone-singlethreads that does a task then dies.

 

Ps. I'm not a very experienced Windows-programmer. The VB application was my first Windows application and my first VB application. However, it contains maybe 500 rows of code.

 

 

 

Thanks in advance

 

Lews

  • *Gurus*
Posted

Windows isn't guaranteed to be realtime in theory, but in practice it'll probably be fine for your needs with threading.

 

I would suggest you read up on the ThreadPool class, since it is geared to create and allocate threads as if sees fit, indented to help with applications such as yours. It would probably save you some code.

 

Maybe if you told me a little more about what your application does I could help further.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted

Actually the program has no real-time requirements. I will explain the problem a bit better.

 

Right now the program works something like this. I have an Outlook addin that adds a button in MS Outlook. If you select an e-mail and press the button the addin will send the required information to a .dll which will give the message an id-number and store it to disk, and then print the e-mail with a background picture.

 

As the design is now the program locks Outlook for a while so that you can't do anything else but wait. However, I'm going to add some features that increases the processing time alot plus that I want to be able to print several e-mails at the same time with the application. With the current design this would mean that the user had to wait for several minutes without being able to do anything else in Outlook.

 

To avoid this I want to create external threads that is started from the addin and then lets the user work on in Outlook at once. I have no need to return any information to the addin so the addin can send the needed data to the .dll then forget about it.

 

I'm creating both the addin and the .dll file so I could combine them into one project if I want it makes no difference, as long as the problem is solved.

 

 

 

I hope you got a better picture of what I'm trying to do now =).

 

 

 

Lews

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...