RichTextBox,: Pass Fontname To Function To Change Selected Text?

Oct 14, 2010

I've been trying to convert my VB6 code to VB10, I'm stuck on how I should write it so I can pass a font name to my

function, So far this is what I have and not sure where to go from here. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]...

View 5 Replies


ADVERTISEMENT

Get Selected FontName And FontSize?

Mar 16, 2012

I've been trying to look for answers on how to do this, for days, but just couldn't find one. Maybe I don't know the keywords to look for. I hope someone can help me with this. Here's my problem. I'm trying to create a wordpad and I have two ComboBoxes (FontName & FontSize) and a RichTextBox. I'm trying to figure out how to get the FontName and FontSize of a SelectedText in the RichTextBox and be selected automatically in each ComboBoxes?

View 2 Replies

Change All Links Colors In Richtextbox But Not One Selected?

Aug 2, 2011

Code to replace the link colors and text colors?Here's the code I found.it works but it only changes the color of one link.I need to change all the colors of all links.[code]...

View 1 Replies

Sqlite - Loop Through Selected Records And Pass Each Record As A Parameter To Another Function?

Jun 5, 2010

I have a sqlite table with following fields:

Langauge level hours
German 2 50
French 3 40
English 1 60

[code]....

I want to loop through the records based on language and other conditions and then pass the current selected record to a different function.So I have the following mixture of actual code and psudo code. I need help with converting the psudo code to actual code, please. I am finding it difficult to do so.

Here is what I have:

Private sub mainp()
Dim oslcConnection As New SQLite.SQLiteConnection
Dim oslcCommand As SQLite.SQLiteCommand
Dim langs() As String = {"German", "French", "English"}

[code]....

View 3 Replies

Change The Selected Value To Upper Case In The Richtextbox In 2008?

Sep 15, 2010

i need to change the selected value to upper case in the richtextbox i use the code

Dim tou As String
Dim tot As String
tou = RichTextBox1.SelectedText
tot = tou

[code]....

View 1 Replies

VS 2008 - Change Multiple Selected Fonts In Richtextbox

May 17, 2012

iam using this code to change the font in a richtextbox it's work if user select a single font if there are multiple fonts, and font sizes it dosenot work

[Code]...

View 13 Replies

Deleting Selected Text In RichTextBox

Oct 7, 2006

I want to know that how can I delete selected text in a richtextbox.

View 6 Replies

Replacing RichTextBox Selected Text With ST?

Mar 31, 2010

I need to make it so it will replace RichTextBox1's selected text with: <ST>, where ST is the initially selected text.

View 3 Replies

C# - Finding RTF Code Associated With Selected Text In RichTextBox

Mar 7, 2011

I am using winform RichTextBox and I wonder if we can find the corresponding rtf code (or at least whereabouts of it) when selecting text?

View 1 Replies

Color Dialog And Selected Text In Richtextbox?

Jun 6, 2011

i'm trying to only change the color of the selected text in a richtextbox using the color dialog.. this code changes all the text..

Dim dlgcolor As New ColorDialog
dlgcolor.Color = PictureBox4.BackColor
If dlgColor.ShowDialog() = DialogResult.OK Then

[code].....

View 1 Replies

Differences In Selected Text In Textbox And RichTextBox?

Sep 2, 2007

I have a form with a Textbox, RichTextBox, and a CopyToolStripButton.When I select text in the TextBox control, I can right click the mouse to get a menubox (cut, copy, paste, delete, select all) but when I select text in the RichTextBox and right click the mouse I do not get a menubox.Is this simply a difference in the controls, or do I need to enable a property on the RichTextBox to get this functionality?

This difference between Textbox and RichTextBox is evident even without the CopyToolStripButton code, so I am guessing it might have something to do with inherent or default properties of the controls themselves.At any rate,I would like to get this funcionality for the RichTextBox control as well.

View 12 Replies

How To Get A RicHTextBox To Multi Highlight Selected Text

May 1, 2009

How can I get a RicHTextBox to Multi Highlight selected text? [code]

View 5 Replies

Pan/change/move The Text Appended To A Richtextbox Control So The Text Itself Scrolls In Addition To The Scrollbars?

Jul 11, 2011

