|
Luc, your assumptions are incorrect. I have not chosen to live with it, I am currently attempting to get it to work. I need to render .pcx images and don't have another way of doing it in .NET, so I found imageMagick, which worked great in 2005 for over a year, and thought I'd be able to get it to work in 2008...it is what I am trying to solve.
Breakpoints never gave me trouble, ever... the code never hits the module, it errors on it's call, therefore I'm not sure if it is imageMagick or something else.
The code I'm omitting is just setting variables as flags, checking other flags for setting a tab panel control, clearing the imageBoxes, and redering 23 images instead of the few I actually posted. The code simply never gets to this routine at all. It is the populate_Images call that fails, consistently and it is the first call to this routine (which at this point is done on my initial page load). No images are rendered at this point, that is what the populate_Images routine does.
Thanks for all your help
|
|
|
|
|
OK,
1.
something cannot be right. populate_Images() is a regular C# method, it is part of your code, so it does not need another file and it can't be missing or not be found. It can only go wrong inside populate_Images(). So I would add a log statement inside and see it gets executed.
BTW what where the results from the try-catch?
2.
ImageMagick is a library and optionally also an ActiveX component isn't it?
When you install it, there are several checkboxes, one of them makes it available as an ActiveX component, did you check it during installation?
3.
Is GetList() the first call into ImageMagick? Doesn't the library need some initialization? What is inside the ImageMagick constructor? Is the constructor your code, or is there a .NET wrapper available publicly?
4.
Maybe something went wrong with its referencing, so I suggest you:
- remove all ImageMagick stuff from your project (and from the GAC if you use it)
- comment out the calls to it
- re-add a reference to it
- retype the statements using IM while watchinh intellisense works for it.
-
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Thanks again Luc.
1. I added a simple log file write to the module as well as wrapped the entire module in a Try...catch error handler, per your suggestion. On the catch I placed a simple Console.WriteLine(ex.Message); None of this code ever fires, the application stops with the original error at populate_Images(0,19);
2. my install of IM seems different from what you describe. I got the code from this site at:
http:
The instructions are to unzip 3 downloads onto a single folder in a specific order, than to run the install.bat (which is not included, though there are 3 others clean.bat, install-full.bat and install-safe.bat), so I ran the install-full.bat and opened the solution. ran it after copying the missing .dll to the bin/releaseq8 folder and chose the activex control to run. Took the compiled DLL and placed it along with the .pdb library for reference into my vs2008 folder and referenced them in the applications. Same I did on vs2005 the 1st time and it was great.
3. GetList() is not the 1st thing I do, on the:
public partial class formEmergePatDB : Form
before the form load I have the following code (not sure I need this, following the working vs2008):
public ImageMagickNET.ImageList imageList;
4. I will try to remove all IM references, but I don't see how that will change anything since the code never fires at all. Then I will re-compile and re-reference the dll and library and not sure what else, all of this seems like shots in the dark.
Thank you so much for your time and patience Luc
|
|
|
|
|
Hi,
My suggestion about removing, then reinstalling the references to ImageMagick is based on the possibility you managed to build, then something happened to IM so the references got broken. Hence, the suggestion to re-establish references and rebuild.
I happen to use a native (VB6) application that calls on ImageMagick (native code), so I know how to install that one. However I was unaware of any .NET version, or .NET wrapper, or the article you referred to. Thanks for the info though, it will be useful to me some day.
The article has its own blog, you might want and post there, so the author or someone else might come up with something.
I looked at the batch files, the full install needs two .reg files, did you find those? I didn't. Without them, the necessary registry entries will not be present; and with them, it may fail on Vista, because at last Vista implements some registry protection. Are you using Vista?
Final tought: since there are lots of DLLs involved, one probably calling all the others, the folder holding them might need to appear in the Windows PATH environment variable.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Here's what I would do.
If the assembly containing the faulting code is unmanaged/mixed mode, I'd try opening it in Depends[^] and see if there are any missing dependencies.
If it is managed, I'd try enabling Fusion logging [^] and checking out the exception stack trace for the missing dependency.
|
|
|
|
|
Hello everyone,
I am writing a service that needs to do different things depending on the session state, I am currently handling the OnSessionChange event, but I'm running into a little bit of trouble:
if I turn on the computer and log in right away, the service has not started by the time I log in and that first log in is not registered in my service.
My question is: is there a way to read if there is a user logged in and what state the session is in (logged in, locked, remote logged in, etc) that I can check during the OnStart event?
|
|
|
|
|
I want to use an editable combobox. I set the DropDownStyle as DropDown. Now I'm unsure what event to use to collect the value of whatever the user inputs. I've tried comboBox1_TextChanged and comboBox1_TextUpdate, but they are triggered as soon as the first character is typed. I tried comboBox1_SelectionChangeCommitted, which wasn't triggered at all with the edit.
I'm sure this must be something simple that I'm missing.
Thanks!
|
|
|
|
|
If you're trying to get the Text that was typed into a combobox all you need to do is read the comboBox.Text property.
|
|
|
|
|
Actually, I am trying to find an event that will tell me that someone has finished entering text, so that I can then read the comboBox.Text property. The combobox_TextChanged event fired immediately after the first character is input. I'm look for an event that will recognize when the input is committed. I'm not sure how combobox_TextUpdate is different from combobox_TextChanged.
|
|
|
|
|
Hi,
OldSchoolToC# wrote: I'm not sure how combobox_TextUpdate is different from combobox_TextChanged.
that detail is hidden in the documentation.
OldSchoolToC# wrote: someone has finished entering text
how could anyone tell? do you do something special when entering the last character? Your app won't read your mind, so either you implement a time-out mechanism (bad idea), or you make the user do something special, like clicking a button to start acting on the new information. How does the find dialog work in MS Word or Windows Explorer? it has a TextBox and a "Find" button.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
What about using the LostFocus and TextChanged event (I think that's it)? You could set a flag in the TextChanged event, and if that flag is true on LostFocus, then your change is committed.
Or, use OnKeyPress and check that the Enter key was pressed.
Dybs
|
|
|
|
|
Thanks! Your suggestion is very helpful. I think I have a good idea now of what I need to do.
|
|
|
|
|
And what if the use want's to cancel and not use the data typed into the Combo?? His idea is not a good one... Clicking on a Cancel button will cause the LostFocus event to fire on the Combo first.
|
|
|
|
|
Good point, I didn't think about cancelling the change. In that case, forget about LostFocus and just use OnKeyPress and require the user to press Enter or Tab to commit the text. I think for a lot of people it's just habit anyway to press Enter or Tab when you're done entering text for a field.
Dybs
|
|
|
|
|
Can you find something like Validating or Validated event in combo box..
|
|
|
|
|
I have a situation where I need to do a lookup on a table with 3 million records against a table with 150 million records.
I can't think of any fast way to do this in normal c# code, so I think a join on the table would be the most appropriate. Only problem is that the resultset at the end could potentially be 3 million records.
How would I go about going through all these records without attempting to load them all into memory at once with a DataSet. Any ideas would be great.
Thanks in advance
|
|
|
|
|
Pick 'em off one at a time with a DataReader[^]? Might take a while to process though
I are troll
|
|
|
|
|
That depends on what you want to go through them for. If it's some conditional value, then create the recordset from an sql statement and use sql to parse down the data to just what you need returned to the client.
Also if there is any user interaction between using these records, you're better off returning just the row or a page of rows at a time.
EDIT: Also to save you're sanity, make sure the joins and and parameters are using indexes. Otherwise you could age before you get your data.
The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.
|
|
|
|
|
I am working in a Windows application using C#. I have a text box and a button. After entering something in the text box and pressing the button it should output the number of letters of the word.
For example if I type "Good"
it should display
There are 1Gs
There are 2Os
There are 1Ds
case sensitivity is not an issue here.
Should I use Linq for it or use something else
|
|
|
|
|
Hi,
You could do that with the oldest .NET version, you don't need all the fancy stuff, it just complicates simple tasks like this one. Besides, you asking this tells me you are not ready for the fancy stuff anyhow. How about buying a tutorial book on C# and working your way through it?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
First off, I have read this article:
http://msdn.microsoft.com/en-us/library/bb264562.aspx#[^]
And I have created the classes it mentions and I understand how to change the properties and all that. That is the easy part.
My problem is how do I get the installer to trigger this wrapper during the application install process to get SQL Server installed?
I have made many setup packages, but I've never tried to roll the installation of SQL Server itself into the setup package and I'm hitting a major brick wall and just can't get it figured out.
I have my application, let's call it "MainProgram". I then created a secondary application called "SQLInstaller" that consists of the classes outlined in the article, and have built that exe. What I can't figure out is how to make the installer run my "SQLInstaller" during the installation of "MainProgram". I'm sure I'm making this more difficult than it needs to be, but I've just not been able get it, and all google articles seem to merely point back to the original article I've already read.
Any assistance that would clarify the missing pieces would be greatly appreciated.
|
|
|
|
|
I hate to be that guy that bumps his topics, but I'm really hoping someone out there has a sample project or something I can look at to help me figure out where I'm going wrong
|
|
|
|
|
Hi
VS2005 winforms
Is it possible to programatically open a dropdown list?
- similar to a user clicking on the button on the right hand side?
Thanks,
Chas
|
|
|
|
|
if you're talking about the drop down list in a combo box then it's: comboBox1.DroppedDown = true;
|
|
|
|
|
Thats what I was after
Thanks
Chas
|
|
|
|