Some problem with the windows form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ajay Bhalala
    New Member
    • Nov 2014
    • 119

    Some problem with the windows form

    Hello all,

    I have one form named MainPage in vb.net.

    In this form I have put 1 image as background image of the form at design time using BackgroundImage property. and I also put 1 menustrip in this form, and I have written all the name of the menus in the menustrip. Then I run my form, there is no error in this form.

    But when I have changed my background image, in the form at design time, there is error occurred, and then I made some changes in my application then errors gone away, but what I have written into the menustrip is erased. and when I clicked on menustrip "Type Here" is displayed. Can anyone say why this happened? and now what can I do other then writing again all the name of the menus in menustrip?

    I have written all the menu items in the menustrip again, and after writing, when I click on the CodeEditorWindo w there is MsgBox is displayed

    MsgBoxTitle:Microsoft Visual Basic 2008 Express Edition

    MsgBox Content:Code generation for property 'Items' failed. Error was: 'Could not find file 'E:\Brinda & Jay\Brinda\02 S.Y\VB.NET\My Project\My Project\Resourc es\BackgroundIm agewithCollegeP hoto.jpg'.'

    MsgBox have only one button "OK".

    Every time when I make changes or only click on the form in deisgn, and then I make any activity outside the form design, this msgbox is displayed.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    What change did you make to get the background to work?
    This might be causing a problem...

    It's pretty hard to help without seeing what you are doing in code with regards to the background and the menu.

    Comment

    • Ajay Bhalala
      New Member
      • Nov 2014
      • 119

      #3
      I have used the "BackgrounImage " property to change the background image. I have not made any changes in my code, I just changed the background image of my form.

      My form was working properly until I have change my background image 6th time.

      Thank you so much for your reply.

      Comment

      • gabemr
        New Member
        • Jan 2015
        • 3

        #4
        Hey there,

        You could try adding the image to your resources first.

        Go to your project's properties page and then resources. Click on the arrow thats right next to the Add Resource button and select Add Existing File to add your image. Go back to your form's properties and select the image from the "BackgroundImag e" popup window.

        Hope this helps.

        Comment

        • Ajay Bhalala
          New Member
          • Nov 2014
          • 119

          #5
          Thanks for your suggestion, gabemr.
          But I also tried this. but there is nothing can be done.

          Comment

          Working...