Hello Guest it is April 26, 2024, 06:36:50 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - lhaddix

Pages: 1
1
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

Pages: 1