My application appends incoming report data onto a RichTextbox control. As more text arrives from an external device, the thumb initially fills the trough and as times goes on, the thumb diminishes in size. This is expected behavior.A modal dialog box allows the user to cancel the file download but since it's modal, the user can't scroll down to see what the last text that was appended.Is there a property/event/method that will show the most recent/last text in the RichTextBox control, rather than the initial text as I have it displayed now? The user would be able to see the text drawn real time without having to use the thumb to accomplish

View 2 Replies

Asp.net - Pass Parameter As Text To JavaScript Function From .NET Code-behind

Mar 23, 2010

Basically, I have a gridview that is opened in a new window from the parent window. It has a bunch of records with a view button to view the details of each record (which stays in the same newly opened window). I have a calendar in the parent window that accepts a Date querystring parameter to set the current date on the calendar at page load. I'm just trying to refresh the calendar in the parent window to match the date of the label in the newly opened window.

All the code below is in the newly opened window. The .Net code-behind below refers to when that view button is clicked and everything is populated. At the end, I call the js to refresh the parent window and pass the value of the LabelScheduleDate as the querystring parameter. Now the label comes through as '03/25/2010' in the code-behind, but when I pass it to the js, it comes through as '0.00005970149253731343' in the end querystring. I'm not really sure what is making the value change, and I want to pass it as just text. Do I need to pass it as a string object? I tried but I don't think I was doing it right.

JavaScript Function
function RefreshParent(inputDate) {
window.opener.location = window.opener.location + "?Date=" + inputDate;
}

[Code]....

View 1 Replies

.net - Adapt Text Validation Function To Consider Selected Text?

Jun 4, 2010

I have this function which evaluates the contents of a textbox (or combobox or maskedtextbox) control and, in conjunction with a KeyPress event, will either allow or disallow the input. It is quite useful for dates or textboxes for which only numeric input is valid. It allows a set number of digits after a single decimal point, if specified in the function call. It also allows the backspace character if the textbox is full.

