64bit or 32bit - selecting which one and saving a file dialogue

Started by matthew, August 27, 2020, 04:57:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

matthew

Hi,
I have a 32 bit system and the code attached works just fine.
When I use it on a 64bit system the call to GetSaveAsFile doesn't bring up the file dialogue.
I tried to add some code at the start so the app could determine whether it was on a 32 or 64 bit system, maybe this is the problem?
I've tried to follow previous examples but can't get it to work.
On the 64bit system the function declarations after the 'else' statement are highlighted red but don't know how to fix it
Any advice would be much appreciated.
thanks
Matthew

Paul Herber

Don't know if you are still having a problem with this, but your line of code:

sFilter = "Visio Files (*.vsd)" & Chr$(0) & "Visio Files (*.vsdx)"

is wrong.
The format is:
"Text description" . separator . "format" . separator . "Text description" . separator . "format "
so ...

sFilter = "Older Visio Files (*.vsd)" & Chr$(0) & "*.vsd" & Chr$(0) & "Newer Visio Files (*.vsdx)" & Chr$(0) & "*.vsdx" & Chr$(0) & "Macro enabled files (*.vsdm)" & Chr$(0) & "*.vsdm"
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

matthew

thanks Paul, will try that later today.  had another look this morning by comparing to examples by others and it seems that changing:
SaveFile.lStructSize = Len(SaveFile) to LenB makes it work on both systems!
That said, I'll fix the other part you mention,
many thanks for your help
kind regards
Matthew