Thanks for the response A.D.  My program has them clicking a button 
and using the FollowHyperlink method.  I'm sort of a novice at 
coding, at least I've never done anything like this before, could you 
help me with an example of what you mentioned with the delay loop and 
the WithEvents statement.

Thanks again,

Brian Stenglein


--- In [email protected], "A.D.Tejpal" <[EMAIL PROTECTED]> 
wrote:
> Brian,
> 
>     For ensuring that documents opened by clicking a hyperlink 
control on the form, get displayed in maximized state, we have to 
allow for the time delay involved in activation and stabilization of 
the target document.
> 
>     When FollowHyperlink method of access application, based upon 
path of target document is used (instead of direct hyperlink), the 
required time lag can be accommodated in the click event itself, 
using a suitable time delay loop incorporating WithEvents statement. 
> 
>     The alternative mentioned in previous para is not available 
when clicking hyperlink type control. Execution of code in click 
event precedes activation of hyperlink. In such a situation, the 
desired objective can be achieved by transient activation / de-
activation of form's timer. Sample code for form's module, as given 
below, should get you the desired results.
> 
>     It may please be ensured that [Event Procedure] appears on 
Event tab of the properties dialog box of the form (against the item: 
On Tmer) as well as TxtLinkDoc (against the item: On Click).
> 
> Best wishes,
> A.D.Tejpal
> 
> Form's VBA Module 
> (TxtLinkDoc is the name of hyperlink type control)
> ====================================
> ' General Declarations Section
> ' Global variables
> Private Hwd As Long, TotTime As Long
> ' Set max limit for time out = 10 seconds
> Private Const MaxTime As Long = 10000
> 
> ' API declarations
> Private Declare Function GetForegroundWindow _
>                                             Lib "user32" () As Long
> Private Declare Function ShowWindow _
>                         Lib "user32" (ByVal hwnd As Long, _
>                         ByVal nCmdShow As Long) As Long
> ----------------------------------------------------------------
> Private Sub Form_Timer()
>     Dim HwDoc As Long
>     
>     TotTime = TotTime + Me.TimerInterval
>     If TotTime > MaxTime Then   ' Time out
>         Me.TimerInterval = 0
>         Exit Sub
>     End If
>     
>     HwDoc = GetForegroundWindow()
>     If HwDoc <> Hwd Then
>         ShowWindow HwDoc, 3   ' 3 for maximized state
>         Me.TimerInterval = 0
>     End If
> End Sub
> 
> Private Sub TxtLinkDoc_Click()
>     TotTime = 0
>     Hwd = Application.hWndAccessApp
>     Me.TimerInterval = 200
> End Sub
> ====================================
> 
>   ----- Original Message ----- 
>   From: Brian Stenglein 
>   To: [email protected] 
>   Sent: Friday, June 10, 2005 21:43
>   Subject: [AccessDevelopers] Maximize Adobe Reader Window opened 
by clicking hyperlink in Access
> 
> 
>   I have an Access DB with a bunch of searchable topic names and 
each topic has a corresponding hyperlink to a pdf file.  One minor 
annoyance my users are complaining about is that the Adobe window 
that opens when they click the hyperlink is always rather small and 
they have to maximize the window every time.  Is there a way I can 
force that window to open maximized?
> 
>   Thanks,
> 
>   Brian Stenglein





Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to