Jump to content

FileDialog always onTOP?


heibel
 Share

Recommended Posts

Hi all,

auto-exe running on background: it starts/runs an app

app trickers somehow the autoit-exe which then does an

FileOpenDialog or FileSaveDialog (all about .mdb-files)

How on earth get them to go 'always on top'

I tried a lot, even minimising the current active window/program...

It works, but I noticed: if there are other windows/programs already opened the dialog

still goes under the other programs (like when i started the autoit-exe with powerdesk...)

aarghhh!,

Fiddled with WinSetOnTop(AutoItWinGetTitle(),"",1), no luck

Fiddled even with ShellExecute(FileOpenDialog...

(nifty, is always ontop, but obviously fires in my case the acces-software...)

So, any workaround?

Own customised filedialog?

Many, many thanks in advance!

Harry

Link to comment
Share on other sites

Hi, found my own solution!

Just before the FileDialog: Flip in a TOOLWINDOW! (even out of DeskTop)

Optional: move the window to the centre for 'feedback'.

Works like a charm!

This should get you started:

#include <ShellFileOperation.au3>

$VIO_FileDB="originalFilename.mdb";(sample)

$VIO_gui=GuiCreate("VIO: Save", 150, 100, @DesktopWidth+10, 2 , 0, $WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)
GUISetBkColor (0xFFFAD9)
$VIO_lbl2 = GUICtrlCreateLabel("database: copied!"&@CRLF&"OK",3, 10, 140, 100, $SS_CENTER+$WS_EX_TRANSPARENT )
GUICtrlSetFont ($VIO_lbl2, 10, 400, "", "Arial Bold")
GUICtrlSetColor ( $VIO_lbl2, 0x000000)
GuiSetState()

    $VIO_xx = FileSaveDialog( "Save database (backup)", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "Database (*.mdb)", 2,$VIO_FileDB)

    If $VIO_xx<>"" AND @error<>1 Then
                        
    $VIO_filecopy = _ExplorerCopy(@AppDataDir & "\VIO\" & $VIO_FileDB, $VIO_xx); from <ShellFileOperation.au3>, progressbar!
        if $VIO_filecopy=1 Then
            WinMove($VIO_gui, "", @DesktopWidth/2-75, @DesktopHeight/2-50)
            Sleep(2500)

        Else
            if $VIO_filecopy<>false Then
        MsgBox(16,"Error", "Copying failed..."&@CRLF&@CRLF&"Please check available space and/or connection...")
            EndIf
        EndIf
    EndIf
    GUIDelete()
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...