0

VB6 のボタンのキャプションに問題があります。「_load」イベントの後にキャプションを変更しようとしていますが、機能しますが、新しいテキストがボタンの中央に表示されず、問題です。

次の画面で確認できます: https://dl.dropboxusercontent.com/u/3779161/buttons.png

「リフレッシュ」機能を使用しようとしましたが、効果がありません。新しいボタンを作成せずにボタンを更新することはできますか?

手伝ってくれてありがとう

4

2 に答える 2

0

新しいテキストは私にとって中心です。

次のテスト プロジェクトを実行し、フォームをクリックします。

'1 form with
'  1 commandbutton: name=Command1  caption="Test"
Option Explicit

Private Sub Form_Click()
  Command1.Caption = "New Test"
End Sub

問題はおそらく他の何かによって引き起こされます。例: タイトなループはありますか?

あなたのコードのいくつかを投稿できますか?

于 2013-06-24T08:41:28.950 に答える
0

I am unable to test VB6 code currently but, apparently, it requires Win-API calls to align the text. code here. Copy the code into a Module and then you can call the function AlignCommandButtonText. (Seems like hard work!)

于 2013-06-22T22:43:31.570 に答える