Forum  General Visual ...  How do I...?  Picturebox doesn't show immediately the image
Previous Previous
 
Next Next
New Post 4/20/2012 11:02 AM
Resolved
  ferroch85
56 posts
No Ranking


Picturebox doesn't show immediately the image 
Modified By ferroch85  on 5/3/2012 5:18:03 PM)

 Hi,

i'va a Form composed by an htmlbox docked on top and the remain space is filled by a picturebox. 

This form will be generated through the method Link.Open(MyForm) in a new browser window. The problem is that when the window appears, the picturebox will not show immediatly (but the imageresourcehandle was correctly associated with its .Image prop).

If i do one of the following actions: double click on the picturebox, press F5 or resize the browser window i can see the image loaded. So the image is loaded correctly, but i can't display it immediately.

I tried to call Update() on the form and on the picturebox but nothig. Always the same damn problem :( !!!!!

 

Marco

 
New Post 4/22/2012 1:04 PM
  palli
14324 posts
1st Level Poster




Re: Picturebox doesn't show immediately the image 

Hi Marco,

Please email a small reproducing sample application to support (see email in my signature) and we will take a look. Please include in that email the full Http reference to this thread so we can pair the thread and the email. Please also add a new message here on the thread when you have sent the email.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 4/24/2012 7:53 AM
  ferroch85
56 posts
No Ranking


Re: Picturebox doesn't show immediately the image 

 Hi Palli,

i'm trying to make you an example but it's too complicated because my solution is really complex and if i make something easier it doesn't make me the same problems. So, can you guide me and i try to make few tests for you? I know that isn't a good thing, but replicate the same problem it's impossible for me at the moment !! :-(

 

Marco

 
New Post 4/26/2012 3:50 PM
  palli
14324 posts
1st Level Poster




Re: Picturebox doesn't show immediately the image 

Hi Marco,

I understand, and in that case it's very understandable that I can't reproduce it either, not knowing your scenario at all.

Personally, when I have problems like that which I can't quite put my fingers on, I use the narrowing down process. First I make a copy of my form, preferably to a new project so I can experiment at will. After every step of the following list of steps, I check if the problem is still reproduced.

  1. I try to remove all the data dependency, so the form will run without an active connection to a database or webservice and it can run standalone.
  2. I start removing controls that don't seem related to the problem, keeping in mind that this exact layout I use in this particular form might also be a clue to the failure. Most of the time I'm doing this I manually edit the designer generated code, first cutting form.Controls.Add() lines for controls and then try running. If it stops failing, I paste back that control(s) and try further narrowing. If it still fails, I cut a few more form.Controls.Add() until I reach down to the bare minimum. During this process, you hopefully find the spot that matters. When you do, still further narrowing might be possible for example if the problematic control is a container etc.

In which order you perform these steps is up to you and your preferences. The procedure is always the same though. Narrowing and more narrowing until you find the problematic control and hopefully the problem.

Directly editing the designer generated code like this has the advantage that you know exactly what changed, and there are no related changes. Make sure the form designer is not open while you make these changes as designer updates may interfere with what you are trying to accomplish.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 4/30/2012 3:41 AM
  ferroch85
56 posts
No Ranking


Re: Picturebox doesn't show immediately the image 
Modified By ferroch85  on 4/30/2012 10:29:11 AM)

 Thank's Palli !

I found the solution: i put a Timer in the form showed inside my browser popup. The tick event doesn't anything, but in this way i can have my picturebox refreshed correctly!

Thank's

  Marco

 
Previous Previous
 
Next Next
  Forum  General Visual ...  How do I...?  Picturebox doesn't show immediately the image
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS