我试图点击一个按钮并启动我的过程,这很容易,但你怎么能以900,700的尺寸启动浏览器?提前感谢您,非常感谢您的投入:)
Private Sub ChromeButton13_Click(sender As Object, e As EventArgs) Handles ChromeButton13.Click
Try
If TextBox1.Text = "" Then
MsgBox("Please enter a number", MsgBoxStyle.Critical)
Else
Process.Start(My.Settings.browserpath, ("http://google.com/" & My.Settings.deflanguage & TextBox1.Text & "&hip=" & TextBox1.Text & "&hnc=0"))
End If
Catch ex As Exception
'smelly feet
End Try
End Sub
答案 0 :(得分:0)
您可以使用一些命令行参数启动镶边来设置窗口大小
在你的情况下 - window-position = x,y 和 - window-size = w,h 可能有用
此处有更多开关和信息:http://peter.sh/experiments/chromium-command-line-switches
Process.Start(My.Settings.browserpath, String.Format(" --window-position={3},{4} --window-size={5},{6} http://google.com/{0}{1}&hip={2}&hnc=0", My.Settings.deflanguage, TextBox1.Text, TextBox1.Text, xPos, yPos, cWidth, cHeight))