アプリ版:「スタンプのみでお礼する」機能のリリースについて

Private number As Integer
Private rows As Integer
Private columns As Integer



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


Dim form2 As New Form()
' Create a button to add to the new form.
Dim button1 As New Button()
' Set text for the button.
button1.Text = "Scrolled Button"
' Set the size of the button.
button1.Size = New Size(1000, 800)
' Set the location of the button to be outside the form's client area.
button1.Location = New Point(form2.Size.Width + 200, form2.Size.Height + 200)

' Add the button control to the new form.
form2.Controls.Add(button1)
' Set the AutoScroll property to true to provide scrollbars.
form2.AutoScroll = True

' Display the new form as a dialog box.
form2.ShowDialog()

If Not Integer.TryParse(TextBox1.Text, rows) OrElse _
Not Integer.TryParse(TextBox2.Text, columns) OrElse _
Not Integer.TryParse(TextBox3.Text, number) Then
MessageBox.Show("数字で入力してください", Me.Text, MessageBoxButtons.OK,
MessageBoxIcon.Error)
Exit Sub
End If



Me.Bounds = New Rectangle(10, 10, 1300, 900)



Dim cnt As Integer = 0


For k As Integer = 1 To number
For i As Integer = 1 To rows
For j As Integer = 1 To columns
Dim tb As TextBox = New TextBox()
cnt += 1
tb.Name = "tb" + cnt.ToString()
Me.Controls.Add(tb)
tb.Top = (i - 1) * 30 + 80
tb.Left = (j - 1) * 60 + 70 * (columns * (k - 1)) + 10

tb.Width = 50
Next
Next
Next



End Sub


スクロール画面を作成し、
そのスクロール画面上にボタンを1つ作り、
テキストボックスが出てくるようにしたいです。
どうすればできるのでしょうか 。

これはわかるところまで作成しています。

A 回答 (2件)

http://oshiete.goo.ne.jp/qa/8149540.html
ちょうど同じ質問を受けていましたので上記URLで参照してください。
参考になればと存じます。
    • good
    • 0

Visual Basicと聞くと



フォームにコントロールを配置することから始まるイメージなんですよね。

画面には配置しません。
画面には表示されるだけです。

スクロールする画面というのがわからないんです。

折角スクリプトを書いているのですから、正確な言葉を使うといいですよ。

言葉が分からなければ具体的に説明してください。

この回答への補足

フォームにスクロールバーをつけるという意味です。
それから、ボタンなどを配置していきたいです。
やってみたのですが、うまくいきませんでした。

補足日時:2013/06/26 01:30
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!