I can't claim to have developed this code; I knew I had done it in the past, and then searched until I found it in one of the newsgroups. I tried this on VB6 a few minutes ago.
'Requires the Microsoft Script Control (msscript.ocx)
Private Sub Command1_Click()
Dim A As String
Dim...
I can't claim credit for this one. It came directly from Edanmo's VB page: http://www.mvps.org/emorcillo/
To save the page from a WebBrowser you usually use the ExecWB method, but it always shows the "Save As..." dialog.
If you want to save the source page without showing a dialog...
This will work in VB6:
Private Sub Form_Load()
If InStr(1, ReadFile("wlr.log"), "error", vbTextCompare) > 0 Then
MsgBox "Error found", vbOKOnly
End If
End Sub
Public Function ReadFile(ByVal FileName As String) As String
'Read an entire file in...
Sorry - tooltips are single lines. However: I had the same question and came across a control at this website: http://www.mvps.org/emorcillo/
which does exactly what you are looking for. Navigate over to the Source Code, then pick the Controls link. The "Multiline Tooltips" is what...
I am trying to read a q-word entry in the registry. It's identified as a FileTimeStamp. Is there an easy way to turn this into something printable?
Brian
You shouldn't need the CDO for W2K if you have the CDO for Exchange available. According to the MSKB article here: http://support.microsoft.com/default.aspx?scid=kb;en-us;318823
the CDO for Exchange is a superset of the CDO for Windows 2000. It contains all of the functionality of CDO for...
Yes, you can upgrade from VB5 Learning to VB6 Pro. I looked around a little, and found VB6 Enterprise edition (media only) at TechDepot for about $30 US. Actually, according to Microsoft, you are supposed to pay the full amount, and not the 'upgrade' price, but since VB6 has been supplanted by...
On the other hand, I recently had to deal with a user that wanted the functionality of radio buttons, but wanted to use checkboxes instead. So the requirements were:
1) Use Checkboxes.
2) Only one could be checked.
3) There could be none checked.
I put them into a frame and used the Click...
You are actually manipulating the ACLs of the folder, and there is a Microsoft Q article: Q240176, which tells how to set the security of NTFS folders programatically. I don't have any code to show how it's done, but I know there are examples out there.
Bill:
Yes, that is easily done by the Packaging and Deployment Wizard. When you get to the 'Install Locations' screen, the rightmost column will be the location where the app is to reside. Change it there, and it will install to that path.
I've never seen a '2' file before - it may have been a typo the first time you set up the package. Unfortunately, the packaging wizard will not delete files once they are put into the dependencies. You will need to delete the package (not your source - just the package) and repackage it.
It depends on what you are trying to do. Are you trying to send information to a program running in the console window? If so, the SENDKEYS function will do most of what you want.
Sheesh! That's what I get for staying late at the PC. I don't know what I was thinking. You need to call the SHELLEXECUTE API. Here's some sample code:
http://216.26.161.91/vbapi/ref/s/shellexecute.html
Once it is associated in the registry, Windows should be able to open it with the proper file; but you may have to reboot before the association actually takes effect.
You can use the FindExecutable API call to see what the association is for a particular filetype.
So, I take it you want to display a text file to the screen? You've almost got it anyway. You can execute virtually any .EXE from the SHELL command, and pass it a parameter (assuming, of course, that the program understands command line parms).
shell "notepad " &...
Strange. I just tested this on my system (Windows XP) and it seemed to work. A few questions:
- Is the program compiled?
- Which OS version are you using, and which version of VB? (5 or 6)
- Could you post the call you are making?
If you want to e-mail me directly, remove the 'C' from the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.