Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: lhaddix on December 21, 2008, 09:09:33 PM
-
Hi,
Get tired of leaving Masch to fire up the winfows calc?
Place this under a button.
Shell(calc.exe)
I also wanted a button to open the PDF, without having to know the path to Acrobat. So I did this:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA"(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String,ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
ExecuteLink("Mach3Mill_1.84.pdf")
Public Sub ExecuteLink(Link As String)
On Error Resume Next
Dim lRet As Long
If Link <> "" Then
lRet = ShellExecute(0, "open", Link, "", CurDir())
If lRet >= 0 And lRet <= 32 Then
MsgBox "Error jumping to:" & Link, 48, "Warning"
End If
End If
End Sub
I also wanted to be able to bring up the Wiki. Use the previous scipt but replace the
line ExecuteLink("Mach3Mill_1.84.pdf")
with ExecuteLink("http://www.machsupport.com/MachCustomizeWiki/index.php?title=Main_Page")
I take no responsibility for how stable this is because I not used it much so far, but it seems fine.
Landrum
-
Thanks for shareing Landrum. :)
Time savers are great.
Brett