There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Does this require multithreading?


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
newkidtopc's Avatar
Senior Member with 363 posts.
 
Join Date: Jul 2002
Location: India
03-Feb-2004, 01:31 PM #1
Unhappy Does this require multithreading?
Hello,
I hav a project which is monitoring the alarms which are generated in the factory.
It has a function which runs continuously monitoring these alarms.My application also provides for opening , printing of the files which are used to record these alarms.
My question is if the user is printing or viewing the contents of the fault file will the monitoring process continue?
Or does this task require multithreading so that monitoring and viewing/printing of files can occur simultaneously?
If it requires multithreading can someone please provide me some useful links.
BTW the project is to be done in VB.
__________________
Thomas Edison said " Genius is 99% perspiration 1%inspiration"
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
09-Feb-2004, 11:00 PM #2
In most cases, the rest of your program will continue to run while the user is interacting with the interface. No special multithreading code is required to make that happen. I'm guessing that you're using a timer control to initiate the monitor on a specified interval in which case the system continues to fire the timer event as long as it is enabled.
newkidtopc's Avatar
Senior Member with 363 posts.
 
Join Date: Jul 2002
Location: India
10-Feb-2004, 12:06 PM #3
Thanks for replying coderitr,
I dont use timer control.
What I was asking about is that one part of my software is (a function) is continuously running checking for alarms.The alarms obtained from this function are displayed on screen.
I want that function to continue its work even if the user is viewing some other file from my applicationn itself(ie record of all faults) or say printing a file.
Does this require multitasking?
__________________
Thomas Edison said " Genius is 99% perspiration 1%inspiration"
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
10-Feb-2004, 03:06 PM #4
Is the user using the same program that's doing the scan to see the results or print the report? If so then ...

(1) How does the user notify your program that he/she wants to use it?

(2) How does the scan function launch the user screen.

Multitasking is something that Windows (and Visual Basic) do all by themselves. You don't have to write special code to handle it but if you're not careful you can hurt yourself.
newkidtopc's Avatar
Senior Member with 363 posts.
 
Join Date: Jul 2002
Location: India
10-Feb-2004, 10:52 PM #5
Hello coderitr,
Basically its a single project.The first window that opens after running the program is the main window.
The main window gives the user the option about
1: whether to run the function which monitors the alarms
2: whether to print or view the fault files etc.
The function for monitoring the alarms is in the same project.
I want the project such that even if the user clicks on the menu bar to view the fault file etc. the background monitoring of the alarms has to continue.
Hope this answers your questions.
Cheers
__________________
Thomas Edison said " Genius is 99% perspiration 1%inspiration"
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
11-Feb-2004, 08:36 AM #6
You need to create the scan function as a separate thread. Check out the CreateThread() WIN32 API for this.
newkidtopc's Avatar
Senior Member with 363 posts.
 
Join Date: Jul 2002
Location: India
13-Feb-2004, 07:50 AM #7
Thanks coderitr,
Thanks for that definite answer.
Cheers
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:25 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.