Wpf - UI Not Updating Fast?
May 13, 2011
Following is the code I used for reading the files and folders from a drive etc.
Public Class LoadingBox
Public counter As ULong
Public OpenRecords As New Dictionary(Of String, MainWindow.records)
[code].....
View 2 Replies
ADVERTISEMENT
Jan 16, 2010
I have this:
vb.net
Private Sub doWork_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles doWork.Tick
Me.doWork.Stop()
For outer As Integer = 0 To Me.queriedDGV.Rows.Count - 1
For inner As Integer = 0 To Me.hebdataDGV.Rows.Count - 1
Application.DoEvents()
[Code] .....
It works fine when I step through it with F8, but when running normally, I guess it's going so fast that I get an Index out of range when the outer For loop increments to the second iteration. I tried putting a timer in there to give it a chance to update the UI, but that didn't work. I also tried "Application.DoEvents" as a last resort, and that didn't work either.
View 4 Replies
Jan 25, 2012
I have a webpage with a form that is used to edit some object. This object contains a Collection of other objects defined like this: Public Overridable Property Employees As List(Of Employee)
On a form I can delete an employee, add a new one or modify existing one. When I click save new values are sent to the server. On a server I check if the user exists. If exists then I modify its values, if it does not exist then I add it. All employees that exist on the server and were not sent are marked as deleted (State changed to EntityState.Deleted). I try to use the following code (dbCollection = database entities, newCollection = collection sent from the form):
[Code]...
This code does not work, because changing to EntityState.Deleted removes the object from collection, and for each loop breaks, since the collection is modified...I know that I can overcome this problem by using a for loop or adding objects to delete to some other list first, but I hope maybe there is a pattern that would make my code nicer.
View 1 Replies
Feb 7, 2011
I've been developing a simple virus scanner and it works by reading the hex code of a file and comparing it to signatures from a database. Anyway, the only thing slowing it down is how it reads the hex. This is the hex reading part of my code so far:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadFile.Click
Dim ArrayHold() As Byte
Dim Index As Integer = 0
Dim Str As New StringBuilder
[code]....
View 1 Replies
May 17, 2010
What I need is to highlight multiple matches within some portion of text as the user types a search pattern. Right now I'm using a RichTextBox to highlight text. The highlighting takes place if a user changes the search pattern and naturally it happens with each key press. It works, but I'm experiencing a performance issues. If the text is large enough the highlighting takes too long (up to several seconds).
Facing that I tried to launch the highlighting procedure in a different thread aborting it and launching it again if the search pattern was changed during the highlighting but still I'm not satisfied with performance. Now I'm asking if there some other control I could use to speed up the process?
View 6 Replies
Aug 11, 2009
OK. I am making application for copying. Problem is that every time application wants to write it first tries to write via fast IO and get response that it isn't allowed and then it writes a file (i am assuming without fast i/o). I have no idea what fast i/o is (i know io is input output -> read write). So I can assume that it is handled by class that I am using to write. I am using System.IO.FileStream and its functions Read and Write. Is there any other class that I can use witch will allow Fast IO or disable trying it in first place (I would like the first solution)? Or should I do something else?
View 6 Replies
Mar 15, 2011
I need to transfer files from one server to multiple cients (using the internet) in the fastest possible way in .NET . What are the different types of transfer protocols which can be used in .NET or VB.NET so that the files are sent in a very short time ? I have tried using FTP, but that is slow because it requires authentication, handshaking etc. What i want to know is the options which we have in .NET for sending files in the fastest possible way between a server and multiple clients.
View 1 Replies
Aug 2, 2009
I have text file which contain the 15000000 Rows with the Comma delimiters..i want to import that file to SQL Table Through VB.net(2005) With 1000 Rows per seconds. Is that Possible through VB.net
View 2 Replies
Mar 5, 2010
In a scientific application I'm writing (vb.net) I use a huge collection of object stored in a tree structure. Every object exposes a LastAccessed property (datetime) that stores the last time the node was accessed by the algorithm.I need to find a fast way to find the N least accessed objects in the structure.I'm using an algorithm like this (pseudo-code)
dim Olist as new list (of myobject)
....
array.sort(Olist,address of compareByDataReverse)
for index=0 to N-1[code]....
I'm sure there is a better way to do that because the list is normally huge ( consisting of more than 10^6 objects).
View 3 Replies
Jul 27, 2009
I have a number of user controls (about 200 user controls) which I want to display on the screen (which the form will scroll).
What is the quickest way of running / opening the page?
would you add the user control on the page during design mode or do it during runtime?
It will also get settings from a XML file like names ect.
View 1 Replies
Jun 22, 2010
I m inserting 30 to 50 records .then set table as datasource to report.It takes 5 minutes.Plz anybody tell me how to do it fast.Then my pc is hangedI have also tried adding datarows into datatable instead of inserting records into access database and set datatable to report.but same time cosumed.
View 1 Replies
Nov 10, 2009
I need to implement a fast FIFO (First in First Out) buffer which has a fixed size (so data effectively falls out the end, much like a shift register) for a DSP (Digital Signal Procesing) Filter i have written. My question is there any faster way of doing the buffer other than as follows: _
'-- FIFO Buffer
Private Inputs As New List(Of Double)
For i As Integer = 0 To Data.Length - 1
[Code]....
View 1 Replies
Dec 12, 2011
I'm recreating an old 16 bit game. I'm creating the chat normally displayed at the bottom.Each sentence transitions in character-by-character.Every time a character is added, I wanted to have it make that little bleep noise. I've got a wav file that contains a short 'blip' that sounds just right, problem is, when I have it do the blip every time, it usually messes up.
View 1 Replies
Nov 4, 2010
I found the below sample to retrieve webpages. I need to request a lot of pages from the same website which requires authentication. Because there are a lot of pages to retieve I like to speed up the requests and like to avaoid to send the credentials and also the certificate. Is it somehow possible to stay connected?
[Code]...
View 1 Replies
Apr 12, 2012
I have written a logon script using Visual Basic Studio Express 10 and it simply installs printers and adds network shared drives. It does look at the users Active Directory group and add drives / printers. But on occasion it doesn't install the drives or printers.
I've placed a copy of the logon exe on the desktop and if the user finds they are missing drives etc they click on this and add them again. This has never failed so I'm curious as to why exactly the same exe would fail at logon? Is it something to do with speed of the computer or a time out somewhere? A frustrating problem!
View 4 Replies
Mar 28, 2012
I have an operation that will be performed MANY times and so I need it to be as fast as possible, thus I think keeping validations to a minimum is important here.I'm given an image, an offset and a size; and the idea is to take the color that appears the most within the area determined by the size and offset, so far I have this:
Private Shared Function someFunction(image As Bitmap, offset As Point, sampleSize As Size) As Color
Dim pixelsColors As New List(Of Color)
[code]....
View 1 Replies
Jan 13, 2011
I have a bundle of tiny pictureboxes on a form. The number is specified by the user, but it could be up to 100, or so. The user can select any set of these pictureboxes by a variety of means. I want to change the image to show the selection state of the pictureboxes, and I'm looking for the best way to do that. The pictureboxes each shows a bitmap. The brute force method would be to have a selected image and an unselected image and just swap them, but it seems like there ought to be a way to do something significant and reversible to the image, such as inverting the colors, that might be smaller that having a second copy of each image.
View 5 Replies
Mar 22, 2010
I need a method of quickly searching a large 2 dimensional array. I extract the array from Excel, so 1 dimension represents the rows and the second the columns. I wish to obtain a list of the rows where the columns match certain criteria. I need to know the row number (or index of the array).
For example, if I extract a range from excel. I may need to find all rows where column A ="dog" and column B = 7 and column J > "a". I only know which columns and which value to find at run time, so I can't hard code the column index. I could use a simple loop, but is this efficient ? I need to run it several thousand times, searching for different criteria each time.
[Code]...
View 1 Replies
Feb 5, 2009
I have a coma separated text file with loads of records. Usually when we read a text file we start from the first line and go towards the last. I know that there will be x comas per record.But I want to start reading from the last line and then towards the top. This enables me to stop before I reach the top (depending on the data).
What would be the fastest way to read a text file in VB.NET?. I am using VS2008. Basically I want to read from last line and go upwards and stop when I want. I may not need to read the entire file.
[Note: I want to store data in an array and not show it in some textbox]
View 9 Replies
Jun 19, 2011
How to create Key access for that fast array in VB.NET [code] waiting for any sample, this sample fastest for me work, but retrieve by key not only by number.
View 6 Replies
Jan 9, 2010
Private Sub DisplayTreeview()
Try
tv.Nodes.Clear()
Dim i, j As Integer, ds1 As DataSet
S = "select * from Product where PdtRoot=''"
[Code] .....
View 2 Replies
Feb 5, 2010
What is the fastest way to receive TCP (with 'read') and update a form with the data?
A background polling thread seems to messy.
But is there a TCP receive/read event that can be added to the form, so that the form can pick up the incoming data to display it?
View 2 Replies
Nov 6, 2011
How can I remove duplicate items in a list fast without sorting? [code]That's what I did. But it's too slow when there are many thousands of items.
View 1 Replies
Jul 3, 2008
I am looking for help on how to speed up VB.NET (or C#) screen refresh speed. Specifically I need to update many controls and then refresh them on the screen all at once.I am in charge of writing a .NET interface for an older legacy program. Because this needs to run on slow legacy machines I did a performance test and discovered the screen refresh speeds of VB6 is faster then .NET. In VB6 there is barely a flicker as controls change across the entire form all at once. In VB.NET you can see controls change moving across the form like a wave. I must be doing something wrong...
To do a head to head comparison I put together equivalent VB6 and VB.NET programs, each with a maximized form and 48 labels. Clicking on any label changes the background color of all the labels on the form. To really see the problem it is best to try the following code on a slower machine (1GHz etc.)
In VB6 create a project MyProject and add a form MyForm with the following properties
Caption = "Screen Refresh test VB6"
BackColor = Black
WindowState = Maximized
On that form add a label MyLabel with the following properties:
Index = 0
Caption = "Hello World"
BackColor = Cyan
In the form add the following code:
[Code]...
View 8 Replies
Jun 11, 2011
A short semi fast flood fill. I'm about to run it on 10+ million shapes. There always seem to be a few unique situations where something doesn't work.
Public Sub Fill(ByVal bmp As Bitmap, ByVal pos As Point, ByVal color As Color)
If bmp Is Nothing OrElse pos.X < 0 OrElse pos.Y < 0 OrElse pos.X >= bmp.Width OrElse pos.Y > bmp.Height Then Exit Sub
Dim bmd As BitmapData = bmp.LockBits(New Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadWrite, bmp.PixelFormat)
Dim stride As Integer = bmd.Stride
[code].....
View 2 Replies
Jun 27, 2009
Initial tests indicate that GDI+ (writing in VB.NET) is not fast enough for my purposes. My application needs to be able to draw tens of thousands of particles (coloured circles, very preferably anti-aliased) in a full screen resolution at 20+ frames per second.I'm hesitant to step away from GDI+ since I also require many of the other advanced drawing features (dash patterns, images, text, paths, fills) of GDI+.Looking for good advice about using OpenGL, DirectX or other platforms to speed up particle rendering from within VB.NET. My app is strictly 2D.
View 6 Replies
Jan 5, 2010
I formatted my datetimepicker like this "dd/MM/yyyy". I want to move curser once the user enter date then (without enter '/') go to month and then go to year.
View 5 Replies
Jun 26, 2009
Showing of my forms is somewhat slow, I am thinking of loading them when the app is started but I am worried it will take too much memory. What other means can I do to make the showing of the form faster?
View 8 Replies
May 5, 2010
In Netbeans you can have multiple projects open at once. You just click the side bar, click the project, and can jump between them. It's very convenient for when I want to look at some code I wrote on a previous project and apply it to my current one
View 3 Replies
Nov 23, 2010
At my company we build a lot of small, administrative type databases generally used by a dozen or less users. We have thus far done them entirely in Access. I've been doing VB forever and would like to write nicer, rich UI apps using a VB front-end to and Access database instead, as I find Access apps clumsy to use; VB apps look better and have more UI options.
I've started to play around with building Data Sources, Binding Sources, etc. and dropping them on forms, trying to create something useful with as little code as possible. I'm just wondering what folks generally think of using this approach. Remember this is for small, not complicated db apps with few users.
I know in the VB6 world bound controls took some heat for being not worth the effort it saved you.Also, is there a good book on the subject that concentrates on creating VB/Access apps with minimal code?
View 4 Replies