Making A Selection Around A Richtextbox, Vb Express 2010

Apr 16, 2011

i want user when clicks a button to show a selection around a richtextbox and not inside it selecting the text... what i have right now is this: richtextbox1.focus() that will indeed focus the richtextbox but the problem is, it only selects its text content.

What i want is something similar to a Yellow or Blue Square showing around the richtextbox i want to "select", so the user will properly notice the richtextbox more easelly.

i tried messing with the vb express rectangle stuff but i cant get it to draw over all objects, its actually always displaying below all objects in the forum

EDIT: ive also tried using a tiff picturebox with a drawed empty rectangle on it, but the dreadish thing when put over other objects like textboxes, it simply just displays the color of the form emitting any other objects in between, setting the background color to transparent under web colors had the same problem...

View 9 Replies


ADVERTISEMENT

VS 2010 RichTextBox Selection?

Apr 29, 2011

When setting the selection of a RichTextBox, the selected text is highlighted even though I set the HideSelection property to True. Once the RTB loses focus then the selected text is no longer highlighted. Programatically setting the focus to another control doesn't hide the selection, only physically clicking another control will hide it. So is there a way I can make the RTB not show the selection right from the start?

View 2 Replies

End Selection In RichTextbox?

Nov 27, 2009

I want to end the selection in a rich text box.Example:

Sentence - "I was walking in the park and found a coin."
I want to select from "walking" to "found"
RichTextbox1.SelectionStart = RichTextbox1.Find("walking")

[code].....

View 3 Replies

RichTextBox Hide Selection?

May 23, 2011

I'm using a richtextbox and I format the text (color) during keypress.. (like visual basic language: text in black, "dim" in blue, "comments" in green...) I use selection properies to do this, ok, work fine, but I see the selection and unselection.. Ok, is very fast, but it's annoying.. there is a way to format the text and hide the selection?

View 2 Replies

Making A Selection From An At Runtime Generated Listbox?

Oct 22, 2011

Private Sub ListOfCrops_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListOfCrops.SelectedIndexChanged

View 9 Replies

Code Selection Of Text Within A RichTextBox?

Mar 26, 2009

How do you code selection of text within a RichTextBox. I tried the following code and nothing happens.I would think this should select all text within the RichTextBox.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.RichTextBox1.SelectAll()
End Sub

I would think this would select text from a start point to an end point.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ss = Convert.ToInt16(TextBox1.Text)
se = Convert.ToInt16(TextBox1.Text)
Me.RichTextBox1.Select(ss, se)
End Sub

View 1 Replies

RichTextBox Formatting - Selection Font Gets Set To Nothing

Dec 15, 2010

I have a RichTextBox. I process all the formatting and everything works fine. There is an exception. When I have selected text that have two states of formatting in it, the SelectionFont member is set to Nothing. I notice that WordPad recognizes this condition
and kindof greys out the affected format.

Let's take this example:
This text is in Bold.
The rest of the comments here and not in bold.

When I select these two lines, the SelectionFont gets set to Nothing. WordPad sets the Bold button grey, but still clickable. If I click the Bold button in this state, the entire selection is set to bold. How do I achieve this same functionality?

View 3 Replies

How To Fire Event When Making Selection Of Editable ComboBox

Jun 15, 2012

I have a ComboBox that is databound to an ObservableCollection of strings. The ComboBox is also editable, so you can either enter in your own value or select one from the list. The issue I'm running into is the index of SelectedItem seems to be the index of the last item you selected when you've entered in your own value in the ComboBox, though it's -1 when you have IsTextSearchEnabled set to true. The problem is, if someone entered their own value and then decide to instead select the item on the ComboBox that had been selected before, the index doesn't change so the SelectionChange event doesn't fire. How could I get an event to fire in this situation?

View 1 Replies

When Ever There Is A Combo Box It Will Open Another Screen And Making The Selection Is A Breeze?

Jul 18, 2011

I have a combo box on few of my vb.net 2010 programs. The end users that use my program have touch screens and they have a hard time making selections on the combo box. I have an Android cell phone and when ever there is a combo box it will open another screen and making the selection is a breeze.

View 1 Replies

RichTextBox Selection Font (Applying 2 Styles)

Jan 18, 2009

How do I apply 2 font styles to the text selected in a richtextbox? Used this method to change fontstyle:
RichTextBox1.SelectionFont = New Font(RichTextBox1.SelectionFont, FontStyle.Bold)

But with this method I can only apply 1 font-style (for example bold OR italic OR underlined, etc.) right? But I want to apply for example 2 front-styles, or just add the font style ( so I can add several front-styles to the selected text, for example the text is bold, and then ALSO make it underlined (with this method I can only change the font-style, only one font-style)), how do I do this?

Just do so:
RichTextBox1.SelectionFont = New Font(RichTextBox1.SelectionFont, FontStyle.Bold + FontStyle.Italic)

View 2 Replies

VS 2008 - How To Reset RichTextBox (Selection Color)

Jun 21, 2012

How do you reset a RichTextBox? I wrote some code that changes the
RichTextBox1.SelectionColor = Color.White and
RichTextBox1.SelectionBackColor = Color.Red.
I'd like to change all the text in the RichTextBox back to Black and no back color.

View 2 Replies

Making A Selection Updates The Data Bound Labels On Form

Oct 19, 2011

I have a Data Bound ListBox on a 2nd form, making a selection updates the Data Bound Labels on form1. The problem I have is the ListBox is desplaying the ID not the Title, I have chect all obvios places and find nothing.

View 1 Replies

RichTextBox Disable Span/Extended/Word Selection?

Apr 2, 2010

When I select text with a mouse in dense text like an XML file the selection automatically extends to what it thinks is a white space (or?). How do I turn off this "word selection" and just select the characters the cursor passes over?VS2010 Beta, VB.Net

View 7 Replies

VS 2008 : Display Information From A Text File After Making A ComboBox Selection?

Jun 4, 2010

I have a program that needs to display a playlist of songs, for a band performing someplace, from a .txt file. The songs in the file are listed as follows:

All You Need is Love-Beatles
Rock
4.25

[code]....

The first line is the song's title and group name. The second is the songs genre. The third line is the songs length, 4.25 is 4 minutes and 25 seconds.upon clicking a button, I need to display a playlist from this .txt file based on the number of minutes the band has to play, minutes entered into a TextBox, and the songs genre, selected from a ComboBox. The songs cannot repeat and must be random.I have already coded the program to read the .txt file but have not clue where to start with the rest.

View 5 Replies

Preventing Auto-selection - Select A Portion Of A String From A RichTextBox

Apr 2, 2010

I have a problem when I select a portion of a string from a RichTextBox. For instance, if I have the following string: (23*6)+5 and I want to select (23*6) the "+" is also selected. I have search for a means to correct this problem, but I have not been able to find a solution.

View 4 Replies

VS 2010 Connecting VB 2010 Express To SQL Server 2008 Express Database Via IP

Feb 29, 2012

I am trying to make a user account SQL database work with Visual Basic 2008 Express for login purposes, i.e. usernames & passwords. Plan is to host this server so people can login to use the the application and verify they have a valid account. I would like to host all the account information in SQL due to the possiblity of hundreds of users at any given time. I also need the ability to add data to the database for users registering for the first time. The SQL server will need to be able to access the SQL Server databases remote via WAN.

View 3 Replies

VS 2008 Hyperlink Making A RichTextBox Expand?

Jan 10, 2010

Ok, So i have googled my ass off looking, I've seen it somewhere were you can make a hyperlink with one line of text so when they click the button it opens that website in there browser and i cant seem to find it, Dose anybody know?.

Next thing, Dose anybody know how to make it so the richtextbox on my page expands when you make the window maximized, I did parent body thing but it covered all the other content on the page :/

View 2 Replies

Forms :: Making A Spell Checker For Richtextbox Control

Apr 22, 2011

i'am having trouble in making a spell checker for vb.net richtextbox control.I have made a form with richtextbox control and a panel control. I have put a listbox control in the panel control and filled with certain words. What iam able to do is whenever i select a word and click a button the panel appears just below the word (using get position from char) and display the choice. What iam not able to do is:

1) Select each word one-by-one whenever i click a button say F1 - I know keypress event but how do i select the words through keypress. I know they are separated by spaces but iam not familiar as to how to take advantage of it. The major problem being that there can be 2-3 words together sometimes colored as red. Eg: What i want is when i press F1 first time "this" is selected, next time "is" is selected and next time "nice car color" is selected. The two things are spaces and red color but i don't get anything from it.

2) Display the panel correctly within the main form's border. Right now when i select the last word of the sentence some part of panel disappears as it hides behind the main form. Eg - only 1/4th appears and rest hides. I can't find a way to limit it from moving when it has reached the main form size. I want to constrain it between top-bottom and left-right border of main form.

View 1 Replies

RichTextBox Word Wrapping - Making New Line To Be Indented To Under Text Above

Jul 27, 2011

When i am receiving server responses some are to long for the RTB so obviously continue on the next line. Each line is time stamped. If the word is to long it looks as follows:

15:00 this is a long
message
15:01 another message and so on

what i would like is for the new line to be indented to under the text above so it does not wrap directly under the time stamp. [Code]

View 3 Replies

Making Shapes In VB 2008 Express Edition

Oct 18, 2009

i have just begun to program so I am a complete beginner. but i cannot find out how to add a shape to my form. I am reading a book that is a guide to beginner programmers but it simply says to use the shape control, but I cannot find that. I am pretty sure that the author was using a different version of visual basic so I just need another way to insert a shape on my form. also, what are the units used in the version 0I am using.

View 8 Replies

Making A Hangman Style Game In VB 2008 Express?

Jun 1, 2009

I am making a hangman style game in VB 2008 Express. I am a beginner and instead of making any graphic related content (i.e. the hang man), I am using a 3 strike system. So far, I am just about finished. Only problem is whenever I choose a letter that is incorrect, it adds 1 to the strike label. The problem is, the second time I choose an incorrect letter, the "1" does not change to 2! The line is as fallowed:

strikelbl.Text = +1

View 3 Replies

Making A Game In Visual Basic Express 2008 With Several Forms?

Nov 18, 2010

Here is a wierd case - I am making a game in Visual Basic Express 2008 with several forms. Each windows form I've given a quit command that works well to end the game. (Me.Close) However if instead I click on the big X button that windows provides in the upper right hand corner - it does not look to truely stop the program.

I'm running this program in debug mode from the MS VBE editor, but when I click that X it tells me that program is still running even though all

View 5 Replies

VB Express - Making A Program That Can Take A Text File Filled With Code?

Aug 21, 2009

okay so i was thinking of making a program that can take a text file filled with code so the text file would look like this

Title{Text = blah blah; text = blah blah; Title2{Text = blah blah blah; text = blah blah blah;} }

and have the program display

Title
Text = blah blah
text = blah blah
Title2

[code]...

View 3 Replies

VS 2005 Copy And Paste From Outlook Express To RichTextBox

Oct 28, 2009

I want to copy some information (formatted text) from outlook express email body to my apps, Rich text box control. But when I do that, some hyperlinks and some boxes going here and their. I just want to copy the content as it is.

View 2 Replies

Unhandled SqlException In VB 2010 Express Thta Does Not Occur In VB 2008 Express?

Oct 16, 2010

I tried to start using VB 2010 Express with a program I originally developed with VB 2005 Express that I moved to VB 2008 Express successfully a couple years ago. It uses a database file (*.mdf) that is on the computer ( not out on a server). When attempt to run the program in debug mode, I get the following error "An attempt to attach an auto-named database for file C:Documents and SettingsTomMy DocumentsQuizzing StuffQuestion Database 2010QuizQuest ionGameQuizQuestionGameinReleaseQuizQuestionDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I first made a copy of the entire project folder that was working in VB 2008 Express and gave it a different name. In VB2010 I opened the project in the copied folder and it said it successfully converted the project. I am able to open the Data Source inthe Designer and see the database structure as I expect. I think the project is still using SQL Server 2005 Express (because it is what is checked in the list of prerequisites on the Publish tab).

Note, I have programmed off and on for many years, but fairly new to using databases and SQL Server.

View 3 Replies

Connecting VB 2010 Express To SQL Server 2008 Express Database Via IP

Feb 29, 2012

Here is the scoop: I am trying to make a user account SQL database work with Visual Basic 2008 Express for login purposes, i.e. usernames & passwords. Plan is to host this server so people can login to use the the application and verify they have a valid account. I would like to host all the account information in SQL due to the possiblity of hundreds of users at any given time. I also need the ability to add data to the database for users registering for the first time. The SQL server will need to be able to access the SQL Server databases remote via WAN.

View 1 Replies

INSERT Or Update In SQL Server 2008 R2 Express In VB 2010 Express

Jan 21, 2011

I am trying to re write a VB6 program using MS Access, many years ago, using VB 2010 express and SQL server 2008 R2 Express. I have a database with several tables, which I created using the designer. I am able to connect to the database and select data and display it in textboxes etc in vb code. What I have not been able to in code is to INSERT rows DELETE rows or UPDATE any data in the tables. I can do any of these operations using the Query Designer, but I want to do it in code. I can post some code if necessiary, but I thought it might just be some property that I had not set in the designer.

[Code]...

View 13 Replies

VB Express 2010 Slower To Compile And Run That Older Versions Of VB Express?

May 12, 2010

Is VB Express 2010 slower to compile and run that older versions of VB Express? I've installed it this weekend and it seems a little sluggish on my quad core computer with 1 gig of RAM. I have VB Express 2005 installed for my students at school and it seems to fly just fine. Those school computers are older P4s with 512k of RAM.

View 7 Replies

Making An Express App To Search For Duplicate Files (songs) In Music Directory?

Jan 21, 2010

Windows Media Player has hosed up my library, making multiple copies of the same songs.I am looking at making a VB express app to search for duplicate files (songs) in my music directory, and allow me to delete or move.Where can I go learn about the files and directory controls I would need to use to point to the directory I want to search?

View 5 Replies

(VB 2010 Express - Bug In VB 2010 Express Working With Excel?

Jun 3, 2011

Initially my app worked with excel fine, now it causes my computer to reboot only after Excel has been opened (two or more times). I have opened and closed Excel files 20+ times without running thru either of my apps (they all uses identical code for excel) and it has never caused a reboot or a crash.

run either of my apps and have the app control excel has become a crap shoot, it will reboot my computer. Adding to that I then have to do a manual shutdown because the reboot process after is unstable. (System doesn't respond properly). My code in this app is small, should make for a good example. I can provide the entire project to anyone who would volunteer to test it. (First I need to know how to send the project).

[Code]...

View 10 Replies







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