Instantly Render Large Amounts Of Multi-colored Text?
Dec 18, 2009
I need to constantly display large amounts of colored text in WPF or Silverlight, and I need the user to percieve it as showing up instantly.
Currently I'm doing this using a canvas and textblocks, one textblock per 80-character line, with multiple runs to a textblock to handle the different colors. There can often be 20+ runs to a line.
In a 45x80 grid of text, this gets a framerate of about 12 in Silverlight, which is sluggish. Oddly enough, it's even slower in WPF... I can only speculate that this has something to do with my dev machine's lousy video card. Maybe it's trying to hardware accelerate and actually slowing down because of it?
View 1 Replies
ADVERTISEMENT
Nov 11, 2011
How to send large amounts of text with TCP.[code]...
View 6 Replies
Nov 11, 2009
What I want to do is display large amounts of text and a few pictures, ideally with hyperlinks between the pages. A lot like wikipedia really, lots of similarly arranged pages, text in categories with in-line hyperlinks and the occasional picture to illustrate a point.But not online, integrated as part of a larger app.
How would it be best to go about doing that? The display method is sortof dictated by the storage method. My thoughts were:
Lots and lots of labels stored in an Access database
Straight HTML as if it were a webpage embedded in an iFrame or something
Labels populated from XML files?
Program the whole lot in Flash or something else (A language I can't speak)
This is only a mockup for demonstration purposes so the priority is user-friendlyness and ease of programming rather than storage concerns or good programming form.
View 1 Replies
Oct 11, 2010
if I want to submit a large amount of text to my asp web page, do I need to worry about the text itself such as containing "&a=" that would mean another variable is being assigned for submitting data? Any way of not worrying about this? Or do I need to replace the & symbol everywhere in the test first if used?
View 1 Replies
Dec 25, 2009
Couldn't think of a better title.(Background on the problem/me)Okay, so, first question/post here, so hi. Now that that's done with, the information pertinent to my problem. I'm fairly new to VB (and programming as well, aside from screwing around with C++ and learning assembler(well, attempting is the better word) god knows how many years ago), and have only seriously been programming for about under half a year, and my skill level is about at that stage. Only been using VB.Net, nothing older. Depending on the time of day and if I'm home or at school, I fluxuate between VB express and Vis Studio 08. Umm, this program I'm having trouble with was on a test that I took yesterday (took the problem home with me cause I really wanted to figure out what was wrong with it).
The stipulations of the test were:
No For->Each Loops
No using Built-In Sorting or Searching Functions
[code].....
View 4 Replies
May 14, 2009
I am trying to put colored text into a list box. I use the following
Private Sub ListBox1_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles ListBox1.DrawItem
e.DrawBackground()
Dim myBrush As Brush = Brushes.Blue
Select Case e.Index
[Code] .....
This works fine and dandy as long as I use 8 pt font, but when I change the font to 20 I get the following: How can I get the list box to display colored text in a large font?
View 5 Replies
Sep 5, 2009
Is it possible to create a kinda virtual storage in a vb application so that data created during run time are stored right in the applicaion instead of its environment?
View 11 Replies
Nov 1, 2011
What I am trying to do is to instantly apply a filter to a large list of data such that the list is updated almost immediately regardless of the number of items in the list. I have this working using a listview right now but it is far from instant, a list of 5000 items takes over a minute to get through. What I do currently is to maintain a cache of my data that my listview entries are based on. When the user selects a filter I parse this data one item at a time and determine if each item should still be displayed in the listview, if not I remove it. The complexity of determining whether or not a data entry meets the filter requirements is O(1), but just getting through each element in a loop takes significant time, and so does updating the list view graphically at the end of the process.
I have considered using a datagridview instead, using a database connection. I have never done this before and my main question here is whether this would allow me to do what I have described. With the database I could form an SQL query to return only the items that meet the new filter requirements... but would the data in the form update immediately, or would there still be significant delay?
View 3 Replies
Apr 25, 2011
I recently wrote a program that collects information from the network can displays it in a DGV for the user to see. I tested this on networks where I would end up with several thousand items brought back and all worked fine, very little memory increase and once the search had finished the memory usage went back to pretty much what it was before the search, so I assume I have no major memory leaks that I should be concerned about (I'm careful to always dispose of things and clear large variables where possible).
However, a new company has now started using my application and they have several hundred thousand items that my program will find. They reported that they leave the program running its search for a few hours and most of the time it crashes with an Out Of Memory exception. Now I did have my app do some caching of certain information to avoid querying the network more than was necessary so I thought well maybe this is what is causing it but I added an option to turn that off and they say it still happens. So the only thing I can see it being is simply the amount of data that the program is finding and having to store in memory.once my application has gathered information about the items it stores them in a List(Of MyItemClass) and then when the search is complete the items are added to the DGV. So I'm thinking maybe its just the size of this List(Of MyItemClass) that is simply getting too large. Bear in mind that each instance of MyItemClass in this List can have quite a lot of information in it as it has several properties that are List(Of String) that may contain a few thousand strings in some scenarios.How do you deal with such large amounts of data without running out of memory?I'm assuming the only option I have got is to 'page' some of the data to a temporary file on disk once I get over a certain number of items in the List(Of MyItemClass)?
View 2 Replies
Apr 19, 2010
I created a program that watches about 10 folders for different excel files. Using the filesystemwatcher with filters in place and correct error handling, it still misses some files once in a while (that's ok I guess).Anyways, I'm writing this because I added another form that has a filesystem watcher, when I tried to load the form I got a stack overflow error - an error that isn't debugged (a greenish line that you can only stop debugging).Am I going about this a wrong way? Is filesystemwatcher unreliable with large amounts of processing?
View 1 Replies
Oct 25, 2011
I am trying to get diffrent backround colors on the items added to the listbox (And no, i cant use ListView becouse it misses some important stuff..)
View 1 Replies
Nov 3, 2010
I am trying to get diffrent backround colors on the items added to the listbox (And no, i cant use ListView becouse it misses some important stuff..)I have found some code, but it only changes the text..
View 2 Replies
Jul 16, 2010
I have three text boxes for inputting amounts of money. One is for a total check amount, the other two are separate amounts that should add up to the total check amount. In each of the individual text boxes validating events, I have the following
Private Sub txtAmount1_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtAmount1.Validating
Try
[code].....
View 3 Replies
Jul 24, 2011
the project here is to take the three amounts from three text boxes entered by the user and return a string in a label telling the user if the triangle is either a right triangle, equilateral triangle, or neither after clicking a button. The code I have must use a new Class named Triangle. No matter what is entered in the text boxes, the label always returns "You created a right triangle!"
[Code]...
View 3 Replies
Jan 25, 2010
I don't know how to add colored text to a richtextbox.
To make already existing text colored, I have tried things like:
RichTextBox1.SelectionStart = RichTextBox1.Find("colored word")
RichTextBox1.SelectionColor = Color.Blue
RichTextBox1.SelectionLength = 0
..so it will change the color of the found word.
The problem is, when the "colored word" exists multiple times in the textbox, it will never change theirs color. It only searches for the first "colored word" and it wont affect the others.
It would be even better when someone knows how to directly add colored text instead of changing it when it's added.
View 10 Replies
Jan 24, 2012
I am trying to wrap my head around getting some blinking colored text and lasting for 3 seconds on the screen. I'm creating a game where you hit submit and if the answer is correct a label with popup and blink 3 different colors for about 3 seconds also a groupbox background color change. I have found many different ways on here how to do the blinking text. I just can't figure out how to do it for 3 seconds and then disappear. Here's a general idea of the code
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code].....
View 4 Replies
Jul 10, 2009
I have a richtextbox with some colored and formatted text
I'm using regex to put some html codes around the keywords so I can dump the output into a wiki i have
For example:
Code:
What I'm struggling with a little though is how to do the comments.
lets say I have:
CODE:
my regex does:
Code:
I can assume that if I see a -- then the rest of the line is green..
I have
Code:
which puts the font tag at the start, but dont know how to get the end of that line..
View 6 Replies
Jun 5, 2011
I've out an output rich text box called TbxOutput, and I have many different tbxoutput.appendtext("") methods in my program.I don't really know much about how to set rich text box colors, and what I specifically need is for a simple line of code that i can plug in before the tbxoutput.appendtext("" + vbnewline) methods to make that particular line output text of a different color.
For example, when my program normally outputs messages it does it in black, and i want it to remain that way by default. But when it outputs an error message, I want that particular message
View 2 Replies
May 19, 2010
So, I'm trying to make a RichTextBox which makes seperate words colored as you type them (like in Visual Studio itself ).The problem is, it's absolutely not working as I want and absolutely not the same as in Visual Studio.It's constantly running over the code each 500 milliseconds (by a timer), bugging the focus and selecting the words you want to be colored quickly.
Also, when you have something selected in the textbox,it constantly unselects when it runs over the code again (tried to fix that, but failed).So, can please someone improve this code (a lot, it's coded really bad ) so the user doesn't notice the words are getting colored?I put the words into an array with a different array containing the colors of the string array on the same index (Sorry for my "not so good" english.. But I'm sure you understand it ).
[Code]...
View 12 Replies
Apr 23, 2011
im trying to make colored text by the word, like <html> is blue <body> is red. But i have a problem, here is the video about that problem: [URL]
View 1 Replies
Jun 4, 2012
I am creating a VB application in Visual Studio 2010 that installs some SQL stored procedures. These stored procedures are encrypted otherwise I would just supply my clients with .sql files to create the stored procedures.
The install script that creates the stored procedure is 1500 lines in length and has been formatted in the way VS 2010 requires multi-line literals to be in:
"First Line" & _
"Second Line" & _
"etc..."
[Code]....
View 1 Replies
Apr 5, 2011
I'm working on a website that creates pdfs dynamically.I've been playing around with two different pdf controls- wpcubed and abcpdf, and was surprised to see that they both appear to render text differently.
wpCubed:
abcpdf:
They are both using arial 25pt bold, so I was expecting them to look identical. Can anyone explain why they don't. Here are the full files: wpCubed , abcpdf
View 1 Replies
Nov 4, 2011
I've got a timer which ticks every half a second. It calls a background process which renders text as icons and uses them for notification icons.
Public Shared DISCUS(9) As NotifyIcon
Private Sub BackgroundProcess2_DoWork() Handles BackgroundProcess2.DoWork
Try
For counter As Integer = 0 To My.Computer.FileSystem.Drives.Count - 1
Dim FontColor As Color
[Code] .....
Now for some reason, after a few minutes of the application being active, I get a JIT pop-up that doesn't render any text or buttons. Clicking on it causes the JIT debugger to crash, and I get the Windows "{App} has stopped responding." with error code CLR20R3. I'm not sure what this is all about, but I can provide any other details if needed. I've got everything nested in Try/Catch statements, all with code to write to a crash log but nothing gets written and I still get that error message.
View 1 Replies
Mar 18, 2011
I just learned some basics of multi threading in VB.net recently as I came across processing a large List of records and inserting them into SQL database one by one.
I have code look like this:
Private Sub btnLoadNow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadNow.Click
Dim autoLoad1 As New Thread(AddressOf AutoLoad)
autoLoad1.Start()
[CODE]...
Itemlists is a global lists i retrieved from database, everything looks fine to me but when i run this program, I found that the threads are inserting one records 9 times into the database(I have 9 threads in total), which makes me think that maybe i need to specifically assign 1/9 of a list to each thread? Is there another way to do it which doesn't require the splitting of the list, if not , how do i split it then assign?
View 1 Replies
Oct 6, 2010
I'm using some code to enable me to render rotated text with the TextRenderer.DrawText method. (By default, DrawText can only copy a straight forward x and y transform from a graphics object).
The code (C#) is from: connect.microsoft.com. See below for a VB conversion.The code takes a graphics object, creates a device context and copies the transform matrix from the graphics object. It works, but I'd like, also, to set the TextRenderingHint, so I tried:
<DllImport("gdiplus.dll", CharSet:=CharSet.Unicode, SetLastError:=True, ExactSpelling:=True)> _
Public Shared Function GdipSetTextRenderingHint(ByVal graphics As HandleRef, ByVal textRenderingHint As System.Drawing.Text.TextRenderingHint) As Integer End Function And then after the SetClip statement, I place: GdipSetTextRenderingHint(hDC, someHint) This gives me a memory access violation error, so I think I should be using something other than hDC as the argument.
I can get it to work by creating the device context from the original graphics object, and then creating another graphics object from the device context. I then set the hint on the new graphics object. This seems a bit convoluted so I was wondering if it was possible through interop.
[Code]...
View 1 Replies
Mar 6, 2009
I'd like to make a custom control that allows the end user to format the text, similar to an HTML or RichText control. The idea is that it will be static like a label, but allow end user to specify certain tags around words to make them bold, italic, underline, hyperlink, etc, either at design time or runtime. My question more specifically is how to best approach this. My intention is to use GDI+ methods, like DrawString, etc. But my concern is the inefficiency of having to parse the text each Paint cycle to determine which tags are present in order to use the correct font style, etc. I'm not really asking HOW to do this, but more of a hint on which architectural approach to take on this. Maybe there is already some examples of this out there?
View 2 Replies
Jul 10, 2010
I'm fairly new to VB.NET, and I'm working on a text editor with a tabbed interface. I deal with large text files. Should I have each tab / text document open up in a new thread or a process? I basically want the entire application to always run fast as the text editor is just one part of it. If I have several large text files open I don't want the rest of the application slowing down a bit.
View 2 Replies
Apr 22, 2010
I have ~ 1 page how to that is currently in a text file which I want to add to a richtext box.I am just wondering if there is some way I can just copy/paste it so it keeps its formatting etc.
View 1 Replies
Aug 20, 2009
How would i start to go about creating an instant messenger? I start with MDI Child Form. But how would i get the messages to be sent instantly?
View 1 Replies
Dec 25, 2010
How to exit from a multi-line text box without deleting the text inside when press enter
View 2 Replies