HOw to show external application modally...
I am calling ODBC Administrator and OLEDB Connection String Builder from my code... I want these external windows to be opened modally... i remember i have done it before.. just lost now.. :(
below is my code for ODBC Administrator
VB Code:
Shell "rundll32.exe shell32.dll,Control_RunDLL odbccp32.cpl", vbHide
Dim ret&
ret = FindWindow(vbNullString, "ODBC Data Source Administrator")
SetWindowPos ret, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
and for OLEDB
VB Code:
Dim X As New DataLinks
Private Sub cmdBuild_Click(Index As Integer)
Set myCon(Index) = X.PromptNew
txtOLEDB(Index).Text = myCon(Index).connectionString
End Sub
I want both of these window to open Modally so the user cannot work on my applicatoin until these forms are closed...
Any Ideas?
Re: HOw to show external application modally...
For the latter set the hWnd property of the DataLinks object.
VB Code:
X.hWnd = Me.hWnd
Set myCon(Index) = X.PromptNew
Re: HOw to show external application modally...
Quote:
Originally Posted by Joacim Andersson
For the latter set the hWnd property of the DataLinks object.
VB Code:
X.hWnd = Me.hWnd
Set myCon(Index) = X.PromptNew
thanx dude.. it works great.. and what about ODBC thing?