真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

vb.net焦點(diǎn)切換 vb設(shè)置焦點(diǎn)

vb.net設(shè)置windows焦點(diǎn)程序

給你個(gè)參考的例子,窗體打開(kāi)時(shí)可能大小有變化,軟件名可能有變化

創(chuàng)新互聯(lián)建站專業(yè)為企業(yè)提供藁城網(wǎng)站建設(shè)、藁城做網(wǎng)站、藁城網(wǎng)站設(shè)計(jì)、藁城網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)與制作、藁城企業(yè)網(wǎng)站模板建站服務(wù),十載藁城做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。

先加個(gè)控件ListBox1,運(yùn)行后雙擊ListBox1上程序名

Public Class Form1

Public myProcess() As Process

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim myProcesses() As Process = Process.GetProcesses()

Dim jh As New ArrayList

For Each bs As Process In myProcesses

If CInt(bs.MainWindowHandle) 0 Then

ListBox1.Items.Add(bs.ProcessName)

jh.Add(bs)

End If

Next

ReDim myProcess(jh.Count - 1)

jh.CopyTo(myProcess)

End Sub

Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Integer, ByVal nCmdShow As Long) As Integer

Private Sub ListBox1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListBox1.MouseDoubleClick

Dim a As Process = myProcess(ListBox1.SelectedIndex)

Try

Dim dd = ShowWindow(a.MainWindowHandle, H1)

AppActivate(a.Id)

Catch ex As Exception

End Try

End Sub

End Class

VB.NET中頁(yè)面初期顯示時(shí)按下enter鍵讓焦點(diǎn)在五個(gè)textbox控件上順序移動(dòng)該怎么辦?求大神指點(diǎn),謝謝!

這樣不好,應(yīng)該使用 Table 鍵,按照 Table 鍵順序來(lái)切換。因?yàn)榛剀囃脕?lái)確定你要按下頁(yè)面的確定按鈕。如果非要使用回車:

Private Sub 文本框按下回車鍵(sender As Object, e As KeyEventArgs) Handles TextBox3.KeyDown, TextBox2.KeyDown, TextBox1.KeyDown

If e.KeyCode = Keys.Enter Then

Select Case sender.name

Case "TextBox1"

TextBox2.Focus()

Case "TextBox2"

TextBox3.Focus()

Case "TextBox3"

TextBox1.Focus()

End Select

End If

End Sub

VB.Net 給其他程序焦點(diǎn)

Public RunProcess As Process

RunProcess.start("djiwqjidjwqi")

AppActivate(RunProcess.Id())


網(wǎng)頁(yè)題目:vb.net焦點(diǎn)切換 vb設(shè)置焦點(diǎn)
本文URL:http://weahome.cn/article/dosdeic.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部