Home > Software engineering >  Vb stars problem code to ask?
Vb stars problem code to ask?

Time:09-30

Vb output stars
Hollow square

Input 5 shows


My code
Public Class Form1
Dim I, t As Integer
Dim p As String

Private Sub Form1_Load (ByVal sender As System. Object, ByVal e the As System. EventArgs) Handles MyBase. Load
I=InputBox (" both please enter square length ")
For t As Integer=1 To I
For g As Integer=1 To I
If t=1/t=I Then

P & amp;
="*"The Else
If g=1 Or g=I Then
P & amp;
="*"The Else
P & amp;=Space (1)

End the If
End the If
Next

P & amp;=vbNewLine

Next

MessageBox. Show (p)

End Sub
The End of the Class


In the middle of the space shows how not to change

Vb one letter in the blank space code is what?

CodePudding user response:

Font problem, change the displayed on the label,

CodePudding user response:

Don't use MsgBox to display, you use a multi-line text box shows the font as monospaced font (Consolas, for example) is correct,
  • Related