473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

VB6 - multi-threading?

8,435 Expert 8TB
Hi all.

I've only discovered "thescripts" recently, and just realised it's probably the ideal place to ask a question that has been in the back of my mind for a few years now.

I have an old application I was writing some years back (on hold for some time now), which involves running through a bunch of image files, loading them each into a picture box. Every now and then the picture box hits one it can't display, and locks up. This is out of my control (the images can be from anywhere), and since it's the picture box object having problems I can't trap it. There's no error, it simply stops responding.

Is there any way I can have some code in a separate thread watching for this, and somehow kill off the dead thread and start it again? Even if it could just stop the program, or show a warning dialogue, or even just beep or something, that would be an improvement over simply freezing.
Oct 20 '06 #1
5 3748
Killer42
8,435 Expert 8TB
So, apparently nobody knows an answer to this one?
Nov 9 '06 #2
Killer42
8,435 Expert 8TB
Still no thoughts on this, anyone?
Feb 15 '07 #3
Esmael
58
HI SIR...

Can u pls... show your codes... maybe i can give you some advice/answer.


Thnx...
Feb 16 '07 #4
Killer42
8,435 Expert 8TB
HI SIR...
Can u pls... show your codes... maybe i can give you some advice/answer.
Sorry, it's not really feasible to post the code in this case. It's way too involved, plus it's an old project which is archived somewhere - I'll need to dig around though old disks to find it.

Besides, there isn't any particular code which has a problem. The problem arises when the program simply uses LoadPicture to load images into a picturebox one by one. There are certain images which just kill the PictureBox control, whenever they are loaded into it.

I was just fishing for any sort of ideas on how such a thing might be achieved in VB. I'm beginning to suspect that it can't be done in VB6.

The best idea I've come up with so far is to run a separate program and have them talk to one another somehow, such as DDE. Then hopefully the "watchman" can cancel the main app if it stops responding for a set time. Maybe even start another copy to continue the process. As it stands, the program records a flag saying which image it is about to process. When it starts up, if it finds that flag, it marks that image as one to be avoided and doesn't try to load it. That way I can just can the program and run it again. What I'm hoping for is a way to automate (or avoid) this.

One of these days I'll get back to this program, but it's not really urgent.

Actually, now that I think about it, the need may even have ceased to exist. Given that a few years have passed, the latest version of the PictureBox control may no longer have the lock-up problem.
Feb 16 '07 #5
Esmael
58
Hi...SIR

I see. But i never encounter that problem sir... because i'ved never experience that with the LoadPicture.... i even try it to VB Form Icons..etc.... and it works well.... I not sure if it has something to do with the VB Service Pack...


Have a nice day....
Feb 16 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Frank Jona | last post by:
Intellisense with C# and a multi-file assembly is not working. With VB.NET it is working. Is there a fix availible? We're using VisualStudio 2003 Regards Frank
12
by: * ProteanThread * | last post by:
but depends upon the clique: ...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
6
by: cody | last post by:
What are multi file assemblies good for? What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a single multi file assembly (A.DLL+A.NETMODULE)?
6
by: Joe | last post by:
I have 2 multi-list boxes, 1 displays course categories based on a table called CATEGORIES. This table has 2 fields CATEGORY_ID, CATEGORY_NAME The other multi-list box displays courses based on...
4
by: mimmo | last post by:
Hi! I should convert the accented letters of a string in the correspondent letters not accented. But when I compile with -Wall it give me: warning: multi-character character constant Do the...
5
by: Shane Story | last post by:
I can seem to get the dimensions of a frame in a multiframe tiff. After selecting activeframe, the Width/Height is still really much larger than the page's actual dimensions. When I split a...
5
by: bobwansink | last post by:
Hi, I'm relatively new to programming and I would like to create a C++ multi user program. It's for a project for school. This means I will have to write a paper about the theory too. Does anyone...
0
by: Sabri.Pllana | last post by:
We apologize if you receive multiple copies of this call for papers. *********************************************************************** 2008 International Workshop on Multi-Core Computing...
1
by: mknoll217 | last post by:
I am recieving this error from my code: The multi-part identifier "PAR.UniqueID" could not be bound. The multi-part identifier "Salary.UniqueID" could not be bound. The multi-part identifier...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.