3 Attachment(s)
[RESOLVED] Unknown Overload Exception
I am doing a little experimenting (never a good idea when you aren't that knowledgeable) with a status tool bar.
I am using an OpenFileDialog to select a picture to use (either .bmp or .jpg) and then I want to display the picture file name using a status tool.
However, I keep getting an exception on the display and quite frankly I just can't see why. Also, I have no items in the properties of the status tool. Perhaps someone here can explain it to me.
I have attached screen shots of the form design, with controls, the code used in the module to call the subroutine and the error and location of the error.
Attachment 123065Attachment 123067Attachment 123069
Re: Unknown Overload Exception
Your module "modDrawing" method "OpenPicture" is working with the default instance of "frmViewer". Move OpenPicture to the code page for "frmViewer" and replace all occurrences of "frmViewer" with "Me". Alternatively, you could change then first line of the method to be:
Code:
Public Sub Open Picture(frmViewer as frmViewer)
and then change code where you call this method to pass the proper instance of "frmViewer".
Re: Unknown Overload Exception
I attempted what you suggested and obtained the same error. Upon doing a little poking and checking what I found was that I had not added a text to the collection. Once this was done everything did indeed worked as desired. Below the picture box it now displays the file path and name of the picture opened in the picture box.
Thanks for the suggestion though. Now that I have the properties set right I am going to try and see what you suggested will do.
GW