VS 2010 Looping And Freezing - Add All The Users To A Threadpool To Do A Certain Function?

Jan 16, 2012

I have a code which adds each line of a textfile to a List(Of String).I have around 1.5 million entries in the textfile. It adds it to the list in like 1 second. However, I'm trying to add all the users to a threadpool to do a certain function. So I try:

For i as integer = 0 to list.count - 1

The list has like 1.5 million entries so the GUI freezes untill it all finishes in like 5 minutes. How can I make it go faster and not freeze the GUI?

View 6 Replies


ADVERTISEMENT

VS 2008 2 Threadpool - One Threadpool For Scanning Files And Second Threadpool For Moving File's Into Drive's

Jun 4, 2011

I m trying to move all my drive's files into h drive firstly i have added all drives in threadpool for scanning and when scanning of any drive finish (Without waiting for other drive's complete ) it will move file's to h drive but it is not working as i wanted that's why i need two threadpool - one threadpool for scanning files and second threadpool for moving file's into drive's

View 11 Replies

"Looping" A Threadpool For Loop?

Dec 3, 2010

So I'm running a For loop that creates a ThreadPool thread and executes a task. Once the For loop finishes, I'd like it to "start over" and do the same thing. Now this obviously causes an infinite loop if I don't do it right.

what I'm kind of wondering is; is there a way to "keep" those threadpool threads active and constantly performing a task? it seems like they get disposed of once their "task" is complete.

Right now, the thread connects to a webservice, captures some data, stores it in a List(of String). This ultimately builds a ListView with the data. One of the columns is a "count" and i'd like to keep updating that count continually.

View 4 Replies

VS 2008 : Delay Function Without Freezing Up The Program?

Aug 16, 2009

im looking for a way to have my program wait a certain amount of seconds before it goes on to the next command, ive tried the sleep command but that freezes up my program and i cannot let that happen, ive heard of using timers as a delay but i don't really know how to do that.

View 4 Replies

VS 2010 - System.Net Freezing GUI

Dec 10, 2010

I wrote a program that visits each link in a listbox and then parses some data from the HTML. [Code] It works fine for 100 or so items, but when I load a big list (2000 items), the GUI seems to freeze. How should I fix this?

View 3 Replies

VS 2010 - ThreadPool And SqlConnection Pooling - Error: Timeout Expired

Jul 21, 2010

I am working on uses the ThreadPool class and specifically the QueueUserWorkItem method to launch its background tasks. I am however having an issue related to SqlConnection timeouts. My error is this: "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached."

This code is using all available ThreadPool threads because it is processing nearly 100,000 items, each on a threadpool thread, and updating an SQL database. So my question is this? Has anyone ran into a similar problem or could shed some light on a resolution to this issue? In testing, if I use the threadpool. setmaxthreads function and give it a value of 100 (to match the default Sql connection pooling count) then all runs just fine, but much to slow to process this much data.
[Code]

View 5 Replies

VS 2010 Why Is Visual Studio Suddenly Freezing

Apr 22, 2012

I tried opening the solution and Visual Studio immediately stopped responding. The hourglass cursor would show, then it would resume to the normal cursor for a few seconds, then go back to the hour glass. Whenever I clicked anything the program claimed it had stopped responding and asked me if I wanted to close it. I have no idea what caused this. One thing possibly, is that when I started my computer today, it said several updates had been installed. Like 6 of these were for Visual Studio. Could that have caused it to freeze?

View 5 Replies

Create 2 Users And They Have Different Function?

Mar 15, 2012

Can I create 2 users and they have different function??Database base using is MS Access.For example I have "staff" and "admin".Staff can insert,edit and delete data only.Admin can check the total sales of the day.Can I do that in VB.Net and can somebody give me some idea or example??

View 3 Replies

Creating A Function To Enable / Disable Bttns Based On Users

Mar 8, 2012

What i am trying to is create a function were by a user when he logs in, based on the rights given to them they can either use certain buttons . I no i have to use the enable and disable function.[code]if username is true and user_name is Sales then enable x y z buttons. i been trying looking around and reading and found the following which i cannot get to work with my system but they follow a similiar patten to what i want to achieve.[code]

View 1 Replies

VS 2010 Bar Chart With Looping?

Mar 2, 2011

Basically, the user will input a "product" into a textbox and upon a button click, will be transferred to a listbox. The problem that I have is that I need to also collect a precentage for each product, and using that percentage, create a type of bar chart with "x"s based on the percentage. The final outcome of the application should look something like this-
[Code]....

