maybe sz.GetString("Answer2") is Null ?
or try:
If btn1.xlBL.Text.Length = 0 Then
......
.....
End If
I changed all 16 places where that appeared and still have the same result. The interesting part is that it is a different colour to the normal colour I specified. I have checked the Designer and there is no other buttons in front or back of it. But i do like checking the length of the field. I will use that in future.
In this example screen comes out like this . If I did not hide the buttons they come out as grey without text. I then click on and of the blue buttons and they work (Should not ) they should not be visible and are disabled.
I had to run it twice so you can see what happens after pressing any of the buttons. Due to the questions being random and the button answers also being random , it was not the same question number or the position.
I changed the code to
If but4 =4 Then
btn4.xLBL.Text=sz.GetString("Answer4")
If btn4.xLBL.Text.Length=0 Then
btn4.xLBL.Visible=False
btn4.xLBL.Enabled=False
Else
btn4.xLBL.Visible=True
btn4.xLBL.Enabled=True
End If
End If
I also went into designer and unchecked Visible and Enabled , but then nothing showed on the screen at all.
UPDATE:
I went into designer and made both the Primary colour and secondary colour transparent and that removed the view from the window and it is still clickable. So even though we cannot see it , someone can press the invisible button
Further UPDATE
In each button Click Sub I put in the check to see if the string length was zero and that bypassed the button code. I am sure the other method should have worked as this is a work around