I have the following code in an ImageWell resize event and have tried it in the shown event but the same happens in both. “me” is an image that I want to display at the top left of the “imgLatestUpdates” image to represent when new information is available. If I add a MSGBOX at the top of the code all works great but as soon as I remove the message box the code doesnt appear to run. Am I being stupid or should this work?
me.Left = imgLatestUpdates.left + gNewLeftOffset
me.Top = imgLatestUpdates.top + gNewTopOffset
me.Visible = True
Have you tried it with the
me.Visible = True as the first statement?
Shown event activate at once when the page has already loaded on the client. If you want to have an event which it will trigger when the page is shown everytime, create an subclass of your control and on visible property activate a custom event (ex cusShown.event) and from custom event run your code. For example, on subclass control, on visible property run : if (self.visible,RaiseEvent custShown()) and in your control add a code under of custShown event.
Thanks Antonis I will have a look at that, never played with subclassing a control so that should be fun