mex
10-31-2004, 05:27 AM
I need some help using Visual Basic 6 and some codes which i dwnloaded from the net!! i can figure out as to how to use them!! can anyone let me know a site which can give a total tutorial for a newbie like me... I got plenty of sites giving tutorials but i just can't undertand them...
I have codes like :
---------------------------
Attribute VB_Name = "CutPaste"
Option Explicit
'*************************************************************************
'* Function: CutCopyPaste(DoWhat As Integer)
'*
'*
'*************************************************************************
'* Description: This sub processes the cut, copy and paste commands.
'*
'*
'*************************************************************************
'* Parameters: 0=cut, 1=copy, 2=paste, 3=delete
'*
'*************************************************************************
'* Notes:
'*
'*************************************************************************
'* Returns: Nothing
'*************************************************************************
Sub CutCopyPaste(DoWhat As Integer)
' ActiveForm refers to the active form in the MDI form.
If TypeOf Screen.ActiveControl Is TextBox Then
Select Case DoWhat
Case 0 ' Cut.
' Copy selected text to Clipboard.
Clipboard.SetText Screen.ActiveControl.SelText
' Delete selected text.
Screen.ActiveControl.SelText = ""
Case 1 ' Copy.
' Copy selected text to Clipboard.
Clipboard.SetText Screen.ActiveControl.SelText
Case 2 ' Paste.
' Put Clipboard text in text box.
Screen.ActiveControl.SelText = Clipboard.GetText()
Case 3 ' Delete.
' Delete selected text.
Screen.ActiveControl.SelText = ""
End Select
End If
End Sub
------------------------------------------
whenever i click the file it opens the Visual Studio but can't be don anything to it... I know i'm missing a lot of things ... where can i learn this language? thanx
I have codes like :
---------------------------
Attribute VB_Name = "CutPaste"
Option Explicit
'*************************************************************************
'* Function: CutCopyPaste(DoWhat As Integer)
'*
'*
'*************************************************************************
'* Description: This sub processes the cut, copy and paste commands.
'*
'*
'*************************************************************************
'* Parameters: 0=cut, 1=copy, 2=paste, 3=delete
'*
'*************************************************************************
'* Notes:
'*
'*************************************************************************
'* Returns: Nothing
'*************************************************************************
Sub CutCopyPaste(DoWhat As Integer)
' ActiveForm refers to the active form in the MDI form.
If TypeOf Screen.ActiveControl Is TextBox Then
Select Case DoWhat
Case 0 ' Cut.
' Copy selected text to Clipboard.
Clipboard.SetText Screen.ActiveControl.SelText
' Delete selected text.
Screen.ActiveControl.SelText = ""
Case 1 ' Copy.
' Copy selected text to Clipboard.
Clipboard.SetText Screen.ActiveControl.SelText
Case 2 ' Paste.
' Put Clipboard text in text box.
Screen.ActiveControl.SelText = Clipboard.GetText()
Case 3 ' Delete.
' Delete selected text.
Screen.ActiveControl.SelText = ""
End Select
End If
End Sub
------------------------------------------
whenever i click the file it opens the Visual Studio but can't be don anything to it... I know i'm missing a lot of things ... where can i learn this language? thanx