Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

ZomToFit property odd behavior in VDM 2011

Hello,

I guess it happened to me to encounter the minor bugs in VDM 2011 for Visual Studio Smiley Happy . I created this subroutine to initialize the viewers in my project:

 ''' <summary>
    ''' Setting up the viewer to be colored and filled with the dedired color
    ''' </summary>
    ''' <param name="img">the image viewer</param>
    Friend Sub SetUpImageViewer(ByRef img As ImageViewer)
        With img
            .Image.Type = ImageType.Rgb32
            .BackgroundOptions.FillStyle = BackgroundFillStyle.Solid
            .BackColor = Color.Black
          .ZoomToFit = True
        End With

 

I have noticed two observations:

  • The first one was same as previous versions (2009 and 2010) that setting the BackColor property in the properties window has no effect on the runtime color. It is only changed in design time. I think it is because BackgroundOptions property doesn't exist in property window which should be set to Solid.
  • The second observation is that the ZoomToFit proprty is not activated until the user clicks the image (which is weired). In other words, even it is set as seen above, the image is loaded in full size, once I clicked on it (pan mode), it zoomed to fit.

 

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 1 of 1
(2,791 Views)