As you said GDI doesn't handle tiff images and this this control does so it is probably safe to say that it uses some other proprietary library to do this. Regardless, the fact remains that this error occurs on my development box only when I run it as a service without access to the desktop. When I run it as a console app or give it access to the desktop it runs fine. Also the service does call another app to combine tiffs. This second app uses a library written in .net 2.0 and itself uses GDI+ and the app runs fine in all the situations I have mentioned whereas the vb6 app doesn't when it is run from a service(with or without desktop access on the client server).
Forget different machines for a second. I don't know why it works on the same machine(the client server) from a console app but gets the out of memory exception when running from a service and the error is occurring in a separate app which doesn't change between the two versions of the parent app. I don't think it's a dependency issue. I mean if I was calling a vbscript with everything the same and the script ran from the console app but not from the service, would you be saying the check the dependencies?
Well, there's a bunch that changes between a console app, a service, and a normal Windows app. Apartment models, message pumps, execution environment, ... The dependancies DO change depending on if the app is a console or a Windows forms app.
If you really want to get to it, I'd probably contact whoever wrote the controls/classes your app is using and see if those controls/classes have been tested in Console and Service apps and if they have threading apartment model restrictions.
Any "normal" code doesn't really change between the different app types, but the framework around your app does and so do the requirements of third party components.
I mean if I was calling a vbscript with everything the same and the script ran from the console app but not from the service, would you be saying the check the dependencies?
Not exactly a good example since the script runs in a completely seperate (and consistent) execution environment.
I apologize I'm an idiot. I didn't read my logs correctly and have found that the out memory error occurs on the desktop app as well. But it is sporadically. It will process a whole bunch and start getting the error for the next bunch of images. And I can rerun some of the ones that fail and they work. Could it be that the VB6 app is just not cleaning up properly when I shut it down?
I am going to develop a remote PC control software as a part of my project work in C#.Net ...... Plz tell me some of your valuable suggestions on this topic......or any new features which has to be introduced .....
Is it possible in C#: I want to monitor the file system for when a specific file is deleted from the Firefox cache folder. I've tried using Process Monitor but it has a bug when writing out its logs to disk making it useless.
FileSystemWatcher seems interesting but I *need* to be able to identify the process which caused the deletion.
How can i achieve file system monitoring AND identify the process which has removed / modified a specific file on my WIndows XP system
The FSW will not tell you who deleted the file, nor the process that did it. Truthfully, NTFS does not track such information, so there really isn't any API call you can use to do this.
As terse as the first replier's post was, he is essentially correct. You have to intercept the I/O calls to the kernel deleting the file. The problem is you can't write that intercept layer in C#, or anny managed language. The only supportable solution would be to write it in C++. Though, for something like this, you've going to have a hell of a time finding people with experience doing such a thing.
I have to devleop a application which will monitor a database for new jobs. As soon as a new job is created, engine will pick up the job and process it. Engine will be multi threaded so it can process multiple jobs simultaneously. This will be my first application to use threading so I have couple of confusions:
1. Engine will be running on 4 machine simultaneously so how do I make sure only one engine picksup a job at any one time.
2. In case one engine crashes, How do I restart the jobs for that engine using another engine.
3. How can I monitor the health of each engine.
Any help with the database and engine design is appreciated.
You may get a better response in the Design and Architecture forum.
1 Implement some logging/flagging system indicating the status of the job and who is doing the work
2 Make you logging/flagging time sensitive (use a timestamp) and have another process monitor the job processing
3 Design you engine to publish its state periodically and have 2 monitor it.
Anything more than general statements like the above are going to require more detail and that is your job after all.
i have a simple winform app which have a dataGridView to display Orders table from northwind database. i want to display foreign keys in dataGridView with some related column from reference table, for example display CompanyName instead of CustomerID (even display customerID in comboBox). for this, i change my dataGridViewTextBox column type to comboBox, then bind it to customerBindingSource (which fill out from Customers entitySet), then set DisplayMember and ValueMember to customerID, but at runTime it does not display corresponding customerID for that order (display nothing) for loaded order records.
Here my disegner generated code (the CustomerID is my dataGridViewComboBox column):
I'd like to know if a user scrolls my ListView, since .NET (weird?) doesn't support this. Now I've found several articles (on Google) which tell me I need to create a Virtual ListView and override WndProc. I've done this but: 1) The control is terribly slow, and I can't just drag it on the form, meaning I need to create it in code. Is there any easy way to check if a NORMAL ListView gets scrolled? I also need to know the difference between Scrolling Up, and Scrolling Down.
For WPF, I think you can just hook the ScrollViewer.ScrollChanged event, and you're golden...
As for WinForms... Never noticed they didn't have an event for that... Well, you could catch the various mouse events, and look for changes in the TopItem property... Bit easier than hooking WndProc, but not as direct.
Using WinForms But I don't care about the internal layout of the Listview, I only need to know if a listview has focus, if the scrollwheel is scrolled. And if so, if it was scrolled up or down.. Can't seem to find anything fitting this purpose. Any ideas on this?
For mousewheel actions, there is a MouseWheel event.
However there probably are other ways to cause a scroll which you also would like to get (for consistency if nothing else), such as clicking in the scroll bar parts, using the arrow keys, maybe performing a find on the content, etc.
Therefore I would be inclined to use the Paint event: just add a handler to Paint, and compare TopIndex to its previous value. You will get some redundant events (e.g. when uncovering part of the Form), but that would be OK I guess.
BTW: I said "add a handler", not "override OnPaint", as you still want the original painting to occur.
Luc Pattyn I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages Local announcement (Antwerp region): Lange Wapper? Neen!
Last Visit: 31-Dec-99 19:00 Last Update: 7-Feb-23 20:28