Results 1 to 6 of 6

Thread: Maximizing a minimized application

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    3

    Post

    I wonder if anybody can help me (please!).

    Maybe I shoulg give you some background to my problem...

    I am using MS Access to develop a DB for a local company. When the user gets to the address field on the form, I want an Addressing package to get the focus and then, after sending the required address to Access, to give the focus back to Access.

    I have 2 ideas for solutions to this problem, but am unsure about some aspects of each.

    1) The addressing package has an option to minimize after send. This is great, but then I can't maximize it again. I know that the Shell function allows you to select the style of window that you want - is there a similar option available with the AppActivate statememt?

    2) I can use the AppActivate statement to give the focus to the addressing package. The only problem is, the package is designed to 'come out on top' so to speak. I have tried to use VB to give the focus back to the addressing package (ie by using AppActivate to give the focus to the addressing package, and then using AppActivate again to give the focus back to Access). This does work briefly (the focus does go to Access, but because the addressing package always has the last word after sending the address, it goes back again).

    I was thinking that if I could put a delay into the AppActivate statement to enable the addressing program to finish executing its commands, then the focus should (by my way of thinking) go back to Access. Is there any way of doing this?


    In brief, what I want to do is either:
    -add a delay in a VB module to be performed between 2 AppActivate statements.
    -maximize a minimised application window.

    Please help!

    Thank you for taking your time to read this.

    Kind Regards,

    -Vicki Pugh


  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    Is this Addressing package a separate EXE or is it part of your Access program?

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    Have you investigated AppActivate's wait parameter?

    ------------------
    Marty

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    3

    Post

    Yes the addressing package is a separate EXE file but is deisgned to send keystrokes to selected fields on a DB form.

    I haven't managed to get the wait facility to work - maybe you could give me some hints please? I know how to get it do wait after an AppActivate statement, but not before one. This is one of the problems I've been having by attempting to do it this way.

    I'd be really greatful of any help!!!

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    Insert this where you want and it will wait 5 seconds
    Code:
        MsgBox "start"
        
        dblEndTime = Timer + 5#
        Do While dblEndTime > Timer
          ' Do nothing but allow other
          ' applications to process
          ' their events.
          DoEvents
        Loop
        
        MsgBox "end"
    ------------------
    Marty

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    3

    Post

    Thank you Marty for that - I'll give it a go so keep your fingers crossed please!!!

    I really appreciate your help.

    Regards,

    -Vicki

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width