MSAccess97 application window gets visible while instancing

P

Preet

Hi!

I am trying to open MSAccess 97 Application through
VB .net using Microsoft Access 8.0 Library.
Syntax I am using is:
Dim Obj as new Access.Application
But when I generate the instance of Access Application as
above, I get Access97 Window Open and Visible.
I just want to access the properties of MsAccess97 and
don't want to get the Application Window Visible.
Even if I set
Obj.Application.Visible = False
It does not hide the Access Application Window.
If you have any solutions to this problem, please reply
ASAP.

Regards,
 
S

self

Declare Function SetForegroundWindow Lib "User32" _
(ByVal hWnd As Long) As Long
Declare Function IsIconic Lib "User32" _
(ByVal hWnd As Long) As Long
Declare Function ShowWindow Lib "User32" _
(ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Dim objAccess As Object
'Const SW_NORMAL = 1
'Const SW_MINIMIZE = 2
'Const SW_MAXIMIZE = 3
'Const SW_SHOW = 9


Sub ShowAccess(ByVal instance As Object, Optional
ByVal size As VariantType = 0)
Try
Dim hWnd As Long, temp As Long
hWnd = instance.hwndAccessApp
temp = SetForegroundWindow(hWnd)
temp = ShowWindow(hWnd, size)
Catch ex As Exception
End Try
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top