Progressbar With Long Function

Mar 10, 2009

I have a situation like this:[code]This function takes several minutes. I do not have access to any kind of loop counter because the function is a big loop, but I do not want it to be done in the click event, I want the click event to call the function, as it does here. Is there any way to report the progress in a progress bar on the form with the button that called this function?

View 2 Replies


ADVERTISEMENT

ProgressBar For Long Looping Operation?

May 13, 2012

i want to ask about progressbar i mke some looping, maybe long looping, can be 2000 record or maybe 20K record but i want the progressbar show the progress of that looping example = i have 20.000 record, when it loop on the 2.000 record, the progressbar automatically 10%, then if 2.200 then progressbar become 11%.. and the progressbar is dynamically changed within the record i have read some about BackGround worker, but i dont know the concept.so i count the record, and then set the maximum value for progressbar, and inside looping, i set the value 1 by 1 but, if i count it first, then it will 2 time loading and not as fast.

here is my simple code

Function nilaicari(ByVal sDir As String) As Integer
If (countfolder(sDir) = 0) Then
For Each d In Directory.GetFiles(sDir)
z += 1

[code].....

it work fine, but i think it not effective because it process 2 time how can i make it loop, and then immediately make the progress of the looping ?

View 6 Replies

How To Make A ProgressBar Will Be Long As Music File Length

Mar 11, 2012

[code]how to make a ProgressBar will be long as a music file length

View 1 Replies

Private Declare Function BlockInput Lib "user32" (ByVal FBlock As Long) As Long?

Dec 26, 2009

In Visual Studio 2008 I am using :Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long To stop input from occuring during a search-replace operation.

BlockInput(True) ' do not allow input during search and destroy
Dim cursorIcon As Cursor
cursorIcon = Cursor
Cursor.Current = Cursors.WaitCursor

Then setting it to false at the end of the operation. It did not work, so I thought maybe it was because I was calling it from a child window, so I created a function in the mainwindow, and ran it like this:

FrmMain.BlockFrmMainInput()With these functions is the Main window:

[Code]...

It did not solve the problem. I thought maybe it was because I was running under the debugger, so I tried compiling and running it debugger-free, but that did not do any better. I am still getting input when I double-click the mouse on either form.

View 2 Replies

Make A Progressbar That Follows The Copy Folder Function?

Nov 5, 2011

how to make a progressbar that follows the copy folder function in real time with a percentage too.

View 7 Replies

Sql - Function Takes Long Time For Execution?

Jun 13, 2012

Actually, I am trying to find out whether the partno is existing in the database table or not and it takes long time in count = checkCommand.ExecuteReader statement

Public Function CheckProductNo(ByVal Partno As String) As Boolean
Dim count As SqlDataReader
Dim valid As Boolean = False
Using connection As New SqlConnection

[code]....

View 4 Replies

ASP.NET (VB) Performing A Long Function Asynchronously Without Blocking The Page Thread?

Jan 15, 2012

I've been reading up on asynchronous function / web pages for ASP.NET 3.5 (we're not using v4 yet) but the ones I've seen all focus on performing a background task but then still coming back to finish up and send the response, after the task is complete.

What I want to do is simply kick off the background task (in this case a call to a web service) but then return a response to the browser immediately - ie. without waiting for the asynchronous task to complete. I don't even need to know if it succeeds or not.What is the best way to do that? I can't seem to find examples of kicking off what you might call an "orphan" background task in ASP.NET.

I thought of doing it via a javascript Ajax call on the page I show to the user, but the information passed to the web service is sensitive, so that's out of the question. But that kind of illustrates what I want to do.

[ed] Another idea: Is there an event in the ASP.NET model I can use which occurs after the response has been sent to the browser and the connection closed? ie. So more processing can occur without the user waiting for it?

View 2 Replies

E.HasMorePages - Written A Function That Will Plot Long Texts Onto Printer And Should Insert A New Page Everytime

Apr 30, 2011

I'm having issues with e.HasMorePages.. I've written a function that will plot long texts onto the printer and should insert a new page everytime yPos > PrintHeight

e.g.

Module Scope var i is the count

PrintPage
if i<=10

[CODE]...

I can certainly add pages from the printpage, but my function will plot characters individually onto the printer and will increase ypos at the end of the printers width.

View 10 Replies

VS 2008 Way Of Coding In Stead Of Writting Long Long Paragraphs

Sep 18, 2011

Is there a easer way of coding in stead of wrighting long long paragraphs like this in one line [code]All of this is on one line and i got lots of info to put down.."The game will begin on your 16th birthday with your mother waking you up. Today you are to go to the castle for the first time. Leave your bed and open your dresser for a Strength Seed. "

View 2 Replies

VS 2008 - Using Function In Order To Get Item Code From Database Long.Parse(myReader(0)).ToString("2200000000000")

Oct 26, 2009

I would like to ask some questions related some functions i want to make in my program:

1. I am using this function in order to get a the item code from the database Long.Parse(myReader(0)).ToString("2200000000000") the result i get is: 2200000059091. The form that i want the resultset is
22 (fix value) + item code (6 characters right justified) + 00000 (fix value) 2205909100000 how should i change my code to obtain this result?

2. The programs every time it runs creates a text file which i also attached it plu1.txt, when i try to open it with notepad i see all the lines justified, on the other hand when i open the text file with Wordpad or ConTEXT the lines are not fixed, others are longer others are shorter? What should i change in my code in order to have every line fixed lenght... The code i am using is the following

Dim myReader As SqlDataReader = myCMD.ExecuteReader()

Dim fNextResult As Boolean = True

Using myWriter As IO.StreamWriter = New IO.StreamWriter("c:everest

[CODE]...

3. third and last question is that my program every time it ends show up a pop up menu which says "Text is created." Instead of this i would like to create a file lets say log.txt and every time the program runs, it will overwrite on the log.txt file a line like this: system date + Text is created + with X lines (where X are the lines of the text plu1.txt) ex. 26-10-2009 14:56 Text file created with 15 lines

View 4 Replies

Make The Progressbar Look Like The Progressbar In Xp When Use Win7?

Dec 21, 2009

in vb 2008 or higher :how do i make the progressbar look like the progressbar in xp when i use win7?

View 3 Replies

How To Pass A Function To A Function Is Functors/function Objects Avaiable In VB2010

Oct 12, 2011

I want to make an numerical integration method with takes in an analytic function and integrate it over a specific interval. For the numerical integration procedure I want to use some procedures in nr.com. The problem is that these are programmed in C++ and they uses functors to pass a function to the integration method. How can I do this in VB 2010?

I want to initialize the function (i.e. set a=1,b=0 for function y(x)=a*x+b) and then pass the function to the integration method. Then when the integration method call the function it only calls the function with one parameter (i.e. x since a,b is already set)

What is the best way to do this in VB2010?I want to make a general integration method where I can pass any single valued function and integration limits.

I have just started using VB, and from what I have found so far it seems like the tools you have is

- to us a delegate for the function
- to use a lambda expression for the function
- send a pointer/adressOf
- to create a function class/structure and submit this to the function

As for now I am most inclined to create a function-class. But I am not really sure how.F.ex. I make different classes for each "uniqe function" I want to integrate, but how can I pass them to the integration function when I need to specify the argument type in the integration-function-call?This seems like a basic problem which applies to many Math operations, so I think it would be very useful to clarify this.

View 2 Replies

Function Syntax - Call A Function With 2 Arguments When The Function Is Only Defined For One

Apr 1, 2010

I'm trying to undersatnd the syntax of calling a funciton and it seem confusing when I'm using a web service in ASP.net. Maybe this question should be in an ASP forum, but it is a VB question. This simple web service allows you to type in your name and it response with an alert box with you name.

My question is, How can you call a function with 2 arguments when the function is only defined for one. I understand that the second argument is actually a method that handling the respons, but how can you interchange function arguments for methods and how do you know that there are methods for

Here's my call:

<script type="text/javascript">

function HelloWorld()
{

var yourName = $get('txtYourName').value;

[CODE]...

View 7 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

% Of RGB In A Progressbar?

Dec 12, 2009

I'm making an application with a custom progress bar (picture box) using the formula

pbxProgress.Width = (intValue / intMax) * pbxBar.Width

where pbxBar.Width is the maximum length.Along with that, I'm using another formula to change the RGB color of pbxProgress while it increases. I'm using:

pbxProgress.BackColor = Color.FromArgb(0, 0, (intColor / 255) * 650)

I came to that last number; 650, by guessing and checking. If I use that number, the RGB increases perfectly with the value of the progress bar so that it ends up being at 255 when the bar is completely full. The only trouble is, I'm not sure how I got that number, and I would like to make a more general formula for future use.

View 3 Replies

How To Add ProgressBar

Dec 30, 2011

This is a code to send Email by Vb.net when I excute the code , it will take a period to send email nad then show me msgbox("successful") I want to add in this period a ProgressBar befor msgbox

[Code]....

View 4 Replies

Progressbar Value In .net?

Jul 4, 2010

i have designed a web browser.except for the progress bar it is working fine.this is my code:

Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged
ProgressBar1.Maximum = e.MaximumProgress
ProgressBar1.Value = e.CurrentProgress
End Sub

the error reported is progressbar1.value should be between max and min e.currentprogress = -1 is not possible

View 1 Replies

.NET Progressbar Not Updating?

Apr 19, 2011

I am using a progressbar control in a splash screen.

In my code I am updating the progress bar value with each step -

In Form_Load of the main (hidden) form:

frmProg.UpdateProgress(10, "Checking Connection String")
CheckConnectionString()
frmProg.UpdateProgress(20, "Checking Crystal Reports OCX Files")
CheckOCXVersions()

[Code]....

Is there some event I can use to find out when the progress bar has finished redrawing?

View 4 Replies

Getting ProgressBar To Work?

May 20, 2009

I'm attempting to use a ProgressBar to show while I'm loading a database. The table I'm loading isn't exceptionally large (about 7900 records), but my program nevertheless takes 39 seconds to load it! I think this is a little too long for a wait cursor, but I'm having problems figuring out how to use the ProgressBar properly.

I would show you what I've got in the way of code, but I trashed it (accidentally) and would like to start over the right way. Please just point me to some tutorials that make sense (if possible) or any code snippets, etc.P.S. I'm loading the database from a button_click event on my main form, which (eventually) raises my 2nd form which has the database displayed in a datagridview control.

View 1 Replies

How To Display Name On Progressbar

Jun 7, 2011

In my vb.net winform application, writing a file from one directory to another. I have the progressbar1 to show the status of copy. Now I want to display the current filename that is copying on progressbar1.e?

ConfigWindow.FileProgressBar.Visible = True
Dim fileLines() As String = System.IO.File.ReadAllLines("C:DesktopDemo.csv")
ConfigWindow.FileProgressBar.Maximum = fileLines.Count + 1

[code].....

View 3 Replies

How To Use Progressbar In This Codes

May 15, 2012

I have use this codes in my project

For Each dr As DataRow In DsReports.DataTable
Dim Cmd As New SqlClient.SqlCommand("INSERT INTO Temp " & _
"VALUES (@ID, @AccountDeatil,@Debit,@Credit)", Cn)

[code].....

Now How to use ProgressBar1 into Code?

View 3 Replies

Make My Progressbar 100%?

Jan 12, 2010

Is there a code to make my progressbar 100%? So when my other progress is done the bar will fill up to 100%?

View 4 Replies

Progressbar Does Not Run During Operation

Oct 14, 2010

I have a form called frmReport and on this form a user makes selections and clicks the "btnBuild" button which in turn creates a crystal report and displays it. However sometimes this process can take some time to build the report. So I placed a panel control along with a progress bar to let the user know that the system is working. However when the form runs the progressbar does not run until the last few seconds before the report is displayed. how to get the progressbar to "run" while the report is building ? (The progress bar is set to marquee.)

Private Sub btnBuild_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBuild.Click
' Display panel control with progress bar

[Code]....

View 2 Replies

Progressbar Not Visible?

May 6, 2011

I have a tab control and when I click on a tab button I show a user control in the panel associated to the tabcode works like data access , bind data to controls and hide or show , resize controls

now in tab click
pbar.visible = true
my code for binding

[code].....

View 2 Replies

ProgressBar.Value Does Not Update

Jan 25, 2012

vb
Public Class ProgressBar
Private Sub Press_Click(sender As System.Object, e As System.EventArgs) Handles Press.Click
Count()
End Sub

[code]....

I want LABEL ProgressNum to show the updated ProgressBar.Value but it just stays at 100 forever. Why?

View 8 Replies

Use Progressbar In .NET With Net.Mail?

Apr 20, 2010

i created an application of mail client , i can send mail via SMTP there isnt any problem while sending, but i want to show sending progress value while sending mail, how can i do that ? for example while send an email via Outlook or Thunderbird you can use the progessbar in statusbar i want to make same tool.

View 5 Replies

Use Thread For Progressbar

Aug 28, 2010

I have a process (adapter.fill) it takes much time to execute. I want to use thread for progress bar to move. I use code like below [Code] showform is a form that contains progress bar and in its form load progress bar is move but it has a error and it doesn't work correctly. is there another way to use progress bar with thread?

View 14 Replies

Value Of 1 Is Not Valid For Value - Progressbar?

May 18, 2010

Im making a simple mp3 player and i have a timer to display the current position of the song in this format : seconds,miliseconds And i want it to show the current position in a progressbar

This is the code i have inside the timer:

[Code]...

View 1 Replies

Way To Create A Progressbar

Mar 6, 2012

I want to create a progressbar in a winform. My winform contains few btns..process,export are two main btns. When i click process its taking tym to load the page, i want to show that in a progressbar![code]...

View 1 Replies

How Long Can A Stopwatch Run

Jul 27, 2011

I have a VB.NET app in which I'd like to use the Stopwatch class. The stopwatch will get reset every time it enters a particular method, which may be in less than a second, or not for hours. Is there a limit to how long you can let a stopwatch run before something bad happens? i.e. an error, or performance degradation?

View 2 Replies







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