トップ回答者
進歩表示の件

質問
回答
-
じゃんぬねっとさんForm1にDialogのインスタンスを生成するにはコードはどうかくのですか。
素人なのでよろしくお願いします。
ちなみに私はVB2005を使用しています。
インスタンスの生成が必要なのでしょうか。
また、公開メンバとはたとえばどのようなものですか。
下記にコードを示す。
Code SnippetPublic Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Enabled = False
Dialog1.ProgressBar1.Value = 0
Dialog1.Label1.Text = "現在 0 % 処理済みです..."
Timer1.Start()End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dialog1.ProgressBar1.Value += 20
Dialog1.Label1.Text = "現在 " & CStr(Dialog1.ProgressBar1.Value) & " %処理済みです..."
If Dialog1.ProgressBar1.Value >= 100 Then
Timer1.Stop()
Dialog1.Label1.Text = "100 %処理が完了しました。!"
Button1.Enabled = True
End If
End Sub
End Class参考書を、いろいろあさっていますがいまいちわかりません。
何方かお教えください。
すべての返信
-
じゃんぬねっとさんForm1にDialogのインスタンスを生成するにはコードはどうかくのですか。
素人なのでよろしくお願いします。
ちなみに私はVB2005を使用しています。
インスタンスの生成が必要なのでしょうか。
また、公開メンバとはたとえばどのようなものですか。
下記にコードを示す。
Code SnippetPublic Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Enabled = False
Dialog1.ProgressBar1.Value = 0
Dialog1.Label1.Text = "現在 0 % 処理済みです..."
Timer1.Start()End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dialog1.ProgressBar1.Value += 20
Dialog1.Label1.Text = "現在 " & CStr(Dialog1.ProgressBar1.Value) & " %処理済みです..."
If Dialog1.ProgressBar1.Value >= 100 Then
Timer1.Stop()
Dialog1.Label1.Text = "100 %処理が完了しました。!"
Button1.Enabled = True
End If
End Sub
End Class参考書を、いろいろあさっていますがいまいちわかりません。
何方かお教えください。