Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 10th, 2005, 01:19 PM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default user interface

How to have an Access GUI interface hidden during an application run-time? I want a user to be able to see only selected forms and windows and not realize that Access application is running.
Reply With Quote
  #2 (permalink)  
Old March 10th, 2005, 03:14 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Hi,

   It sounds like you want VB.Net to make your Access interface. It is not much different than using Access VBA.

HTH


mmcdonal
Reply With Quote
  #3 (permalink)  
Old March 10th, 2005, 07:47 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

You will need to write an SDI application to do that.

Access’ programming interface does not allow that. The data from the tables in an MDB can be accessed by an SDI app, but you cannot write an SDI app with just Access as your environment.

You could “fake it” by having a series of Access apps that all use just one form, maximized in the parent window, but sheesh!, what a nightmare [u]that</u> would be to write and maintain!
Reply With Quote
  #4 (permalink)  
Old March 11th, 2005, 10:03 AM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could do what I do... have the Access (host window) re-size itself upon startup and then center itself on the user's screen. All of the forms (including switchboard) open as pop-ups over top of the "reduced" host window. User's never see it. They only see the forms.

Here's the code I use to re-size and position the "host" window.


Function SizeAccess(cX As Long, cy As Long, _
  cHeight As Long, cWidth As Long)
         Dim h As Long
         'Get handle to Microsoft Access.
         h = Application.hWndAccessApp
         'Position Microsoft Access.
         SetWindowPos h, HWND_TOP, cX, cy, cWidth, _
         cHeight, SWP_NOZORDER
End Function


Rick
Reply With Quote
  #5 (permalink)  
Old March 13th, 2005, 12:27 PM
Authorized User
 
Join Date: Sep 2004
Location: Twickenham, , United Kingdom.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Paulsh Send a message via Yahoo to Paulsh
Default

I tried the solution posted by Rick but came unstuck with the following:
        SetWindowPos h, HWND_TOP, cX, cy, cWidth, _
         cHeight, SWP_NOZORDER

SetWindowPos is undefined as its HWNF_TOP and SWP_NOZORDER?

Thanks

Paul
Reply With Quote
  #6 (permalink)  
Old March 14th, 2005, 09:50 AM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry... I forgot to include very important step. In the Autoexec macro of your db, you'll want to add the following FUNCTION NAME reference: SizeAccess (450,355,25,160)

This should put the minimized "shell" window" right dead center of your screen so that forms open over top of it. You can play around with the numbers to get it where you want it.

Give it a try and let me know how you make out.

Rick
Reply With Quote
  #7 (permalink)  
Old March 14th, 2005, 09:52 AM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

And you'll need the following declarations:

Declare Sub SetWindowPos Lib "user32" (ByVal hwnd&, _
                           ByVal hWndInsertAfter&, _
                           ByVal x&, ByVal Y&, ByVal cX&, _
                           ByVal cy&, ByVal wFlags&)
Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
   (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Long
'Moves MS Access window to top of Z-order.
Global Const HWND_TOP = 0
Global Const SWP_NOZORDER = &H4 'Ignores the hWndInsertAfter.


Rick
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Forms - Multiple User Interface nadhan_f BOOK: Access 2003 VBA Programmer's Reference 1 October 23rd, 2007 04:37 PM
Retreiving user interface parameter at runtime saeedahmed C# 0 November 7th, 2005 02:53 AM
how to show user interface data in crystal report sanjay_jadam Crystal Reports 1 May 26th, 2005 02:25 AM
Installation User Interface snowy0 VB.NET 2002/2003 Basics 0 October 8th, 2004 08:52 PM



All times are GMT -4. The time now is 04:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.