-3

I am using vb.net 2008, I added a button from design view in one of my forms.It shows in the form design view, I gave it the click code to load another form but after I run the program and look in that form, it does not show the button that I added while I run the program. what is the problem? And What are the solutions? Thanks! As you can see, I added a Back Button here

THis image is while I run the program. Back button is not displayed here.

Bob
  • 1
  • 1
  • 3

3 Answers3

1

I would suggest running something like this in order to see if the control is there. Listing if it is Visible would also be helpful.

https://stackoverflow.com/a/12985464/7340880

Private Sub GetControls()

    For Each GroupBoxCntrol As Control In Me.Controls
        If TypeOf GroupBoxCntrol Is GroupBox Then
            For Each cntrl As Control In GroupBoxCntrol.Controls
                'do somethin here

            Next
        End If
    Next

End Sub

Community
  • 1
  • 1
0

The only way I can help you without you providing us more information like code or error info if exist (or maybe a warning), I will suggest you to copy the code from your button then delete the current button and a new one. Then paste the code back to new button.

And make sure you don't hide or change the visible property button somewhere in the code. If you are working with positioning in the code make sure you don't move your button.

user1947700
  • 69
  • 1
  • 16
0

Thank you for your support. The problem was that it was running the old .exe file. I deleted the old .exe file from the /bin/debug directory. And after I ran the program, it created me a new .exe file and hence my problem was solved. Thank you again.

Bob
  • 1
  • 1
  • 3