Turn Test Containing Multiple Fonts To Bold
Jul 21, 2009I hav used the following text to turn text bold. but it doesnt work when i select text with multiple fonts
[Code]....
I hav used the following text to turn text bold. but it doesnt work when i select text with multiple fonts
[Code]....
When I try and bold two different fonts at the same time, it won't work. Is there any way I can do this like it works in a Font Dialog? Here's my code:
Code:
Try
If RichTextBox1.SelectionFont.Bold = True Then
[code].....
how to have multiple fonts on the same label control?
View 5 Repliesi want to change to font size in richtextbox using a combo box its easy to change the font size if we have one font in our selection text using this code.
RichTextBox1.SelectionFont = New Font(SelectionFont.FontFamily, CInt(ToolStripComboBox3.Text), RichTextBox1.SelectionFont.Style)
But if we have multiple fonts in our selection it dose not work. i have another code to solve this problem. But the only problem with this code it is good for less then 2000 chracters but when the selection text is large it is worthless. code is below.
[Code]...
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]...
I am trying to make a turn-based board game that will be run on multiple computers. I am writing the game logic and design in VB. I searched for a little and could not find the information I was looking for. One question I have is, will I need a server if there will only be 2 players. Also, what language should I use to write the server side code.
View 1 RepliesI have 3 check boxes on a form and am trying to code them to change the font in combinations of Large Font,Bold Font, and underline font.I coded the bold font check box and large font check box but cannot get the Bold and large font to work at the same time.
View 5 RepliesMy current code: Server: Imports System.IO Imports System.Text Imports System.Threading
[Code]...
Right now I can add background music in my program by using this code
My.Computer.Audio.Play(My.Resources.Music_3, AudioPlayMode.Background)
I can also turn it off and change the music by using this code
My.Computer.Audio.Stop()
My.Computer.Audio.Play(My.Resources.Another_Music, AudioPlayMode.BackgroundLoop)
Is it possible to pause the music then if I resume the music it will just continue the flow? I mean if I pause the background music in 33 seconds and the music has 50 seconds and I resume it will just continue playing in 33,34,35 etc.. seconds?
I was wondering if their was a way to for me to turn off events and then turn them back on in my program or just queue them up until i am ready for them to be excuted. Kinda like how a OS turns on and off interupts. Is this one of those general programming no-nos?
View 1 RepliesI'm trying to develop an application which searches a sql server database. One particular search entered by the user actually sends seven queries to the database. I've designed it so each of the seven queries is conducted in a seperate backgroundworker, so that they run and return their hits concurrently. When the user enters a search term, a routine (runSearch) is called , which in turn causes each seperate backgroundworker to run.This work fine when the user enters a single search term.I'm now trying to allow the user to enter multiple search terms in a multiline textbox. I iterate through the lines in the textbox and call runsearch for each line. I assumed that the progam would wait for each call to runsearch to complete, before running the next.
I now find out this is not the case. When I call runSearch, the backgroundworkers are set in motion. The next line in the textbox then calls runSearch again, but the backgroundworkers from the previous calling of runSearch are still running. This throws up an error stating that the backgroundworker is still busy and cannot be called.I need a way to test that all of the backgroundworkers have completed before running runsearch again. If one or more of the backgroundworkers are still running
looking for script to use a db of phone numbers by calling each number to see if the modem connects. Then reports if a phone line did not connect.
View 3 RepliesI have written a program and have used it (in debug mode) multiple times to test it out sometimes adding code and/or changing it. After a while any code I wrote or new buttons or features I added to the form would not appear while debugging. I don't know what circumstances led to this.
The only solution I found was to rewrite my code from scratch, however, the problem came back after a while. I don't know what is going on and I can't move on without starting all over again.
I have one more problem with MonthControl.And when I bold some dates the program doesn't show bold dates on month calendar.When I move on next or previous month and get back to currently month the program normal displays bold dates. What's the problem?
View 22 RepliesI don't understand the error, Argument not specified for parameter 'test' of 'Public Shared Function TestThis(test As String)'.
Partial Public Class Form1
Shared Sub ReceiveCallback(ByVal ar As IAsyncResult)
Form1.Invoke(TestThis, New Object(){"test"}) 'error
[code].....
I'm really new at programming and was looking for guidance about a project I have.I have to design a program that administers a multiple choice test to users. It delivers questions one at a time, from a predefined test file for the user to answer. It also marks and displays a score at the end of the test.
First, a QUESTION form verify's the user's registration status and access. The user provides a registration number and password and the program reads it from a "registration.txt" file to determine if the user is eligible to take the test (i.e., they are registered to take it). If it is correct, then the user presses the "Begin" button. If not, then a message appears and the student tries again to enter the information.
A read only text box will display the score at the end of the test (String with format correct/total) and the user can't retake the test.Second, a QUESTION form opens after clicking "Begin" on the entry form. The questions are going to be from a "testfile.txt" file.Each question is on multiple lines in the file. The first line consists of the question followed by possible answers followed by the correct answer ( 3 items are separated by "#"). The current question number and the question will be displayed in textboxes.'n'= possible answers; so each of the next 'n' lines provides a possible answer. All possible answers will be displayed in a Listbox.After the user selects an answer, an ''Enter'' button is pressed. This will submit and evaluate the answer. If nothing is selected a textbox should appear and display the error message (APPEARS ONLY IF THERE IS AN ERROR). After pressing ''Enter'', the next question is displayed.When all questions answered, the entry form is displayed again and displays the score.
I know that's a lot of information, but I wanted it to be really clear. Would it be best to cycle/loop the questions with a DoWhile loop? And how would I store the answers while the user goes through the test?
[code]...
and from VB6 project I reference to Test.dll but an error messege was appear A reference to Test.dll file could not be added (If I create VB NET project and reference to file Test.dll it OK )
Probably a dumb question, but can you write a unit test project in one language to test against another project in a different language?I'd like to translate one of our VB assemblies into C#, but want to build unit tests to verify the results. I've tried to set a unit test project up to do this, but I can't seem to access the VB code within a unit test... I can't figure out if I'm just missing/doing something stupid, or it really isn't allowed.
View 2 RepliesI have looked everywhere on the web, is there vb code that allows you to add fonts to a stringtable?
View 3 RepliesI have embedded a few fonts in my app but using these fonts is a problem ,i followed a guide with source code but it doesnt explain how to use them .guide here [URL]
code below:
Private Declare Auto Function AddFontMemResourceEx Lib "Gdi32.dll" _
(ByVal pbFont As IntPtr, ByVal cbFont As Integer , _
ByVal pdv As Integer , ByRef pcFonts As Integer ) As IntPtr
[CODE]....................
How do I populate a combobox with all the fonts and when we select the fonts the richtextbox font is the one selected
View 1 RepliesI made a program at VS2008 on Windows Seven. but when i run it on Windows XP looks different.Looks on SevenLooks on XPThis ListView put only 11 lines, both have 11 lines
View 9 RepliesI have two drop down lists(DropFont,DropFontSize) and a textbox(txtSample) one for font name and the other for font size and now if I select the font name from the drop down list the text in the text box should change with the desired font name and size.But when I change some fonts it gives me error stating that the font dosen't support "Regular".
So I have been trying to modify as shown below but now it gives me error that font property is read-only.
Here is my code:
Try
' Compose the font style.
Dim font_style As FontStyle = FontStyle.Regular
[Code]....
Currently i have a listview control set up with 4 column headers.
how to code it so that the text input into the listview changes font size and color in just 1 of the headers?[code]...
I use the following code to change the parameters in my StatuStripLabel
Dim ItemImage As System.Drawing.Image = iImage
Dim item = New ToolStripStatusLabel(sText, ItemImage)
item.BorderSides = ToolStripStatusLabelBorderSides.All
[code].....
Is it possable to create a save document and control its font type?
im trying to create a .txt file, but when i/someone else opens it comes up in another font type like Arial.
So my textbox is in say Arial font but when i save and recall it, it comes up as say webdings.
[Code]...
I want to make a wordpad i want to put a combobox with all the fonts the user have but i google it and didn't found anything (maybe i wrote a bad keyword)
View 2 RepliesI am trying to embed a font using the following code that I found from this site, however as I'm trying to build, I keep running into an error 'DIGITALDREAMNARROW' is not a member of 'Resources'..
Imports System.Runtime.InteropServices
Module CustomFont
'PRIVATE FONT COLLECTION TO HOLD THE DYNAMIC FONT
Private _pfc As PrivateFontCollection = Nothing
[code]....
I followed instructions (on [URL]) and tried their sample code but it doesn't work. No errors or anything, but it just DOESN'T work? This code is totally foreign to me, where do I put the name of my font (imagine_font.ttf)?
Private Declare Auto Function AddFontMemResourceEx Lib "Gdi32.dll" _
(ByVal pbFont As IntPtr, ByVal cbFont As Integer, _
ByVal pdv As Integer, ByRef pcFonts As Integer) As IntPtr
[code]....
I am struggling with this issue, which is probably something simple. How do you change the font style and font size while a VB application is running? I want to to be able to choose a different font and size based on choices from the ToolStripComboBoxe(s).
View 10 Replies