//실시간 검색
Private Sub FpS123_EditModeOn(sender As Object, e As EventArgs) Handles FpS123.EditModeOn
Dim KeyPressHandler As KeyEventHandler = AddressOf FpS123_KeyUp
AddHandler FpS123.EditingControl.KeyUp, KeyPressHandler
With FpS123.ActiveSheet
FpS123.Sheets(0).SetText(0, 1, .GetText(.ActiveRowIndex, .ActiveColumnIndex))
'MessageBox.Show(.GetText(.ActiveRowIndex, .ActiveColumnIndex))
' Call test(.GetText(.ActiveRowIndex, .ActiveColumnIndex))
End With
End Sub
Private Sub FpS123_EditModeOff(sender As Object, e As EventArgs) Handles FpS123.EditModeOff
Dim edit_text
Dim KeyPressHandler As KeyEventHandler = AddressOf FpS123_KeyUp
RemoveHandler FpS123.EditingControl.KeyUp, KeyPressHandler
edit_text = Split(sender.AccessibleDescription, ",")
With FpS123.ActiveSheet
FpS123.Sheets(0).SetText(0, 1, .GetText(.ActiveRowIndex, .ActiveColumnIndex))
'MessageBox.Show(.GetText(.ActiveRowIndex, .ActiveColumnIndex))
' Call test(.GetText(.ActiveRowIndex, .ActiveColumnIndex))
End With
End Sub
Private Sub FpS123_KeyUp(sender As Object, e As KeyEventArgs) Handles FpS123.KeyUp, FpS123.KeyDown
If sender.ToString = "FarPoint.Win.Spread.CellType.GeneralEditor" Then
'FarPoint.Win.Spread.CellType.GeneralEditor
If e.KeyCode = Keys.Escape Then Exit Sub
If e.KeyCode = Keys.Enter Then Exit Sub
If e.KeyCode = Keys.Delete Then
With FpS123.ActiveSheet
Select Case MsgBox("선택된 부분을 삭제하시겠습니까?", MsgBoxStyle.YesNo, "caption")
Case MsgBoxResult.Yes
' MessageBox.Show("Yes button")
FpS123.Sheets(0).Rows.Remove(.ActiveRowIndex, 1)
sang_sprR = sang_sprR - 1
Case MsgBoxResult.No
'MessageBox.Show("NO button")
End Select
End With
Exit Sub
End If
Dim test_text As String
test_text = sender.FormatText
FpS123.Sheets(0).SetText(0, 2, test_text)
End If
End Sub
'.net' 카테고리의 다른 글
vb 웹 페이지 소스 가져오기 (0) | 2016.05.10 |
---|---|
vb net 스프레드 크기 조정 (0) | 2016.04.18 |
vb .net 스프레드 시트에서 해당위치 텍스트 가져오기 (0) | 2016.03.31 |
vb .net confirm 박스 (0) | 2016.03.31 |
mysql dll 참조추가시 (0) | 2016.03.31 |