Waiting Function Before Going To Next Line
Aug 19, 2010
I am coding a desktop monitoring system,which the server send a keyword to client,then the client will reply with the information and the screenshot. my problem is when the client receive the request message ,in that instance the client will capture the screen and then send the pic,there isa GDI+ error,which i think because while saving the captured picture,it will send the file.How can I instruct the program to finish saving the file before sending the image... this my code :
[Code]...
View 4 Replies
ADVERTISEMENT
Dec 18, 2011
I'm looping through items in a listview. For each item, it deletes a file containing information stored and re-writes it with new information from the listview item.
View 5 Replies
Mar 20, 2009
I have a button in my application that starts a function to play sounds. But when the function starts a have a problem that my application stops working until all the sounds are played. Then a want to display a waiting screen to show the status of the current application. To this i thought to create a new thread to open the waiting window and then show the messages. But i have a problem that when my thread finishes, it closes the waiting screen. I tryied to put a loop inside my thread, but this crashes my aplication until the loop condition is satisfied.
View 2 Replies
Aug 10, 2010
I want the program to display the text "Waiting for connection..." while the program is actually waiting for a connection. However, when I run the program, the form doesn't even appear because the TCPListener is waiting. What can I do to have the program appear and show the text while it's waiting for a connection?
Imports System.Net.Sockets
Imports System.IO
Public Class frmMain
Dim client As TcpClient
[code].....
View 5 Replies
Jan 16, 2010
I am looking for a function like this:Function(Line x) must return the line x as a string (where Line x is a line of code from Form1 I specify)
Example:
Function(Line 10) returns the code (instructions) from line 10 as a string
If Line 10 from Form1 is: "if a=b+c then...."
Function(Line 10) returns "if a=b+c then...."
View 3 Replies
Sep 8, 2010
VB.NET 2008. How could I make a new line inside the ToString() Function that VB already have. How to do like a .WriteLine() but inside the ToString() function. In my case, this inside of a class of course. I don't know if you get me. All I want to do is to show a fraction in the normal way not using the slash(/). Showing the numerator on top of a line, and below it the denominator. This inside the VB pre-made ToString() function.
This is what I've tried;
Public Overrides Function ToString() As String
Return Me.numerator & "/" & Me.denominator
End Function
Output example: 2/3
But this is not what I want.
View 4 Replies
Feb 23, 2009
I am using VB 2008 express and I am reading text file line by line in assist of EOF function. Problem is, that this function doesn't read the last line (In VB6 works properly). I want to ask if this problem on my side in my code and how to solve this problem with reading the last line.
Try
FileOpen(FileNumber, InputFile, OpenMode.Input)
Do While Not EOF(FileNumber)
LineInput(FileNumber)
NumberOfLines = NumberOfLines + 1
Loop
Catch
MsgBox("Error loading file")
Finally
FileClose(FileNumber)
End Try
View 5 Replies
May 1, 2012
In the following function I get the green squiqly line warning at the end of the function that when you hover the mouse over it, it reads: "Function 'AllQuotesDal' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.". I've tried and tried to make it correct and safe but it won't compile the way I've tried playing around with the variable 'reader'. It seems to need to be the way I have it but I want that warning to go away.
Code:
Public Function AllQuotesDal() As OleDb.OleDbDataReader
Try
Dim connection As OleDb.OleDbConnection = NewConnection()
[Code].....
View 3 Replies
Feb 20, 2012
I am trying to plot a set of data using a function I have defined as an array:
Private Sub calculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calculate.Click
range(1) = min.Text
For i = 2 To 100
[Code] .....
Range(i) I want to be my x values and fee(i) to be the y values. When I try to select range() and fee() as the x and y values for a series, I get an error because they are not of type double.
View 3 Replies
Jun 22, 2010
ive created a function for generating username, password, email to log in on a website but the problem is i want to use all account one at a time for example
num|username|email|passwd
1|username1|email@email1.com|password1
2|username2|email@email2.com|password2
3|username3|email@email3.com|password3
4|username4|email@email4.com|password4
5|username5|email@email5.com|password5
[Code]...
View 3 Replies
Jul 10, 2009
I'm using VB2008 Shell function to execute file with arguments. But I'm not sure how should look my PathName in Shell function with all necessary arguments and command-line switches. Without arguments: [Code]
View 4 Replies
Jun 29, 2010
I'm trying to use a nested multi-line lambda Function in VB.NET and am getting an error. Here's what my code looks like:
cartItems = cartItems.Select(Function(ci) New With {.CartItem = ci, .Discount = discountItems.FirstOrDefault(Function(di) di.SKU = ci.SKU)})
.Select(Function(k)
If k.Discount Is Not Nothing Then
[code]....
View 2 Replies
Dec 15, 2011
How to Make a Waiting while Processing? I mean I want when the software processing login into my Online database, the Button1,TextBox1,TextBox2, LinkLabel1,LinkLabel2 will hide and the Waiting Picture is show,
Here is my code :
Button1.Visible = False
Button2.Visible = False
TextBox1.Visible = False
[code]....
But when i click the button 1, the Button1,TextBox1,TextBox2, LinkLabel1,LinkLabel2 there hide and PictureBox1 Show when MsgBox show "LoginFailed! Invalid Username Or Password" I wanna make the Button1,TextBox1,TextBox2, LinkLabel1,LinkLabel2 hide and picturebox1 show after that Process the Login Verification Into database.
View 2 Replies
Apr 23, 2011
I keep trying different things I find on the net, but I can't get VB.net express to wait for exit. Hopefully someone can point me in the right direction here. Here is my code and all of this works but there is no way to tell when mugen stops.
[Code]....
View 6 Replies
Aug 21, 2011
I am a VB6 coder and I'm making the move to VB8 / VB.NET.I know how to wait in VB6, but my problem is that I don't know how to wait in VB8/VB.NET. I have a TextBox called textbox2 that contains the number of seconds I want to wait. I used to use wait 60 in VB6, but of course VB2008 is different.
View 5 Replies
Jun 5, 2009
basically what im doing is something similar to this;
Private Sub FirstRoutine()
'This is my first routine, i load a listbox up with a whole
heap of info
[code].....
View 3 Replies
Mar 25, 2011
An in-line table valued function in SSMS takes about 6 seconds to return 11088 records. The same function in VB .Net 4.0 using TableAdapters.InputTableAdapter.GetData (Created with data set designer) takes about 15 minutes complete.Both are executed from the same workstation.Why does this discrepancy exist?
Workstation:
Windows XP SP3, 2GB
VS2010 Ultimate
.Net 4.0 Framework
Server:
SQL Server 2008
View 3 Replies
Oct 14, 2011
what i need to do is open a txt file, read line by line, decode each line into an array and display. Now all works ok apart from one line.
sTextLine = objReader.ReadLine() <-- Value of string cannot be converted.
full code here
-------------
Dim objReader As New System.IO.StreamReader(sOpenFile.Text)
Dim sTextLine As New ArrayList()
Dim sText As String = ""
Dim i As Integer = 0
[code]....
View 3 Replies
Nov 16, 2011
I have a question, can I make a progressbar like this with code?
View 1 Replies
Sep 24, 2011
I am practically a beginner at Visual Basic, and programming in general. I have created a simple falling bricks game in Visual Studio 2010. Every 100 milliseconds, it scrolls down bricks and if the player's position hits a brick, the player loses. I am having trouble with input.
I do not know how to make the computer accept left/right arrow keys as input, without having to wait for an input every 100 milliseconds. Here is the code:
Imports System.Threading
Module Module1
Dim RandomN As New Random
[Code]....
If I put "Input()" somewhere in the Animate sub, the program will invariably go wrong. How can I make it work?
View 4 Replies
May 8, 2012
is there a function that makes the program wait? and is there something that makes the program restart itself?
View 6 Replies
Mar 11, 2009
I am trying to make a marquee progress bar run while my long function is running. When the function is done running, I want the progress bar to disappear.
[code]...
If I don't do t.Join(), the progress bar disappears right away and then the thread runs. If I do Join(), the progress bar doesn't appear until the message box pops up after the thread is done!How would I get the effect of the progress bar running while the thread is running and then stopping when it's done?
View 15 Replies
Aug 22, 2009
I am writing an application to perform an automated task on a website. I am trying to write a script that logs into the website, then loads a certain page. I have to execute a javascript function after filling in the username and password on the login, but the WebBrowser object doesn't wait and does not log in. As a result, it loads the next page while not logged in. How can I wait until the application logs in before loading the next page? I tired using
Code:
Do While WebBrowser1.ReadyState < 4
Application.DoEvents()
[code]....
View 11 Replies
May 5, 2009
I have a problem with an App I am writing that lists information about various media on your computer and lets you launch it right from the app. My problem is, when launching an intensive process, like a game for instance, it is desirable to shut down the app to not hog precious resources. Here is the code i have so far...
[Code]...
This code works fine, but for one small detail. The app exits before the desired process starts, thus cancelling out the process all together. My question is, how do I get the app to wait for the process to start before exiting?
View 3 Replies
May 18, 2009
I'm trying to find out how to wait for the page in my WebBrowser control to finish loading before it runs the rest of the code?When a button is clicked, i want to navigate to a website, then wait for that page to load fully before then processing the other processes.[code]Can i use the DocumentCompelete event, if so how would i use that?
View 2 Replies
May 11, 2011
I would like to develop a queue application in VB for a clinic, so that when a patient comes, he is entered in a queue as he waits. A doctor picks the next available patient in the queue and a message is posted in the screen for that patient to go to the doctors room. How do i do this?
View 21 Replies
Jun 29, 2009
how do you show the vista waiting wheel close to the mouse ( in a wpf application)
View 1 Replies
Dec 15, 2011
What is the proper way to call up a form and wait until it receives a replay before moving onto the next code step? [Code] Now lf is the login form that waits for the users password and then, depending on if its correct or not when they hit OK it should send back a true or false (isLogedIn). Currently i do not know how to have the code wait until it receives something from the login form before moving onto the next code.
If i use my old code here:
Do Until isLogedIn = True
isLogedIn = isLogedIn
intX = intX + 1
Loop
It never ends if the user puts in a false login password so it just keeps waiting.
View 1 Replies
Jul 1, 2011
I am trying to use a separate thread to handle specific events in VB.Net. The idea being that I do not want the main application to be held up if a particular event handler takes awhile to finish. How do I get my main thread loop to suspend the thread while allowing it to handle events when they occur?When I create a Windows Forms application, there is a UI thread that handles the UI events. I do not imagine that this thread is continuously polling some variable to see if someone has pressed a button. I imagine the thread is suspended until the OS tells it there is something to do. I was trying to figure out how to ensure that my event handlers were not being executed by the UI thread. From what I have read, I can do this by raising the events from a different thread. But what does that thread do while it is waiting for other events, just exit?
I wanted to know how to create a thread that works like the UI thread, only it processes the events I want it to process. I am not sure how events work in .Net. I understand that event handlers are run on the thread that raises the event. I believe that .Net allocates threads from some thread pool to process events such as timer events. I am not clear on how it works, though, and what those threads are doing when they are not handling events.
View 2 Replies
May 7, 2011
I have a basic question about timers, that I can't answer myself. It's annoying me. My code is made to visit a website every X seconds. There are two problems.
I Set the interval for 30 sec and the first visit should be right now, not after 30 seconds.
After that, wait 30 sec and navigate to another one (in a listbox). The problem is that the Timer is not waiting that time after the first visit.[code...]
View 2 Replies