I would like it to allow me to input what would otherwise be valid text when the textbox is full but one or more characters are highlighted (and would therefore be replaced by the keypress character.

[Code]...

View 1 Replies

Change A Text In Richtextbox But Keep Image In It?

Jun 9, 2010

I have a richtextbox with images and text. I want to change specified text but i want to keep my image. How can i do that.

I use :

Dim aLines() As String = rtbDisplay.Lines
aLines(i) = aLines(i).Replace(str, "")
rtbDisplay.Lines = aLines

but do not work.

View 2 Replies

Change Color Of The Text In RichTextBox

Apr 10, 2009

Trying to change the color of more than one of the same text within a RichTextBox. [Code] The above code searches for, and changes the color of all "Boat"s found in the RichTextBox. There are a few problems, such as: If you were to go back to edit the RichTextBox and place your cursor in front of the, now blue word, "Boat" and type then all of your text would be blue. Also, the text you wish to change the color of in the RichTextBox MUST be Exactly the same as: "Search1", aka "Boat", capital letters and all.

View 2 Replies

Change Richtextbox Text Colors?

Mar 21, 2011

I have another application that i'm currently building...

It basically is a "check list" for installed program's, and files. I image machines on a daily basis, and me making this application will save me hours, and hours of time.

[code]...

View 1 Replies

Change Text From Textbox / Richtextbox?

Jun 21, 2010

I want to ask how to change text from richtextbox/textbox ?[code]...

View 2 Replies

Change Text-style In Richtextbox?

Apr 28, 2010

"This is a test . This is the second test . This is the third test . This is the final test"I know how to do this using SelectionStart etc. However this limits what I want to domagine that the 4 sentences are stored in an array, where array(0) should be always bold,array(1) italic, array(2) underline and array(3) normal.

View 4 Replies

Change The Backcolour Of A Text In A Richtextbox

Jul 29, 2010

the richtextbox is cute editor

i want to change the background colour of a specific text in the editor not the entire background colour

i want to do that with code in vb.net i ask the support and they dont know...

View 4 Replies

Change The RichTextBox Text In A Shared Sub?

Dec 31, 2009

I try to create a simple IrcClient.If i get a Message over the Irc, the Sub OnChannelMessage gets Enabled and should give out, what someone wrotes.The Sub:

Public Shared Sub OnChannelMessage(ByVal sender As Object, ByVal e As IrcEventArgs)
'Form1.RichTextBox1.Text() = "[" + e.Data.Nick.ToString + "]: " + e.Data.Message
Form1.SendText.Text = "Test"[code]....

View 14 Replies

Change Text Color While Typing RichTextBox?

Apr 13, 2011

I am attempting to change the color of certain text while i am typing in the richtextbox area my only problem is. because its a selection if i keep typing then whatever is selected will be removed.[code]...

View 4 Replies

Change Color Of One Word When Appending Text To RichTextBox

Apr 15, 2011

I'm trying to find a way to change the color of one word when appending text to a Rich text box. So if I append the sentence "This is a sentence with a specific word in one color" The entire thing will be in black except for the word "specific" it will be in red or any color I choose. The same thing will happen if the next line appended is "Please be specific in your request". All back except for the word "specific". I don't want the text added then someone has to click a button to change the color. It should happen as it's appended.

View 6 Replies

Change Richtextbox Text Size Without Modifying The TextStyle

May 19, 2009

I want to change the text size in a richtextbox without changeing the font style (whether it is bold, inderlined or in itallics.) I have used this code, but it wont work, it just changes the font style to normal:

[Code]...

View 6 Replies

How To Pass A Function To A Function Is Functors/function Objects Avaiable In VB2010

Oct 12, 2011

I want to make an numerical integration method with takes in an analytic function and integrate it over a specific interval. For the numerical integration procedure I want to use some procedures in nr.com. The problem is that these are programmed in C++ and they uses functors to pass a function to the integration method. How can I do this in VB 2010?

I want to initialize the function (i.e. set a=1,b=0 for function y(x)=a*x+b) and then pass the function to the integration method. Then when the integration method call the function it only calls the function with one parameter (i.e. x since a,b is already set)

What is the best way to do this in VB2010?I want to make a general integration method where I can pass any single valued function and integration limits.

I have just started using VB, and from what I have found so far it seems like the tools you have is

- to us a delegate for the function
- to use a lambda expression for the function
- send a pointer/adressOf
- to create a function class/structure and submit this to the function

As for now I am most inclined to create a function-class. But I am not really sure how.F.ex. I make different classes for each "uniqe function" I want to integrate, but how can I pass them to the integration function when I need to specify the argument type in the integration-function-call?This seems like a basic problem which applies to many Math operations, so I think it would be very useful to clarify this.

View 2 Replies

.net - WPF RichTextBox - Iterate Through The Text's Words And Change Their Content And Formatting?

Nov 1, 2010

I have a WPF RichTextBox which contain in its FlowDocument both text and images. I need to iterate through the text's words (those which builds the text which the user see on the screen) and change their content and formatting. For instance, change the word "room" to the word "home", applying to the last a red color.

I need to change words whether they are formatted or unformatted.For instance, if a word is in Italic, colored, or just regular black text, it makes no difference for me.Each word will be replaced with one which have about identical length, so I don't want that this operation will effect the general page layout. All images and other objects should remain at their positions.It is preferred that the process of this operation will not be visible to the user. Only its result should be visible (i.e, no visible selections of text).If this operation can be done either directly on the FlowDocumet or with properties/methods of the RichTextBox, the simple one is preferred (but exmaples for both will be ideal).

View 1 Replies

Change Selected Value / Text Of Combobx?

May 21, 2009

I have two forms ( form1, form2) with a textbox on form1 and a combobox on form2. The combobox is databinded. What I have been trying to do with no success is to alter the combobox during runtime from form1. In the textbox the text displayed always corresponds to the values binded with the combobox. I want to set the selected/displayed value of the combobox to be the text that is on the textbox. This to be done on a button click from form1. I have tried the findstring and findstringexact to locate the index of the corresponding text and alter but nothing. After so many testing I soon realised that if the combobox is at form1 together with the textbox I can do whatever I want with it. But when is on form2 I cannot do anything. When I mean anything I have tried clearing the displayed value with 'selecteditem = Nothing' with no success plus whatever else I try. [code]...

View 1 Replies

How To Change Font Of Selected Text

Dec 6, 2010

I am creating a Rich text file editor, and I want to change the font of the selected text with the font dialog. Here is my code (editor is the rich text box)
Dim font As New FontDialog
FontDialog1.Font = Editor.Font

View 2 Replies

How To Change The Selected Text Into Underlined

Jul 10, 2008

i am making a richtextbox and some buttons,i want to press a button while some text is selected ,the selected text becomes bold or underlined,

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved