If I double-click on a file in OpenFileDialog called as below, it appears to select the file OK and dismiss the open dialog, both good, but also my app picks up the mouse click (or clicks? haven't worked out which), which is not so good.
Has anyone else noticed this, and/or can suggest a remedy?
Has anyone else noticed this, and/or can suggest a remedy?
Code:
'--------------------------------------------------------------------- FUNCTION getpic (hD AS LONG) AS STRING LOCAL buf, spath, sfile AS STRING LOCAL dwstyle AS DWORD LOCAL hFile AS LONG '------------------------ get picture file dwStyle = %OFN_EXPLORER OR %OFN_FILEMUSTEXIST OR %OFN_HIDEREADONLY Buf = "Picture files (*.JPG)|*.JPG|" 'IF gddlpath <> "" THEN spath = gddlpath IF OpenFileDialog (hD, "Locate JPG file ", sfile, spath, buf, "JPG", dwstyle) = 0 THEN EXIT FUNCTION END IF FUNCTION = sfile END FUNCTION
Comment