先用空格把位置空出來(lái),然后在往進(jìn)寫(xiě),或者是你沒(méi)有退出調(diào)試就寫(xiě)代碼了,這個(gè)問(wèn)題我遇見(jiàn)過(guò),確實(shí)很煩人
公司主營(yíng)業(yè)務(wù):成都做網(wǎng)站、網(wǎng)站建設(shè)、外貿(mào)營(yíng)銷(xiāo)網(wǎng)站建設(shè)、移動(dòng)網(wǎng)站開(kāi)發(fā)等業(yè)務(wù)。幫助企業(yè)客戶(hù)真正實(shí)現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競(jìng)爭(zhēng)能力。成都創(chuàng)新互聯(lián)公司是一支青春激揚(yáng)、勤奮敬業(yè)、活力青春激揚(yáng)、勤奮敬業(yè)、活力澎湃、和諧高效的團(tuán)隊(duì)。公司秉承以“開(kāi)放、自由、嚴(yán)謹(jǐn)、自律”為核心的企業(yè)文化,感謝他們對(duì)我們的高要求,感謝他們從不同領(lǐng)域給我們帶來(lái)的挑戰(zhàn),讓我們激情的團(tuán)隊(duì)有機(jī)會(huì)用頭腦與智慧不斷的給客戶(hù)帶來(lái)驚喜。成都創(chuàng)新互聯(lián)公司推出達(dá)川免費(fèi)做網(wǎng)站回饋大家。
在代碼中加入以下事件代碼即可讓鼠標(biāo)滾輪支持VScrollBar:
Private Sub mouse_wheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseWheel
If e.Delta = 120 Then
If VScrollBar1.Value - VScrollBar1.SmallChange = 0 Then
VScrollBar1.Value -= VScrollBar1.SmallChange
ElseIf VScrollBar1.Value - 1 = 0 Then
VScrollBar1.Value -= 1
End If
Else
If VScrollBar1.Value + VScrollBar1.SmallChange = VScrollBar1.Maximum Then
VScrollBar1.Value += VScrollBar1.SmallChange
ElseIf VScrollBar1.Value + 1 = VScrollBar1.Maximum Then
VScrollBar1.Value += 1
End If
End If
End Sub
先建立普通菜單,然后用PopupMenu方法顯示就行。
比如,建立一個(gè)名叫e1的菜單,顯示時(shí)就用:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
Me.PopupMenu e1
End If
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
TextBox1.ForeColor = Color.Red
Else
TextBox1.ForeColor = Color.Black
End If
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
If CheckBox2.Checked = True Then
TextBox1.BackColor = Color.Yellow
Else
TextBox1.BackColor = Color.White
End If
End Sub