-
the answer is simple.
I am only interested in the path and directory.
the GetSaveFileName api makes you enter a file name.
This is pointless since the filename is stored in the file, and you can't change it. i won't let you :)
So given this information, you can see that a dirlistbox and a drivelistbox is perfect.
By the way, i use that api call in the program also. All of the common dialogs are called with api.
-
Then use the SHBrowseForFolder API. That will show the standard "Browse for folder" dialog box, that's what you need :D
Gerco.
-
i don't have a prototype of example of it. Plus it wouldn't do me any good. I use the api for the common dialogs to remove need of an .ocx. The drive and dirlist controls don't require an .ocx.
-
1 Attachment(s)
Neither does the SHBrowseForFolder API:
Do note: it's not my code.
-
can someone post a the source code to place text into a bmp and read it later
-
there was some problem with your upload? the .bas was empty.
Anyway like i said, i only use api when i need to, or i get a speed increase. I like my code to keep a semblance of readability when possible. The dirlist box and drivelist boxes only added about 10k with support code and another form. I have more control with a custom setup like mine anyway. For example, the text box at the bottom in a future version will have active path checking and will actually PREVENT you from typing a letter that will lead to an illegal path.
The main text boxes already have a feature similar, but they don't actually prevent the typing, they just change the background to red.
-
Create your own UDT and encrypt the password and store as binary format will be safe :)
example:
Code:
Private Type My_UDT
Username As String * 15
password As String * 15
End Type
Private up As My_UDT
Private Sub UpdateFile()
Open "C:\1.dat" For Binary As #1
'//Encrypt Data
Encrypt up.Password
Put#1, 1, up
Close #1
End Sub
Private Sub Encrypt(ByVal lpSource As String)
'//Add your encryption algorithm here
'//Or try out my encryption ActiveX DLL at my home page
End Sub
'Code improved by vBulletin Tool (Save as...)
-
if you wish to have a 128bit data encryption, take a look on the CryptoAPI :)
-
1 Attachment(s)
hmm strange... here it is again.
And you cannot select a not-existing folder with this either, just call the BrowseForFolder function. no manual API needed, it's in the function.
I agree that inline API is ugly, which is why I always encapsulate it into subs and functions, unless speed is critical, which it never is.
Gerco.
-
you can't with the directory box either. Look at my implementation. I have a manual entry box at the bottom. As you type the directory, it automatically sends the directory and drive boxes to that path, and it won't let you type a fake one. Obviously, you can use the dirbox instead of typing... That is why i did it that way. But i will check out the new upload and learn from it :)
-
Hmm that box has network support. Looks like i'll be changing my code :) It looks better also.
Thanks for the code.