Make Form To Do A Different Thing For Every X Secs?

Jun 27, 2010

I have 2 labels in my form. I have different content on them.I want to do the following:[code]*loop all the code above nonstop, in order to make this "sequence" running nonstop until i close this program*..Can anyone tell me what code do i need for each underlined part above?

View 2 Replies


ADVERTISEMENT

Using Timespan To Calculate Hours, Mins And Secs From Secs?

Apr 27, 2009

23430 seconds = 06:30:30 (hh:mm:ss)52230 seconds = 14:30:30 (hh:mm:ss)The problem occurs when my total seconds goes over 24 hrs. So for example,95430 seconds should equal 26:30:30 (hh:mm:ss) however comes out at 02:30:30.Here is the sample code, note I have tried using TotalHours, TotalMinutes TotalSeconds however this does not give the correct result. I potentially need to be able to calculate upto 1000 hours - e.g 3601839 should equal 1000:30:30 (hh:mm:ss)

Dim ts
As TimeSpan = TimeSpan.FromSeconds(95430)
Dim hours

[code].....

View 6 Replies

Make Loop To Make Certain Thing Happen About 10-30 Times Without Taking In Too Much Memory / CPU?

Oct 16, 2011

A few years ago I have been busy creating this application but it didn't succeed, now Im coming back to it and similar problems occur. Basically I use SetPixel on a given window to draw a line, work fine, but the line goes away as the window redraws itself.The problem: I have been putting timers and threads on it to make sure the line is being drawn. Is there any way to make a loop to make a certain thing happen about 10-30 times without taking in too much memory/CPU?

View 7 Replies

Make 'try' Thing Work In My Program?

Feb 3, 2011

I need to write a program that uses 'try' in it

the program can only accept a number if its bigger than 3 otherwise it would give a error message and return to the start of the [code]...

View 16 Replies

Make If Command Apply To More Than One Thing

Jul 29, 2009

i was wondering if theres a way to make an if command apply to more than one thing, this is my problem: theres 9 white squares and if theres one or more thats orange, then a numer.text goes down one but at the moment theres 9 white squares and for every one thats orange the score goes down one, so if three are orange then the score goes down by three, or if five are orange then the score goes down by five, I'd like to make it so that even if there all nine the score only goes down by one.

View 13 Replies

Write A Formula To Make The Same Thing Work?

Aug 26, 2009

I want to enter a formula in VB but don't know how to proceed.

The formula I use in Excel is as follows

=IF(B2="A",M2*20.27)+IF(B2="B",M2*15.96,0)

How can I write a formula to make the same thing work in VB

View 3 Replies

Make A Webbrowser But Cant Get The Dock Thing To Work ?

May 27, 2010

Im a bit new to vb.net and i have maked a webbrowser but cant get the dock thing to work im not so good to that the form looks like this: [URL] then when i maximize it to full screen it looks like this: [URL] not good how do i fix it?

View 11 Replies

Stopwatch Thing - To Start On The First Form, And Stop On The Last Form?

Oct 16, 2011

I want a stopwatch thing, to start on the forst form, and stop on the last form, and to show the time.

View 2 Replies

Use The BackgroundWorker Built Into VB To Create A Thing To Make It Listen For Incoming Messages?

Mar 13, 2008

I want my application to be able to communicate 2-way between the application on another computer and the host server which will be running on my computer.I want to use the BackgroundWorker built into vb to create a thing to make it listen for incoming messages, and also send out messages to the client.The client needs to listen and receive, same as the server, because both need to communicate with one another.I do not know how I can make it do either sending nor receiving.I would be using two different background workers to keep the code seperated and organized so that I will understand what code is for what.

I want the code to say that if i receive the message "Apple" without the "" and cap sensitive, then it will change Label1.Text = "That worked, word received Apple" or something similar to that. ( This is because I am ignorant and I want it to interpret the text sent through to figure out what the application is supposed to do, and last time I couldn't figure out how to make it do something when a certain text was received.

View 1 Replies

Forms :: Form Closes The Whole Thing?

Apr 4, 2010

[MyCode]
Rigger.Show()
Me.Close()

Instead of showing Rigger.vb and then closing form1.vb, it closes the whole thing. I need it to leave Rigger open, and close form1

View 1 Replies

Form Resize With Control Sizing (con't) + 1 More Thing?

Apr 7, 2012

why the title has "(con't)" is because of this Form Resize With Control Sizing... almost named it with another thread on here. And I wanted to post, but it was already a 'Zombie Thread'.Thanks to _HAWK_'s post #11, instead of declaring every control I use. Would declaring it an array (fast guess - Label<Array(how many - 1; aka - X)>) work? ... that was probably Java... My point has probably been made, or can I just do Label.Scale(variable)?I had already set my declaration of the form I need to do this on "Resize". I am not quite at this stage yet, but I see this saving a lot of time asking early.

The +1 extra question is:How can I be able to split of a form in 3 unequal sections? The initial form is 800*600-left side has 2 sections, each 400*300 right side is 400*600.I am already using 3 'GroupBox' and it looks ugly because I have each one colored differently.I looked into Splitter and SplitContainter and TableLayoutContainer.

View 2 Replies

Win Form Data - Allow The Entering Of The Same Thing In The Same Field That Has Already Be Used

Jan 1, 2011

What i want to do is not allow the entering of the same thing in the same field that has already be used. eg. field(entry) 1 is already in the database. So when trying to enter 1 and field(entry) anymore it will give error msg and make change before saving.

View 10 Replies

IDE :: Shoutbox / Chat Thing And Forms Inside Of A Form

May 27, 2010

Just a couple of things i wanna have a form that has like a little chat thing like shoutbox that post a message up on the message box and you can choice a display etc etc

[Code]...

View 2 Replies

Game Programming :: Make A Matching Card Game In VB 2010 - Show Cards For 10 Secs Then Change Cards To (AppPath & "Cards Ed.png")

Apr 19, 2012

I need to make a matching card game in VB 2010. i have generated my cards but now need to show the cards for 10 secs then change the cards to (AppPath & "Cards ed.png"). then when a user clicks on the card the card will flip over.*How would i set a timer to turn all my cards into*(AppPath & "Cards ed.png") after 10 secsbut still have the values from the array and when i click the cards they flip over (from red card to numbered card)

Code:
Private Sub Place()
Dim Counter As Integer = 1
For Row As Integer = 1 To Int_Grid_Size

[CODE]..........................

View 2 Replies

Application Ends After 10 Secs With NO Error

Mar 7, 2012

I created a slideshow application for 4 monitors, with diferent folder for each screen images source.It has several transition effects and time schedule. It works superb when I am in VB Studio, developing, testing, etc.When I Build it, and play it work fine. But If I try the EXE file out VB environment, it work aprox 10 secs and "disaapears" from the screen, as if somebody press "QUIT"..I can't get any error or message from windows or VB.Again if I open the solution in VB it runs perfect.

View 8 Replies

Uncheck Checkedlistbox Items 1 By 1 After 5 Secs?

Apr 6, 2011

Im having trouble on how to uncheck checkedlistbox items 1 by 1 after 5 secs.ex.I have two items on checkedlistbox

Checked - Item1
Checked - Item2

Then after I clicked the button Item1 is going to be uncheck and after 5 secs item2 is going to be uncheck?

View 3 Replies

WebBrowser Navigate, Wait Few Secs And Navigate Again?

Aug 24, 2008

I want to make something that can on button click navigate to a page, wait the time I specified and navigate to another page..
[CODE...]

This does not do what I thought it would do..I think that the problem is that when it sees System.Threading.Thread.Sleep(5000) everything stops for 5 secs .How can I make it go to google.com and then after 5 seconds, yahoo?

View 7 Replies

3rd Time Asking About The Same Thing WebDrive?

Nov 8, 2009

i asked a lot for this thing an i need answer and here is an example i need to create something like that connected to WebDav or FTP Server[URL]... this drive you can install it and easy transfer data from your hard disk to the Gmail server and login with Gmail account

i have WebDav Server and FTP server and i need to create Drive like this one to transfer data to this partation and sure to the account at the server

View 7 Replies

How To Create A History Thing

Aug 9, 2010

have a web browser and want to know how to create a history thing, I want to be able to view history in a seperate form, I want in my options to be able to delete history, and I want my combobox to be able to view the last addresses I have

View 6 Replies

Php - Get A Function In VB That Does The Same Thing As File_get_contents In PHP?

Jul 20, 2011

Is there a function in Visual Basic that does the same thing as file_get_contents in PHP.I'm a PHP programmer, and I want to write a few scripts to download some data from an API I'm using.

View 1 Replies

VS 2008 Yes/No/Cancel All Do The Same Thing?

Aug 29, 2009

I want Yes to do the SaveFileDialog and save the file.I want No to just close programI want cancel to return to program

Public Class Form1Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

[code].....

View 9 Replies

Err.Number And Exception.HResult The Same Thing?

Feb 14, 2006

I've recently converted some VB 6 code over that used the old non-structured exception handling. I also have some .NET classes that raise custom exception classes. When the code was VB6 I used to expose my .NET classes using COM interop and errors raised from .NET classes were being caught correctly in VB6. Now that everything is .NET the old non-structured exception handling is still there in the converted classes. But now the Err.Number is not reflecting the HResult of the error raised. I wrote a simple little Windows Application form with 2 buttons to simulate the problem. Here is the code snippet:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
On Error GoTo ErrHandler
Err.Description = "Test Error"

[code]....

If you click Button1 you get the following message:

-2147215379 : Test Error

If you click Button2 you get the following message:

5 : Test Exception

View 8 Replies

How To Do A Count Of Number Of Thing In ListBox

May 6, 2009

Imagine i have a listview1 and inside i populate 6 item how to write a code to count ?than a messagebox.show (" you have 6 files ")

View 4 Replies

Listbox Like Docking Type Thing?

Jul 2, 2010

ok say you have 5 listboxes and you want it so that they are kinda docked to the bottom so that when you resize the window they expand downward but not sideways

View 1 Replies

Ordering Commands TO Do Things First Before One Thing?

Jun 22, 2012

If TextBox1.Text = ("weburl") Then WebBrowser1.Document.GetElementById("price_category").SetAttribute("value", "4")
End If
If TextBox1.Text = ("weburl") Then
WebBrowser1.Document.GetElementById("fullprice_quantity").SetAttribute("value", "4")
End If
If WebBrowser1.DocumentText.Contains("Add to shopping list") Then
WebBrowser1.Document.GetElementById("add_to_list").InvokeMember("click")
End If.

I want them to go in order. But what it is doing at the moment is going to the third if statement first.

View 39 Replies

VB 2008 - Change Form1 To The Name Of The Thing

May 16, 2012

Such as with using Visual Basic 2010. what is an easy simple program to make? Like making your own calculator or whatever.If I even tried fiddling around with Visual Basic 2010, I would change Form1 to the name of the thing that I am creating, along with changing the color of the foreground/background and the color of the text too.But its the command text where I have to add text to make it work too that I would have trouble with. I ain't smart when it comes to stuff like Visual Basic.

View 1 Replies

Vput The Images In The Exe And Just Send The Exe With Every Thing It

Jan 22, 2009

i have images for my rollover buttons and thay are scatterd aound my hdd so when i build my app and send it to some one the images will no be displayed so my question is how to i put the images in the exe and just send the exe with every thing it.

View 4 Replies

.net - Passing A Method (that Returns A Value) As A Parameter A Bad Thing?

May 21, 2012

So for instance I have this method: LoadFunkyInfo(byval funkyData as string) And I pass it something like this:

LoadFunkyInfo(giantTable.Rows.Item(0).Item("blahName")). Should I do this instead?

dim foo as string = giantTable.Rows.Item(0).Item("blahName")
LoadFunkyInfo(foo)

I read somewhere long ago, that it's better to assign the method to a variable and pass that variable to a method, as opposed to passing the method as a parameter. Is that still true? Or true at all?

View 5 Replies

Console Application - To Check If You Type A Certain Thing

Aug 25, 2010

I have a console application, and its supposed to check if you type a certain thing, then it does it.

My code is:

Console.WriteLine("Please enter a command.")
If Console.ReadLine = "time" Then
Console.WriteLine(My.Computer.Clock.LocalTime)

[CODE].......................

View 7 Replies

How Do Bubble Sorting With Numbers On A Console Thing

Feb 20, 2011

can someone give a example of doing bubble sorting with numbers the simplest way if possible.all i know is that it uses a boolean to stop sorting, a variable which records how many swaps are done in a run if its 0 it stops swapping but other than that i dont know how to write a program doing bubble sorting?

my teacher didnt give me any examples of bubble sorting other than a algorithm, and before u ask no its not for homework i am looking bck at my computing notes and i just dont understand any of it!

if u could explain it to me step by step and give a simple brief exmaple using numbers

View 1 Replies







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