Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub grdDep_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MouseDownPopUp grdDep, Button, Shift, X, Y, frmMain.mnuEdit
End Sub
'
Public Sub MouseDownPopUp(objCtl As Control, Button As Integer, intShift As Integer, _
sngX As Single, sngY As Single, objmenu As Object)
Dim strTypeName As String
strTypeName = UCase$(TypeName(objCtl))
If Button = vbRightButton Then
On Error Resume Next
objCtl.Enabled = False ' Disable othere pop-up
objCtl.Enabled = True
Select Case strTypeName
Case "MSFLEXGRID", "MSHFLEXGRID"
'* Select proper Row and Column
objCtl.Row = objCTL.MouseRow
objCtl.Col = objCTL.MouseCol
End Select
objCtl.SetFocus
If Err = 0 Then
objCtl.Parent.PopupMenu objmenu
End If
On Error GoTo 0
End If
End Sub
' frmMain Menu Code
Private Sub mnuEditCopy_Click()
Dim strDescription As String, strName As String
Dim strTypeName As String
Dim strCopy As String
On Error Resume Next
strTypeName = UCase$(TypeName(ActiveForm.ActiveControl))
strName = ActiveForm.ActiveControl.Name
If strTypeName = "MSFLEXGRID" Or strTypeName = "MSHFLEXGRID" Then
strCopy = ActiveForm.ActiveControl.Text
If Len(strCopy) > 0 Then
Clipboard.SetText strCopy, vbCFText
End If
Else
Clipboard.SetText ActiveForm.ActiveControl.SelText, vbCFText
End If
strDescription = Err.Description
End Sub
Private Sub mnuEditPaste_Click()
Dim strDescription As String, strName As String
Dim strTypeName As String
Dim strPaste As String
On Error Resume Next
strTypeName = UCase$(TypeName(ActiveForm.ActiveControl))
strName = ActiveForm.ActiveControl.Name
If strTypeName = "MSFLEXGRID" Or strTypeName = "MSHFLEXGRID" Then
strPaste = Clipboard.GetText(vbCFText)
ActiveForm.ActiveControl.Text = strPaste
Else
ActiveForm.ActiveControl.SelText = Clipboard.GetText(vbCFText)
End If
strDescription = Err.Description
On Error GoTo 0
End Sub
Private Sub mnuEditSelectAll_Click()
Dim strDescription As String, strName As String, _
intErr As Integer
Do
On Error Resume Next
strName = ActiveForm.ActiveControl.Name
If Err Then Exit Do
ActiveForm.ActiveControl.SelStart = 0
If Err Then Exit Do
ActiveForm.ActiveControl.SelLength = Len(ActiveForm.ActiveControl.Text)
If Err Then Exit Do
Clipboard.SetText ActiveForm.ActiveControl.SelText, vbCFText
If Err Then Exit Do
Exit Do: Loop
strDescription = Err.Description
On Error GoTo 0
End Sub