[DevExpress Support Team: CLONED FROM T590737: How to enable DirectX in PictureEdit]
In one of my forms, the picture is not displayed until the mouse hovers over it (normally it is displayed at all times).
PictureEdit - An image is not displayed unless it is hovered when DirectX is enabled
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
Hello Eaton,
I tried to reproduce the issue when an image is not initially shown in PictureEdit, but my attempts were unsuccessful. Would you please modify my sample, share your own one or, at least, provide us with the problematic form’s files so we can reproduce the issue on our side? I look forward to your response.
Strangely, I cannot reproduce it in my real app today. I'll let you know if I narrow it down.
Thank you for keeping us informed, Eaton. Please feel free to reactivate this ticket if you face this behavior again.
The issue has returned in 17.2.8, what did you change? Worked fine in 17.2.7.
I also got this unhandled exception when closing the window:
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'PictureEdit'. at System.Windows.Forms.Control.CreateHandle() at DevExpress.XtraEditors.BaseEdit.CreateHandle() at System.Windows.Forms.Control.get_Handle() at System.Windows.Forms.Control.CreateGraphicsInternal() at System.Windows.Forms.Control.CreateGraphics() at DevExpress.XtraEditors.PictureEdit.ForceRedrawCore(Rectangle clipRect, Boolean setDirtyRect) at DevExpress.XtraEditors.PictureEdit.ForceRedraw(List`1 rects) at DevExpress.XtraEditors.PictureEdit.DevExpress.Utils.DirectXPaint.IDirectXClient.RenderDirtyRects() at DevExpress.Utils.DirectXPaint.AsyncAnimator.ProcessFrameStep() at DevExpress.Utils.DirectXPaint.AsyncAnimator.MyControl.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Hello Eaton,
Thank you for reaching out to us. We did not modify the PictureEdit control in version 17.2.8, thus it is not clear to me why this issue occurs. Would you please clarify if the issue is reproducible with the sample I attached earlier? If not, is it possible to provide us with your application illustrating the problematic behavior for further investigation? As for the exception, in order not to mix multiple questions within one thread, I created a separate ticket on your behalf - PictureEdit - ObjectDisposedException is thrown on closing a form. I will address it shortly.
Hi Aleks, I've come up with a sample project that showcases this behavior on the latest release, 18.1.3.Please download and run it. Included is also a video of the behavior so you know how to reproduce it.
Thank you for the project, Eaton.
I've reproduced this behavior and passed this ticket to our developers for further research.
We'll notify you once we make any progress.