hosted by liquidweb


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

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
  #1  
Old
Newbie
 
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.

Code:
Clipboard.SetText ActiveForm.rtfText.SelRTF

Pasting is pretty much the opposite!

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

Code:
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
        Else
            .Flags = .Flags + cdlPDSelection
        End If
        .ShowPrinter
        If Err <> MSComDlg.cdlCancel Then
            ActiveForm.rtfText.SelPrint .hDC
        End If
    End With



Sponsored Links
Reply

Related posts from TheWhir.com
Title Type Date Posted
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
Are you ready for Speed Networking at WHIR Events? Blog 2013-01-18 07:00:04


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
Login:
Log in with your username and password
Username:
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.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com 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?