I'm trying to answer, but by the time I finish the answer it shows me logged out and all my writing is gone....
I can show you everything and discuss it seriously if you skype me.
How can I write you my contact not public?
Thanks.
But I just found an issue today. When I navigate to Win\Sys32 in my app, I see the contents of Win\SysWOW64. I'm aware that this is due to file system redirection. So I used the same code I use elsewhere in my app to disable FS redirection before using the class but it doesn't fix the problem. I still see SysWow64 contents. Is this a bug you're aware of? Is this resolved in the new one? Before I replace the old one with a new one I'd like to know.
I don't know if LaVolpe already has a fix for this but I found a possible solution here. The attached zip file below contains a VB6 port of the C++ code from that link plus a demo. If you don't find that solution satisfactory, you might want to investigate this alternative approach: IFileDialogEvents::OnFolderChanging + IFileDialog::SetFolder + SysNative.
Hi. I have a case in which ShowOpen does not return a proper filename. I'm selecting a file with the following name: "Πασχαλινή ιστορία.pdf". This is loaded and shown (in the example) as "Πασχαλινη? ιστορι?α.pdf". It actually removes the accent from the two letters that have it and places a ? after the letter. Any ideas why this is happening and how to correct it?
you get an "invalid procedure call or argument" error.
Suggested corrections for this, in class CmnDialogEx:
Code:
Public Property Get Filter() As String
If Len(ofn.lpstrFilter) Then
Dim Flt As String
Flt = ofn.lpstrFilter
If ofn.lpstrFilter <> vbNullChar Then
Flt = Replace$(Flt, vbNullChar & vbNullChar, "|") 'This line exists because at the definition of structure OPENFILENAME, for field lpstrFilter there is a comment saying "ends with 2xvbnullchar". This seems to have been set that way in Let Filter.
Flt = Replace$(Flt, vbNullChar, "|")
End If
Filter = Flt
End If
End Property
I tested your sample filename with the class provided in this thread (based on IFileDialog) and it's shows the correct filename.
The VB6 IDE is not Unicode, so when using Watch and Debug.Print will give mangled results.
Also the default control set is not capable of showing Unicode text.
Use this control set as an alternative: https://www.vbforums.com/showthread....mmon-controls)
Well, thanks for all of these but as it turns out, the name of the file i was trying to use has some kind of problem (i'm guessing the accented letters may be in a different codepage)! I renamed it, typed the exact same name and everything was fixed! Strange...
I use the dialog for years now, but only for Open.
Now I need the Save functionality.
Works as expected, but the filename extension dos not get added to the entered filename.
Here's what I do.
In the app, the dialog comes up, and I enter the filename, e.g. "MyFile".
I'd expect .FileName would deliver "MyFile.fxy".
But I only get "MyFile".
Code:
With cBrowser
.FileName = FileName
.Filter = "MyFiles" & "(*.fxy)|*.fxy|"
.FilterIndex = 0
.InitDir = "C:"
.DialogTitle = "Title"
End With
bReturn = cBrowser.ShowSave(Owner.hwnd, eEvents)
If bReturn Then TheFile = cBrowser.FileName
This is different to other common dialog 'systems'.
What could I do, except adding the extension by code?