Watermark TextBox in WinForms

前端 未结 10 1991
说谎
说谎 2020-11-22 00:35

Can anyone point me to a good implementation of a basic Windows Forms TextBox that will initially show watermark text that disappears when the cursor enters it? I think I ca

10条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 01:13

    Private Sub randomSubName() Handles txtWatermark.Click
       txtWatermark.text = ""
    End Sub
    

    Make the default text of the textbox whatever you want the watermark to be, I assume in this example you name the textbox txtWatermark

    Hey, I'm new. So sorry if I terribly screwed up the post... I also have no idea if this works...

提交回复
热议问题