掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
commandで、BackSpaceと同じ働きをさせるには? (ID:123765)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
>電卓だから、単純に最後の数字が消えればいいんでしょ? そかΣ(‾□‾) BackSpace の動きを考えちゃってたよ。自分、マヌケ過ぎ〜( _)_ [VB6.0] Private Sub Command1_Click() Dim wIndex As Integer With Me.Text1 If Len(.Text) = 0 Then Exit Sub If .SelStart = 0 And .SelLength = 0 Then Exit Sub If .SelLength <> 0 Then wIndex = .SelStart .Text = Mid(.Text, 1, .SelStart) _ & Mid(.Text, .SelStart + .SelLength + 1, Len(.Text) - .SelStart - .SelLength) .SelStart = wIndex Else wIndex = .SelStart - 1 .Text = Mid(.Text, 1, .SelStart - 1) _ & Mid(.Text, .SelStart + 1, Len(.Text) - .SelStart) .SelStart = wIndex End If End With End Sub
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.