View 14 Replies

VS 2010 Looping Through SubFolders?

Sep 21, 2010

What I have to do is to search the whole system for any Mp3 files.My Problem is to loop through all the subfolders.What I managed to do:

Imports System.IO
Imports System.Runtime.InteropServices
Public Class Form1

[code]....

View 9 Replies

VS 2010 Looping Through Form Controls?

Feb 7, 2010

I did a quick net search and found this which works great for looping through all the buttons to disable them. These buttons are located right on the form.

For Each ctlControl In Form_BLAH.Controls
Select Case TypeName(ctlControl)
Case "Button"
ctlControl.Enabled = False
End Select
Next ctlControl

However...when I tried it on a form where the buttons are contained within a Table Layout Panel it does not work.

View 2 Replies

VS 2010 Looping Code X Number Of Times?

Apr 3, 2011

Okay, so basically I'm trying to have my application randomly select items from a (multiselect) listbox. I want the user to enter the amount of items they would like randomly selected and it should all happen at the same time. I have the random shuffle down but it only selects one song each time you click the button. How can I loop this code as many times as the user specifies in the textbox?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
Dim shuffle As New Random
Main.songlist.SelectedIndex = shuffle.Next(0, Main.songlist.Items.Count - 1)

[code].....

View 1 Replies

VS 2010 Looping Music - Way For The Song To Be Looped?

Dec 9, 2011

I started a thread about playing music. It works perfectly, but I wanted to know if there is a way for the song to be looped. I'm making an alarm clock, and if the user chose a short song, it plays once and then stops. I just wanted to know if there was a way to loop using the mciSendString.

View 9 Replies

VS 2010 WebBrowser Looping - Login To Mobile Page

Jun 13, 2011

I'm trying to login to the mobile login page for hotmail.com. I want to login to each account, I have them in a multi-line textbox1 in username : password format (no-spaces) on new lines. It loops through all the accounts before the page is even loaded. and when the page has loaded, it logs into the hotmail login from the last login details at the end of the textbox, instead of going from first to last. It's not clicking submit button either, its just showing the username and password looping in the inputs. Not submitting at all. The submit button code is right. I know it works. So thats not the problem.
Here is my [URL]

View 8 Replies

VS 2010 : Convert A DLL Function Call Which Has The Callback Function Routine Called Within The DLL Function Call?

May 25, 2012

I am trying to convert a DLL function call which has the Callback function routine called within the DLL function call.The DLL function call signature is like this:

typedef void *HANDLE;
typedef HANDLE HACQDESC;
DECLARE_HANDLE (HWND);

[code]....

how to convert this DLL call to VB.NET and also how to create the callback function and send it as parameter to this function
call.

View 15 Replies

VS 2010 Looping And Input - Lets The User Select A Folder

Sep 23, 2010

I have a little situation and i am not sure of the best way to do it.

- My program lets the user select a folder

- From that folder i need to select all .png files

- One by one i need to load them into a picture box, await a button press and then go to the next image.

The above that i have typed in red is where im not sure what to do. The other steps i can do.

View 7 Replies

VS 2010 : Check If Its The Users First Run Of App?

Jul 5, 2010

how can i tell if its the users first run of the application on there machine?

View 6 Replies

Administer Website (create New Users, Assign Users To Roles) From A Windows App?

Feb 9, 2010

I have an asp.net web app that uses forms-based authentication, a SqlMembershipProvider (using an encrypted password format), and a SqlRoleProvider. I need to know if it's possible to administer the users (create new users, assign them to roles, etc.) from a windows application - the powers that be don't want any administrative functionality in the web app itself.Here is the membership provider definition from web.config:

<membership defaultProvider="MyProvider">
<providers>
<add name="MyProvider"

[code].....

View 3 Replies

VS 2008 Database Search - Using SQLClient That Loops Though All Users In A Users Table

Dec 29, 2010

I've got a code using SQLClient that loops though all users in a Users table inside each loop i want to preform another search in the UserOrders table, thus doing a count of all orders.

I get this error

HTML

There is already an open DataReader associated with this Command which must be closed first.

Here is my code

