borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Got a handle to a window-can I find if the path/filename of the window\'s file has changed?)Next Topic (Get number of controls in a window) New Topic New Poll Post Reply
AndreaVB Forum : API : Set Focus to Access application
Poster Message
rajagopalan_1979
Level: Guest


icon Set Focus to Access application

Hello

I want to launch Access Database using any of the win32 api function. IS there any function which does?

I tried from VB using shell it is not launching and also i am not able to set the focus to the access window(which is already opened).

Any solution for this?

10-09-2003 at 04:03 PM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Set Focus to Access application

http://www.andreavb.com/forum/viewtopic.php?TopicID=856&page=0#2482

http://www.andreavb.com/forum/viewtopic.php?TopicID=559&page=0#1435

____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

10-09-2003 at 08:17 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
rajagopalan_1979
Level: Guest

icon Re: Set Focus to Access application

Hi,
Thanks for the links.

But i tried with the below one And it worked.

str = "C:\Program Files\Microsoft Office\Office\MSACCESS.exe"" ""C:\Program Files\ESCAPE Tool\ESCAPE Tool V3.2.3\ESCAPE_Tool.MDB"

str1 = Chr$(34) & str & Chr$(34)

notepadID = Shell(str1, vbNormalFocus)

And still i have one more issue, like iam not able get the handle of the form opened.

Actually, when i launch this MDB, it acts as an exe launch the initial form window.

But i am not able to get the handle of it. Is there any way i can get it?

11-09-2003 at 03:22 AM
| Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Set Focus to Access application

You can get window handle by knowing its title:

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Dim handle As Long

    handle = FindWindow(vbNullString, "Untitled - Notepad")


This will retrieve the handle of the notepad.

____________________________
If you find the answer helpful, please mark this topic as solved.

13-09-2003 at 01:20 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : API : Set Focus to Access application
Previous Topic (Got a handle to a window-can I find if the path/filename of the window\'s file has changed?)Next Topic (Get number of controls in a window) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder