Textbox veya Listbox'tan kopyalama

Katılım
28 Mayıs 2005
Mesajlar
37
Arkadaşlar textbox veya listbox'un içeriğini olduğu gibi kopyalayarak form üzerinde bulunan başka bir bağımsız bir richtext nesnesine yapıştırmak istiyorum. Verileri aktarmak suretiyle yapabiliyor. Ancak veriler aktarıldığında kaynaktaki şekilde aktarılmıyor.Ben yapısını koruyarak yapıştırmak istiyorum. Vb'deki Clipboard.SetText fonksiyonunun access'teki tam karşılığını bulumadım.Bu konuda yöntem bilen arkadaşlar varmı?
 
Katılım
28 Mayıs 2005
Mesajlar
37
Sanırım her zaman ihtiyaç duyulmayacak bir soru olduğu için bu konuda uğraşabilecek arkadaşlar da ilgi göstermediler, ama gün gelip lazım oluyor işte,
Başlığın cevapsız sorular bölümüne atılmaması için bu konuda çözümü kolaylaştırabilecek biraz açılımı sağlabilecek bir kod buldum,geliştirilebilir diye düşünüyorum. Ancak içinde menuden kontrolü sağlayacak fonksiyon var, doğrudan çalışabilmesi için sağ klik ile fonksiyon yaratılabilirse yararlı olur

' Inputs:' To work with all of the textb
' oxes on a form,
' the routine accepts the following para
' meters:
'
' ThisBox = The text box to operate on
' ThisJob = the command to execute
'
' Returns:None
'
'Assumes:' If the subroutine is called f
' rom a menu,
' it can be set up to use the menu's cap
' tion so that
' little additional code is necessary:
'
' Sub mnuEditMenu(Index As Integer)
' If TypeOf ActiveContol Is TextBox Then
'
' EditText ActiveControl, CStr(mnuEditMe
' nu(Index).Caption)
' End If
' End Sub
'
' If the HotKey notation (&) is used, it
' must also appear
' in the EditText routine. Otherwise you
' can call it using
' the textbox and a command string:
'
' EditText Text1, "copy"
'
'Side Effects:None
'**************************************



Sub EditText(ThisBox As Control, ThisJob As String)
Dim Send$


Select Case LCase(ThisJob)
Case "copy"
Send = "^C"
Case "cut"
Send = "^X"
Case "paste"
Send = "^V"
Case "undo"
Send = "^Z"
End Select
If Len(Send) Then
ThisBox.SetFocus
SendKeys Send
End If
End Sub
 
Üst