vb.net UserLists.Items.Clear()
Dim connection As New SqlClient.SqlConnection(My.Settings.ConnectString)
Dim command As New SqlClient.SqlCommand("SELECT * FROM Users ORDER BY PersonName",

[CODE]...

View 3 Replies

.net Desktop App : Log Users Application's Usage By Users After Remote Deployment?

Apr 3, 2012

1.I�d like to publish a free vb.net desktop application for the users to download and use meanwhile I�d like to collect usage information ex: user ip address, user�s registration information, used features, time spent� if the user allows the report to be sent back.

2.Also , in order for the user to be able to use the application, he�ll have to register it then, everytime, before the application loads, it gets verified online that it was registered, maybe validate the registration information or a valid user name and password, no critical personal information. The target of this step is for the application to be used exclusively by the registered user and maybe on his computer only.

View 2 Replies

Vb.net Desktop App : Log Users Application's Usage By Users After Remote Deployment

Apr 4, 2012

1. I�d like to publish a free vb.net desktop application for the users to download and use meanwhile I�d like to collect usage information ex: user ip address, user�s registration information, used features, time spent� if the user allows the report to be sent back. 2. Also , in order for the user to be able to use the application, he�ll have to register it then, everytime, before the application loads, it gets verified online that it was registered, maybe validate the registration information or a valid user name and password, no critical personal information. The target of this step is for the application to be used exclusively by the registered user and maybe on his computer only. Any alternative way to achive the target is just fine.

View 1 Replies

VS 2010 LDAP - Get All The Users Under A Tree From AD?

Mar 18, 2011

i am trying to get all the users under a tree from AD with the following

[code]...

I keep getting this error:Quote: There is no such object on the server. on the line: For Each account As SearchResult In AccountSearcher.FindAll However, if i modify the DirectoryEntry to this: Dim RootEntry As New DirectoryEntry("LDAP://OU=Mayor,DC=c*******gatn,dc=gov", "myusername", "mypassword") It works but with the wrong returned user data....

View 1 Replies

ThreadPool And Delegate In C# To .NET?

Jan 1, 2010

how this is written in VB.NET? This was an example I found on [URL]

ThreadPool.QueueUserWorkItem(delegate
{
var channelFactory = new ChannelFactory<ISimpleService>("*");
var simpleService = channelFactory.CreateChannel();
var asyncResult = simpleService.BeginGetGreeting("Daniel", null, null);

[code]....

View 3 Replies

VS 2010 - Calling A Function - BackOrdered Function Of Program

Mar 30, 2012

I am having a problem with the BackOrdered Function of my program. I can`t get it to say anything but 0 when I run the program. Another problem I am having is the input box pops up like 6 times and it`s only suppose to once. [Code]

View 9 Replies

Get Path Of 'All Users' Desktop And 'All Users' Start Menu

Jun 10, 2008

I cannot figure out how to get this call to work.I have searched EVERYWHERE.MSDN is no help at all and the only thing I can find is this vb6 code that doesn't work in .net.I tried to convert it over but I've had no luck.Specifically I'm trying to get the path of the "All Users" Desktop and the "All Users" Start Menu.It would rock if anyone could help me out with this one.

View 5 Replies

VS 2010 Creating Settings For Multiple Users?

Jun 28, 2011

I have a form which has a textbox named "textbox1", and a button named "Button 1". Button 1 is meant to be a submission for textbox1 (i.e. when button1 is pressed, the value of textbox1 is saved and remembered). I want the value of textbox1 to be remembered on any computer, but I need it to be update-able too.I tried using settings to do this like so:

Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TextBox1.Text = My.Settings.TextBox1
End Sub

[code]....

but the problem in doing this is it only works for the current user. When the application is then put on another computer the value is blank.

View 1 Replies

VS 2010 How To Notfiy Users When Program Has A New Update

May 28, 2011

I have a program which I am going to hopefully updating a lot in the future. Is there a way to automatically tell the users that there is a new update and then link them to the download page?

View 2 Replies

VS 2010 List Active Users Of Database?

Jun 21, 2011

I'd like for my application to have a listbox displaying all users currently connected to my access database stored on a server. Also, it would be nice at startup for a message box to pop up saying something like "Other employees are currently using this application. To view active users go to..."

View 3 Replies

VS 2010 Working With Files Already Open By Another Users?

Sep 29, 2011

I created a program that processes files on a nightly bases for the company I work for. These files are used on a daily basis and very often a file is left open by a user and it causes my program to error out and not finish running. My program needs delete access to these files.

I need 1 of 2 solutions.

1. I need somehow add a check to see if a file is in use and if it is just skip it.

2. I need to make my program automatically force close the files on the users. (note that these are shared by one computer, I can put the program on the computer that the files reside so that it has access to close them out.)

how to add a check for if a file is in use or not?

View 1 Replies







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