Loop Through The Applications That Run At A Time?

May 28, 2009

Is there any way to loop through the applications that run at a time (the application list from task manager) and get the application's caption?

At a moment I have two instances of "acad.exe" but they will have different application name and I have to choose one of them, but I don't want to close the other one.

If I use the process list I get only the "acad.exe" name and I cannot differentiate between them.

View 2 Replies


ADVERTISEMENT

Make Loop In Program And Calculate Time Taken To Complete Loop?

Nov 23, 2011

I am constructing a program, i am new to Visual Basic, but i have past programming experience. I was wondering if anyone knew how to form a loop that could...lets say calculate the answer when two numbers are added together,and it would repeat this thousands of times, etc. And if there is a way, would it be possible to calculate the time taken to complete this loop.

View 5 Replies

C# :: Long Time Running Applications?

Jul 5, 2010

I'm going to design an Application (C# or VB.NET) which use .NET Framework to run for very long time. It may be restarted every year or even more...Is there anything (using special design patterns or so) which I must care about in designing "Long time running applications in .NET"?

View 3 Replies

VS2010 Running 2-3 Applications At The Same Time?

Mar 21, 2012

I have created a main application form that has buttons that start up various other applications.

Following advice on here from a previous post, I have imported all the files of each separate application into the main application.

There will be times when the user wants to run more than one of these applications at the same time. I know you can just import the '.EXE' file of each app, and you can then run several at a time. But because I have all the files without the .EXE, you can only run one at a time, you have to close one app to start another.

My question is simply; Do I have to import the .EXE file of each app, or is there some code I could put in my main form that will allow me to run more than one app at a time? (the reason for having all the files of each app is so you can make any alterations without having to open each app separately).

The code below is a typical code for one of the applications start buttons, all the buttons codes are the same, apart from the app name, the buttons are imported, so not standard buttons.

Private Sub btnCoordsCalc_ClickButtonArea(ByVal Sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles btnCoordsCalc.ClickButtonArea
Dim frm As New frmHoleCoordinateCalculator

[Code]......

View 2 Replies

Controlling Time With A For..next Loop?

Mar 20, 2009

[code]...

View 12 Replies

VS 2008 Loop Through A Second Time?

Sep 2, 2009

The code below finds a string from a text file and, if the correct month, - Monthcheck1, adds it as an item to an unsorted ListBox. I want to run through the text file again to find data for the next month. If I repeat this code for MonthCheck2, nothing is added. My question is: What is the convention for looping through the same file a second or third time?

[Code]...

View 5 Replies

VS 2010 - Applications Made Using VB 2010 Express Expire After Some Time?

Nov 3, 2011

Here are my questions concerning VB 2010 Express:

1. I've registered my VB 2010 Express, will it still expire?

2. Will the applications I made using VB 2010 Express expire after some time?

3. Is it OK to write my code in the designer.vb file? I don't know why, but when I started writing my application it took me to the designer.vb instead of form1.vb code.

4. I've been working on an application for a week now, but suddenly I can no longer access my Design View(Shift-F7). All my codes are written on the [form name].Designer.vb. I can still view my codes but I cant access my form layout. On the solution explorer, my forms no longer have the 'form icon'. When i press Shift-F7 nothing happens. Right-clicking the form on the solution explorer doesn't show 'View Designer' option. How can I fix this?

View 5 Replies

Controlling Outside Applications - Resize Multiple Applications And Send Keystrokes To Each One

Sep 12, 2011

I am working on a project that is used for key broadcasting. Don't worry nothing illegal, I'm making a multibox application for world of warcraft. However I am having trouble when it comes to launching and manipulating other applications from another.

[Code]...

View 2 Replies

.net - Loop Overwriting The Array Each Time

Jan 24, 2012

[code]...

I checked the contents of the array at the end and it only held the last records within the text file, which suggest that it is overwriting the array, how can i prevent this?

View 3 Replies

Datetime - Loop To Check Time?

Nov 3, 2009

So I'm kind of new to VB and am just playing around with a little project, I currently need a loop that is constantly checking the systems clock to see if it's equal to a certain time.

While Not myTime.Hour = 24
If TimeOfDay = newTime Then
nfi.ShowBalloonTip(15)

[code].....

View 4 Replies

Get Rid Of The Missing Ingredient When It Loop The Second Time?

May 9, 2009

how to get rid of the missing ingredient when it loop the second time?

[Code]...

View 10 Replies

Loop For A Specific Period Of Time?

Mar 25, 2009

I have been trying to find out of the last hour how to do something proberbly very simple ?

I have a button, when I click on it, I want to loop the code inside this button for 60 seconds.

View 5 Replies

Loop Through Each Date In A Given Time Period?

Sep 2, 2010

How can I loop through each date in a given time period so that I can add those dates as a column name in a table. I want to create datatable with the person's name and hours he worked in a given time period. The user will select the dates and I want to show each day/date in that table as a column name.

View 1 Replies

Read Hex At The Same Time Loop The Function?

Oct 29, 2011

I'm a newbie in VB.. I'm editing a file that sets the click-able area of a button in a game.

[Code]....

View 6 Replies

Run Time Error During Long Loop?

Dec 7, 2011

I wrote a program which loops through a very long CSV file (50 meg) and parses the data as it goes.Sometimes, the program aborts and I get the following message:The CLR has been unable to transition from COM context 0x37a090 to COM context 0x37a200 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

I know its going to take a while. There are several hundred thousand lines of text in the file that this program is reading. I am not sure exacly waht the message means, but my program seems to work fine other than the message. odd thing is sometimes the message doesnt always pop up..

View 1 Replies

VB Loop And Display One Line At A Time?

Jan 20, 2010

I'm using visual studios 2008, VB9 and I am trying to write an app that basically performs calculations on a set of data input by a user. During the calculations, I want to display the data at each step, and have it retained in the display area on the GUI (not overwritten by the next data being displayed).

For example:

UserInput = 1
Do
UserInput += 1

[Code]....

I tried this, and other loop structures and can't seem to get things right. The actual app is a bit more sophisticated, but the example serves well for logical purposes.

View 6 Replies

Get An In A Loop To Accept A Value And Add It To A List Each-time Okay Is Pressed?

Dec 9, 2011

I'm trying to get an in a loop to accept a value and add it to a list each time okay is pressed. For some reason, I have to add a value twice for the input to be added to the list. For example, if i enter the string "hello" in the inputbox and click okay, it doesn't add to the list, but if i do it a second time, it goes in.

Here is the code for it

Do Until lstCourse.Items.Count = CDbl(txtClasses.Text)
InputBox("Enter Course Number", "Course Number")
strCourse = InputBox("Enter Course Number", "Course Number")
lstCourse.Items.Add(strCourse)
Loop

View 1 Replies

How To Pause A Loop For A Certain Amount Of Time And Then Continue

Feb 4, 2012

Dim d As Integer
For d = 0 To TextBox2.Text
WebBrowser1.Navigate(TextBox1.Text)

//a code that pauses the loop but does not stop the browser thread

View 1 Replies

Loop N Numbers Of Record At A Time In A Dataset?

Oct 19, 2011

I am trying to loop through a dataset and process n numbers of records at a time.For example lets say I have around 240 records in my dataset. I need to loop through the dataset and then create a new batch of 50 records. so for the dataset which has 240 records I want to create 6 batches. Out of these 6 batches, 5 would have 50 records and and last batch would have 40 records.

View 1 Replies

Multiple Referers One At A Time Loop Error ?

Jan 21, 2012

Here is the code:

CODE:

What I want to do is I want to post to different referers one at a time and of course the links will be provided by a richtextbox(i.e. richtextbox1.lines(i) ). I will use only password(which will be chosen by the user from a combobox(combobox1.text)) because the username is harcoded. This is what so far ive come up with but it always gives me the result of the first line(or referer) from richtextbox1. I think there might be a problem with my "FOR" code.

CODE:

View 3 Replies

Print Loop Result Real Time?

May 12, 2012

I want to ask about looping

if i have big looping, and i want to print it result real time, how can i do it?(it look like when we scanning with antivirus, then the label that contain location that scanning change real time)[code]...

View 4 Replies

Loop - Sub - Wrote Only To Temporarily Fill The Database In During Run Time

May 1, 2009

I have a sub that i wrote only to temporarily fill the database in during run time to be able to test a few other functions that i wrote as well ... weird thing is by the way i wrote it it should only look 100 times... but by the unique ID in the database and the information it pulls back into my list box it loops 700 times before actually stopping the loop ...

Public Sub Fill_LeftOvers()
Dim x As Integer = 0
conn.Open()

[CODE]...

Now i used step debugging and sure enough it only loops 100 times during stepping but in the database it looped like crazy ... i have also tried while x < 100 instead of the do loop but it did the same thing ... i know this may be considered a double post i mistakenly posted originally in the PHP forums earlier today ...

View 2 Replies

Using For Loop Counter In VB To Change Variables Being Referenced Each Time

Jan 11, 2010

We have a project that needs to gather survey data. On one particular page of the website, there are 21 questions each with a scale of 1-5 where the user selects one radio button for each question in the table. The survey is being coded in VB.NET. The data submits to an SQL database. All the radio buttons are similarly named, so only the number changes for the question [Code]

View 2 Replies

VS 2008 For Loop - Changing Panel Number Each Time?

Dec 22, 2009

For Each Ctrl As Control In Panel20.Controls
If TypeOf Ctrl Is CheckBox Then
CType(Ctrl, CheckBox).Checked = False
ElseIf Ctrl.HasChildren = True Then
Uncheckboxes(Ctrl)
End If
Next
I have a few panels that contain the controls, how can I check them all at once rather than use that code above and just change the panel number each time? It'll get pretty messy if I have to keep pasting all that code and just changing one number.

View 6 Replies

Loop Computation Time Increases Dramatically With Small Change

Apr 3, 2012

I recently made a change to the code within a loop in my code, and now when I run the code through Visual Studio 2010 Express, the loop runs about 10x slower than the previous loop.I did not make any significant changes (to my knowledge) to the code within the loop.I made the change so that the loop could handle various conditions I imposed in another section of the code.I know that it is this loop that is slowing everything down because I report the loop progress on my form.[code]I feel like my changed code should run better, but it doesn't.I know that my code is not written very efficiently (and feel free to comment on ways to improve it), but my main concern is the significant increase in computation time that resulted from my changes.The loop above is the main block of code within the Sub, which is run via a thread.In my tests, it is the only thread running at that time.Everything works, and the computation yields the correct result, but takes 10x longer than previously. Additionally, the number of iterations does not increase.So the new code isn't iterating excessively, it is simply taking much longer to compute within each iteration.

View 19 Replies

Variable Declared Inside A For Loop - Make This To A Compile Time Error?

Mar 27, 2012

Today I investigated a logical bug in our software and figured out that this is related to the way VB.NET thread variables inside a loop.Let's say I have the following code:

Dim numbers As New List(Of Integer) From {1, 2, 3, 4, 5}
For Each number As Integer In numbers
Dim isEven As Boolean

[code]....

The problem is that isEven is declared but not assigned.In this specific case, it would be correct to write dim isEven as Boolean = false but I haven't done this.In VB.NET, a variable that is declared inside a for loop keeps its value for the next itaration. This is by design: [URL]but this is also dangerous pitfall for programmers.

However, until now, I haven't been aware of this problem/behaviour. Until now.Most of our code base is C# anyway, which doesn't allow the use of an uninitialized variable, so there is no problem. But we have some legacy code that is written in VB.NET that we have to support. So the best thing would be to generate a warning or even an error in this specific case.But even with Option Explicit / Option Strict this does not generate a warning / an error.Is there a way make this a compile time error or maybe a way to check this with FxCop?

View 2 Replies

Check If A String Exists In Html Code By Executing A For Loop Which Executes Each Time A Different Url?

Apr 4, 2012

I would like to know please how to check whether a string exists or not in a html code. I'm executing a for loop. Each time it checks a different url, so I want to be able to check each time if for example "<img" exists .

P.S: What's the difference between using

webrowser1.navigate

AND

dim request webrequest
request = WebRequest.Create
etc...

View 1 Replies

VS 2005 - Print The Entire Datarow At A Time And Then Loop Through All The Rows Present In The Datatable?

Mar 26, 2010

I have created a datatable and now i need to print it,so i did the following:

Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage

Dim xPos As Single = 20

[CODE]...

The code works fine.But in the above code as you can see that i am printing the each rows content of the datatable one by one and after printing all the contents of a single row i am looping the code again for printing each and every row present in the datatable. So i want to know that inspite of printing each and every data present in the row of the datatable,is it possible to print the entire datarow at a time and then loop through all the rows present in the datatable?

View 20 Replies

Evaluates Loop Condition In Do...Loop Statment To Determine Whether Loop Instructions Should Be Processed

Mar 14, 2011

Makes the following statement about the code below:

**"The computer evaluates the loop condition in the Do...Loop statment to determine whether the loop instructions should be processed. In this case, the inputsales <> String.Empty condition compares the contenst of the input sales variable to the String.Empty value. As you know the String.Empty value represents a zero length, or empty, string if the inputsales variable is empty, the loop condition evaluates to True and the computer process the loop instructions. *If on the other hand the inputsales variable is not empty, the loop condition evaluates to false and the computer skips over the loop instructions.

Based on the code I think it is the opposite: ...that while the inputsales value is not empty it should evaluate to true and process the loop and if it is empty it should evaluate to false and skip the loop?

See below.

Option Explicit On
Option Strict On

Imports System.Globalization

[CODE]...

View 2 Replies

Connect Different VB Applications To A Database Server.like Accessing Data From One Database By Different Applications?

Aug 15, 2011

how to connect different vb applications to a database server.like accessing data from one database by different applications...

View 4 Replies







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