Yes I know this, stated as much in my opening sentance. In order to make
them useful, you would have to perform a dll import.
I didn't provide any code, since I was still working on my solution. but is
some additional reading.
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconcreatingprototypesinmanagedcode.htm
Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential)> _
Public Structure RECT
Dim left As Integer
Dim top As Integer
Dim right As Integer
Dim bottom As Integer
End Structure
Public Class User32
<DllImport("user32.dll", CharSet:=CharSet.Auto)> _
Public Shared Function MessageBox(ByVal hWnd As Integer, ByVal txt As
String, ByVal caption As String, ByVal Typ As Integer) As Integer
End Function
<DllImport("user32", CharSet:=CharSet.Auto)> _
Public Shared Function GetActiveWindow() As Integer
End Function
<DllImport("user32", CharSet:=CharSet.Auto)> _
Public Shared Function SendMessage(ByVal hwnd As Integer, ByVal wMsg As
Integer, ByVal wParam As Integer, ByRef lParam As RECT) As Integer
End Function
<DllImport("user32", CharSet:=CharSet.Auto)> _
Public Shared Function SendMessage(ByVal hwnd As Integer, ByVal wMsg As
Integer, ByVal wParam As Integer, ByRef lParam As Integer) As Integer
End Function
<DllImport("user32", CharSet:=CharSet.Auto)> _
Public Shared Function SetActiveWindow(ByVal hwnd As Integer) As Integer
End Function
End Class
"Armin Zingler" <az*******@freenet.de> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
"AMDRIT" <am****@hotmail.com> schrieb The only way I know to do that is through unmanaged code, api
calls.
before opening your form, get the active window
Public Declare Function GetActiveWindow Lib "user32" Alias
"GetActiveWindow" () As Long
open your window
frm.show()
and set it to the top most form
Public Declare Function SendMessage Lib "user32" Alias
"SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam
As Long, lParam As Any) As Long
Set the previous active window back to active
Public Declare Function SetActiveWindow Lib "user32" Alias
"SetActiveWindow" (ByVal hwnd As Long) As Long
These are declartions for VB6, not for VB.Net
Armin