hosted by liquidweb

Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting Talk Tutorials : Programming Tutorials : [VB] Rich Text Box - Two Tricks

Forum Jump

[VB] Rich Text Box - Two Tricks

Reply Post New Thread In Programming Tutorials Subscription
Send news tip View All Posts Thread Tools Search this Thread Display Modes
Join Date: Sep 2005
Posts: 13

[VB] Rich Text Box - Two Tricks

In your form, or function simply do this to copy the text to the clipboard of Windows.

Clipboard.SetText ActiveForm.rtfText.SelRTF

Pasting is pretty much the opposite!

ActiveForm.rtfText.SelRTF = Clipboard.GetText
Want to print what's in your programs box?

If ActiveForm Is Nothing Then Exit Sub

    With dlgCommonDialog
        .DialogTitle = "Print"
        .CancelError = True
        .Flags = cdlPDReturnDC + cdlPDNoPageNums
        If ActiveForm.rtfText.SelLength = 0 Then
            .Flags = .Flags + cdlPDAllPages
            .Flags = .Flags + cdlPDSelection
        End If
        If Err <> MSComDlg.cdlCancel Then
            ActiveForm.rtfText.SelPrint .hDC
        End If
    End With

Sponsored Links

Related posts from
Title Type Date Posted
Net Finance Web Hosting Events 2015-02-24 09:55:54
ReadySpace Taps Bulletin for Application-to-Mobile Text Messaging Suite Web Hosting News 2014-02-21 16:48:38
Do Offsite Search Marketing Strategies Still Matter? Blog 2014-01-15 16:30:47
Photos from ResellerClub Hosting Summit 2013 Blog 2013-10-22 04:01:51
ProfitBricks Infographic: Web Hosting from 1995 to Today Blog 2013-06-28 13:52:35

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Log in with your username and password

Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Web Hosting News:
WHT Membership
WHT Membership



Welcome to

Create your username to jump into the discussion! is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.

(4 digit year)

Already a member?