VB-Homepage Tipp 076

Textbearbeitung - (Kopieren,Ausschneiden,Einfügen,Rückgängig) - 32Bit

Und hier, wie versprochen, der Tipp für die 32Bit Version.

textbtg.vbp
Form=textbtg.frm
ProjWinSize=152,402,248,215
ProjWinShow=2
IconForm="Form1"
Name="Projekt1"
HelpContextID="0"
StartMode=0
VersionCompatible32="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName=""

textbtg.frm
VERSION 4.00
Begin VB.Form Form1
Caption = "Textbearbeitung leichtgemacht"
ClientHeight = 4320
ClientLeft = 1140
ClientTop = 1515
ClientWidth = 7305
Height = 4725
Left = 1080
LinkTopic = "Form1"
ScaleHeight = 4320
ScaleWidth = 7305
Top = 1170
Width = 7425
Begin VB.CommandButton Command4
Caption = "Rückgängig"
Height = 255
Left = 2640
TabIndex = 4
Top = 720
Width = 1815
End
Begin VB.CommandButton Command3
Caption = "Ausschneiden"
Height = 255
Left = 120
TabIndex = 3
Top = 720
Width = 1815
End
Begin VB.CommandButton Command2
Caption = "Einfügen"
Height = 255
Left = 2640
TabIndex = 2
Top = 360
Width = 1815
End
Begin VB.TextBox Text1
Height = 375
Left = 240
TabIndex = 1
Text = "Text1"
Top = 1920
Width = 5055
End
Begin VB.CommandButton Command1
Caption = "Kopieren"
Height = 255
Left = 120
TabIndex = 0
Top = 360
Width = 1815
End
Begin VB.Label Label3
Caption = "A.Gamper - http://www.vb-homepage.de"
Height = 255
Left = 240
TabIndex = 7
Top = 3960
Width = 3735
End
Begin VB.Label Label2
Caption = "Die Idee stammt von L. Serflaten's (serflaten@usinternet.com)"
Height = 255
Left = 240
TabIndex = 6
Top = 2880
Width = 6855
End
Begin VB.Label Label1
Caption = "Wie bei jeder Anwendung, muß der zu bearbeitende Text natürlich markiert sein."
Height = 855
Left = 4800
TabIndex = 5
Top = 360
Width = 2295
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Sub DoEditThing(whatThing As String, onWhat As Object)
Dim Send$
Select Case whatThing
Case "Copy"
Send = "^C"
Case "Cut"
Send = "^X"
Case "Paste"
Send = "^V"
Case "Undo"
Send = "^Z"
End Select
If Len(Send) Then
onWhat.SetFocus
SendKeys Send
End If
End Sub
Private Sub Command1_Click()
Call DoEditThing("Copy", Text1)
End Sub
Private Sub Command2_Click()
Call DoEditThing("Paste", Text1)
End Sub
Private Sub Command3_Click()
Call DoEditThing("Cut", Text1)
End Sub
Private Sub Command4_Click()
Call DoEditThing("Undo", Text1)
End Sub

Tipp-Download

Quelle : L. Serflaten's (serflaten@usinternet.com)

Zurück zur Übersichtsseite