On my PC, this code gives an error when I hit the Cancel button.
But if I comment out the title$ = "Save" line, the failure does not occur. I don't even use the title$ variable (a left over from earlier code)! I was using it, and got the error. By elimination (including taking it out of the Dialog SaveFile statement) this was the line where the error seems to come from.
Any ideas why I'm getting a failure?
More data points:
1. PB support tried the code and got no failure either way.
2. I tried it on my wife's machine, and got no failure either way.
3. I ran System File Check and it reported no problems.
But if I comment out the title$ = "Save" line, the failure does not occur. I don't even use the title$ variable (a left over from earlier code)! I was using it, and got the error. By elimination (including taking it out of the Dialog SaveFile statement) this was the line where the error seems to come from.
Any ideas why I'm getting a failure?
More data points:
1. PB support tried the code and got no failure either way.
2. I tried it on my wife's machine, and got no failure either way.
3. I ran System File Check and it reported no problems.
Code:
#Compile Exe #Dim All #Include "Win32api.inc" Global hDlg As Dword Function PBMain() As Long Dim title$, filter$, flags&, filevar$ filter$ = "BASIC" + $Nul + "*.bas" + $Nul title$ = "Save" flags& = %OFN_PathMustExist Or %OFN_Explorer Or %OFN_OverWritePrompt Display Savefile hDlg, 100, 100, "Save","c:\", filter$, "", "bas", flags& To filevar$ End Function
Comment