|
-
May 12th, 2002, 06:30 AM
#1
Thread Starter
New Member
Open a *.lnk file in VB6.0
Hi,
I am trying to mae a simple VB application that does not allow people to access the Internet before 8:30. What I want to be able to do is, if it is after 8:30, bring up the Dial-Up to the ISP box, and if it is not after 8:30, show a message box. So far I have been going ok, but I cant get VB to open up a LNK file to get the DUN box to disply. The code I have made is below.
Private Sub Command1_Click()
If Label1.Caption < "8:30" Then
MsgBox "You May Not Use The Internet Before 8:30PM"
Else
Shell "C:\WINDOWS\Application Data\Microsoft\Internet Explorer\Quick Launch\Telstra.lnk"
End If
The error I get is
Run-time error '53':
File Not Found
The file is there and I do not know what to do now.
Any help would be great.
Thanks.
Inosmnia
-
May 13th, 2002, 02:05 AM
#2
Addicted Member
Run DLL, Run!
If you want to launch a DUN session there is a better way than shelling a LNK. Do it directly.
...by "Dave O'Connell" <Doconnell@H...> on Fri, 27 Jul 2001
"...The following code will allow you to connect to a predefined Dial-Up
Networking entry.
DialUPNetwork:
Dim res As Double
res = Shell("rundll32.exe rnaui.dll,RnaDial " & "Dial-Up Net entry", 1)
The Shell command will bring up the Connection screen that you should be
familar with. The AppActivate and SendKeys commands allow you to
automatically click on the "Connect" button. ..."
or put in text if you don't have it set to auto-dial.
-
May 13th, 2002, 05:50 AM
#3
Thread Starter
New Member
Thanks.
Thanks for your help guys. I couldn't get your solution to work mendhak, but I could use yours and get it working fine OsirisX.
Thanks
Insomnia
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|