Click here to Skip to main content
15,888,351 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Excel open as ADODB.Connection Pin
hansoctantan17-Jan-17 3:31
professionalhansoctantan17-Jan-17 3:31 
QuestionLosing lines when writing to RichTextBox Pin
jkirkerx6-Jan-17 11:25
professionaljkirkerx6-Jan-17 11:25 
AnswerRe: Losing lines when writing to RichTextBox Pin
Eddy Vluggen8-Jan-17 2:58
professionalEddy Vluggen8-Jan-17 2:58 
GeneralRe: Losing lines when writing to RichTextBox Pin
jkirkerx9-Jan-17 7:22
professionaljkirkerx9-Jan-17 7:22 
AnswerRe: Losing lines when writing to RichTextBox [Solved] Pin
jkirkerx9-Jan-17 8:29
professionaljkirkerx9-Jan-17 8:29 
QuestionLosing Linefeeds when writing text from RichTextBox Pin
jkirkerx6-Jan-17 8:24
professionaljkirkerx6-Jan-17 8:24 
AnswerRe: Losing Linefeeds when writing text from RichTextBox [solved] Pin
jkirkerx6-Jan-17 9:45
professionaljkirkerx6-Jan-17 9:45 
QuestionPaste Action on ContextMenu using RichTextBox Pin
jkirkerx6-Jan-17 7:26
professionaljkirkerx6-Jan-17 7:26 
This is a side cash project, that FoxPro stuff I've been working on and the last bit of code before I ship it today.

I made a dialog box with a Web browser and richtextbox that you can paste HTML into, so it can be injected into an email.
Made the contextMenu with cut, copy and paste, and the event handlers ...
So I can paste from Visual Studio, Word, but not browsers. In the clip board data, I get the StartHTML and EndHTML stuff.

I see some examples in c# for it, custom classes that parse the clipboard, but not anything in VB.
Just wondering if anyone has some code for this, or something down and dirty. It's just going to be used twice a year.
This is the first time I've ever asked for code, just figured why reinvent the wheel on this.
Private Sub PasteAction(ByVal sender As Object, ByVal e As EventArgs)

    If Clipboard.ContainsText(TextDataFormat.Rtf) Then

        RichTextBox1.SelectedRtf = Clipboard.GetData(DataFormats.Rtf).ToString

    ElseIf Clipboard.ContainsText(TextDataFormat.Html) Then

        RichTextBox1.SelectedText = Clipboard.GetText(System.Windows.Forms.TextDataFormat.Html)

    ElseIf Clipboard.ContainsText(TextDataFormat.Text) Then

        RichTextBox1.SelectedText = Clipboard.GetData(DataFormats.Text).ToString

    End If

End Sub
21st Century Globalism has become Socialism on a planetary scale, in which the unequal treaties of the past have come back into play.

QuestionVisual Basic Pin
DrBones695-Jan-17 16:21
professionalDrBones695-Jan-17 16:21 
AnswerRe: Visual Basic Pin
Peter_in_27805-Jan-17 18:07
professionalPeter_in_27805-Jan-17 18:07 
GeneralRe: Visual Basic Pin
DrBones6928-Jan-17 21:04
professionalDrBones6928-Jan-17 21:04 
AnswerRe: Visual Basic Pin
NEBIRE15-Jan-17 9:31
NEBIRE15-Jan-17 9:31 
GeneralRe: Visual Basic Pin
DrBones6928-Jan-17 21:06
professionalDrBones6928-Jan-17 21:06 
QuestionHow to detect what serial port is used when an arduino is plugged in and how to use this serial port data to control maglocks Pin
Member 1291689329-Dec-16 17:12
Member 1291689329-Dec-16 17:12 
AnswerRe: How to detect what serial port is used when an arduino is plugged in and how to use this serial port data to control maglocks Pin
Chris Quinn29-Dec-16 20:39
Chris Quinn29-Dec-16 20:39 
AnswerRe: How to detect what serial port is used when an arduino is plugged in and how to use this serial port data to control maglocks Pin
Ralf Meier31-Dec-16 1:22
mveRalf Meier31-Dec-16 1:22 
QuestionProblem Setting OpenFileDialog.InitialDirectory Pin
Alan Burkhart29-Dec-16 4:52
Alan Burkhart29-Dec-16 4:52 
GeneralRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Richard MacCutchan29-Dec-16 5:43
mveRichard MacCutchan29-Dec-16 5:43 
GeneralRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Alan Burkhart29-Dec-16 6:11
Alan Burkhart29-Dec-16 6:11 
AnswerRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Ralf Meier31-Dec-16 1:29
mveRalf Meier31-Dec-16 1:29 
GeneralRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Alan Burkhart31-Dec-16 5:16
Alan Burkhart31-Dec-16 5:16 
GeneralRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Member 128864681-Mar-18 22:07
Member 128864681-Mar-18 22:07 
GeneralRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Alan Burkhart2-Mar-18 6:12
Alan Burkhart2-Mar-18 6:12 
QuestionHow to read listview data in to a report Pin
RedRocket201621-Dec-16 8:59
RedRocket201621-Dec-16 8:59 
AnswerRe: How to read listview data in to a report Pin
Eddy Vluggen23-Dec-16 2:50
professionalEddy Vluggen23-Dec-16 2:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.