スマートフォン シミュレーションの場合、私の意図は"screen"
、スマートフォンの画像ボックスであるアプリケーションを実行することです。これまでのところ、私はこのコードを使用しています:
Imports System.Diagnostics
Imports System.Runtime.InteropServices
Public Class Form1
<DllImport("user32.dll")> Public Shared Function SetParent(ByVal hwndChild As IntPtr, ByVal hwndNewParent As IntPtr) As Integer
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Process1 As New Process
Process1.StartInfo.FileName = "Application_Name.exe"
Process1.Start()
Do Until Process1.WaitForInputIdle = True
Application.DoEvents()
SetParent(Process1.MainWindowHandle, PictureBox1.Handle)
Loop
End Sub
End Class
ただし、これは実際にはアプリケーションをピクチャボックス上に配置しません (アプリケーションのフォームは別の場所に配置されます)。私の意図は、アプリケーションのフォームを画像ボックスの上に配置し、画像ボックスのサイズを超える場合はスクロール バーを表示することです。
どんなアイデアでも大歓迎です。
実際、アプリケーションがその中で実行できる限り、新しいアプリケーションが実行されるオブジェクトはピクチャボックスである必要さえありません。ありがとうございました。