[dba-Tech] Windows XP - Windows Picture and FaxViewer-Nameand path of the exe file

A.D.Tejpal adtp at touchtelindia.net
Sat Dec 4 11:07:40 CST 2004


    Thanks Gustav! I greatly appreciate your help.

A.D.Tejpal
--------------

  ----- Original Message ----- 
  From: Gustav Brock 
  To: dba-tech at databaseadvisors.com 
  Sent: Saturday, December 04, 2004 20:04
  Subject: Re: [dba-Tech] Windows XP - Windows Picture and FaxViewer-Nameand path of the exe file


  Hi A.D.

  I'm no API expert, but you can modify the code like this to maximize
  ..:

  <code>

  Public Function ShowImage( _
    ByVal strFile As String, _
    Optional ByVal booMaximized As Boolean) _
    As Long
    
  ' strFile must be either a directory or a file; wildcards are not
  accepted.

    Const cstrCommand   As String = "rundll32.exe shimgvw.dll,
  ImageView_Fullscreen"
    
    Dim lngResult       As Long
    Dim intWindowStyle  As Long
    
    If booMaximized = True Then
      intWindowStyle = vbMaximizedFocus
    Else
      intWindowStyle = vbNormalFocus
    End If

    lngResult = Shell(cstrCommand & " " & strFile & "", intWindowStyle)

    ShowImage = lngResult

  End Function

  </code>

  However, it only works one way. If you have opened a picture maximized, all subsequent calls of the function will open a maximized view. You have to manually restore the view before closing it.
  This behaviour is probably saved in the registry. You could reset that setting before calling the function.

  /gustav

  >>> adtp at touchtelindia.net 04-12-2004 05:14:57 >>>

  Hello Gustav,

      Thanks for the cross-check. 

      Another question - could you possibly suggest any API call that could force the currently active display into full screen mode, irrespective of the parent application involved?

      This can be useful in view of the fact that the combination of key strokes required to do it in different applications, is not always the
  same. 

  A.D.Tejpal
  --------------




More information about the dba-Tech mailing list