ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder
ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnView and OnDShowNewFrame and ShowModal?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  


34 Posts

Posted - Sep 04 2019 :  19:05:11  Show Profile  Reply
I have a standalone app using DirectShow with TImageEnView and it shows the camera's video as expected. If I conditionally compile it as a form in my main app and show the form using ShowModal, nothing gets displayed in the TImageEnView because the OnDShowNewFrame event does not occur so I cannot update the view.

However, if I show the form using Show rather than ShowModal it works fine, i.e. the OnDShowNewFrame gets triggered and the TImageEnView shows the video.

What could I possibly be missing?? I can certainly code it using Show, but I just don't understand why ShowModal alone would break it. I would prefer to have it be Modal. It is probably something stupid on my part like a missing property value, but I just don't know what it is. ShowModal version still captures the video to a file, it just does not trigger that event to update the view.

Also, ShowPropertyPages does not work when using ShowModal, but works when using Show. Example:
ImageEnView1.IO.DShowParams.ShowPropertyPages(iepVideoInput, ietFilter, false);

Makes me wonder if the Modality is somehow preventing certain window messages from reaching ImageEnView when used in a Modal form if not the main form



5055 Posts

Posted - Sep 07 2019 :  19:40:12  Show Profile  Reply
Hi Eric

If OnDShowNewFrame is not being called, it usually means that the TImageEnView does not have a valid handle (i.e. has no parent). So if you are creating it dynamically, ensure you set ImageEnView1.Parent := MyForm1;

If you have added the TImageEnView to a form (at design time), then I'm at a loss. Please email me a simple demo that reproduces it.

Xequte Software
Go to Top of Page


34 Posts

Posted - Sep 07 2019 :  19:48:29  Show Profile  Reply
Yes, it is being created at design time on a form (I did see that other post about dynamic creation of the view and for grins I tried setting the parent since it was in a panel on the form... no change in behavior).

I've since changed the logic to use the Show method since I had to move forward and wasn't a big deal and might be a better solution for me since that is what I was doing for doing snapshots in another form. However, I'll try to get you a demo since it is rather easy to convert back to ShowModal to include in a demo.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: