Creating A Traffic Light?
Nov 11, 2010
Simulate a traffic light with three text boxes placed vertically on a form. initially, the bottom text box is solid green and the other text boxes are dark grey. when the tab key is pressed, the middle text box turns yellow and bottem box turns dark grey. next time the tab key is pressed, the top box turns red and the bottem two turn dark grey. Basically the tab key cycles through the colors.First off let me say im not looking for an entire code. What im looking new to VB (been working on it for only a week) and im haven trouble finding a sourcecode for "tab". I named the bottem text box "Green", middle text box "yellow" and top "Red"....how do i go about finishing the code?
Public Class trafficlight
Private Sub Green_BackColorChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Green.BackColorChanged
[code].....
View 3 Replies
ADVERTISEMENT
Jan 28, 2011
Simulate a traffic light with three small square text boxes on the form. Initially the bottom text box is green, the rest are dark gray. When the tab key is pressed, the middle box turns yellow and the bottom box turns dark gray. The next time the tab is pressed, the top box turns red and the middle box turns dark gray. Subsequent pressing of the tab key cycles through the three colors. Hint: First place the bottom text box on the form, then the middle, then the top. I did all this and dabbled below. Does that look at all correct...minus the timer thing...I got the timer code (which is not needed) but am not sure how to write it so the tab key does the work. This is really confusing to me, but it is a required class.
Dim Counter As Single
Private Sub Timer1_Timer()
Counter = Counter + 1
[Code].....
View 7 Replies
Dec 30, 2009
please help me am in need of code for traffic light simulator, wanted to design a simulator with barriers which close a lane when it light red and opens when it lights green.These barriers should be in form of red and black bars on the entrance of any parking area.The reason to barriers is that here in Uganda traffic is controlled mostly by the police men so i wanted to improve the traffic light system with the use of barrier.
View 3 Replies
Sep 12, 2009
I have an image of a lamp that the user can move around the form.. I have a button for on and one for off.. Does anyone have any suggestions as to how I would make the light effect? Can you make it programatically? Like a V shape with the bottom of the V being the sides of the lamp shade and everything in the path of the V becomes illuminated?
View 3 Replies
Jan 29, 2010
I have a button, When I go with my mouse over it I want that it lights up to a color.
View 1 Replies
Nov 6, 2009
I'm new at VB therefore i need some guidance on how to go about doing e current project that i have. Currently doing on Light Sensor and Audio Announcement.
[Code]...
View 5 Replies
Jun 10, 2011
I am supposed to be writing a program for my instructor using VB 2008. It is sort of like a quiz program. You build the "light bulb" program but instead of names and colors, it consists of two forms. Question 1 with a "next" button and the second form for Question 2 with a "previous" button. I have no idea how to link the two so that when you click "next" it goes to the second page and vice versa.
View 2 Replies
Dec 19, 2009
how to wire up a light buld to a usb output from vb please?Me heads a shed and me lifes a dream, Its all for fun and mostley free.
View 10 Replies
Feb 16, 2009
When I downloaded VB 2005 Express I took advantage of the bundle of goodies on offer and downloaded SkinCrafter Light.I really like the four skins that come with SkinCrafter Light, and I am using one on my current project (example of the skin I am using here). However, SkinCrafter Light has a couple of bugs with RichTextBoxes (these bugs are known to SkinCrafter, as I can see posts about them in their forum, but they have gone unanswered in over two years!)One bug is that any text that is colored in a RichTextBox is turned back to black when the skin is applied, and if you click anywhere in the RTB the application will crash (you can see my RTB on the right bottom of the form in my screenshot above).
I use colored text in my RTB, but, at a pinch,I could make do without (as I really DO like the Skin), but the problem remains of crashing when clicking inside a RTB.I was wondering (can't test at the moment as I am at work) if simply placing a control, such as a Button, Label, Picture box etc, set to transparent, over the top of the RTB, would solve the problem, so a user could not click inside the RTB (but would be clicking on the invisible control over the top instead).
View 1 Replies
Apr 17, 2010
I'm trying to make a USB strobe light type thing. I have a cut USB cord with an led attached to the black and red wires. Now I'm trying to write a script to make the light flash on and off really fast. I've tried several different apis but none are doing it.
View 2 Replies
Jan 23, 2012
I am already using Light Switch. When i am trying to deploy it is asking license information. If i buy a Enterprice license key then how many programs i can deploy with that same license? I am sorry for the noob question but i can not find anything details about Light Switch licensing.
View 2 Replies
Apr 25, 2012
I'm trying to make a coffee net program.I want to get only internet sent and received bytes.
View 5 Replies
Jan 6, 2011
I am trying to do is to draw a ray of light emitted by a light source and it is going to be reflected mirrors. I rotate the emitter and mirrors and the ray of light shold obey the laws of reflection. The emitter and mirrors are in an opaque room which means light should not go out. Where I am now is that I am able to draw the ray but when the angle is 90 degrees ( +or-) all the drawing disappears. I set some conditions to make up for this situation, but it does not seem to work. Besides if the angle exceeds 90 degrees, the line is drawn in the opposite direction.One other thing that happens is I set the ray to stop when either end_x_emitter_ray or end_y_emitter_ray = 500. It works for the end_x_emitter_ray but not for the end_y_emitter_ray[end_x_emitter_ray and end_y_emitter_ray are the point where the ray end]I have uploaded the my whole code here. Can you guys suggest me what can be done to make it work appropriately?
View 6 Replies
Jan 29, 2012
I am trying to make a Christmas light animation via computer control. I am using VB.Net and have tried several examples I have found, but I get the same error: port is closed. The code I am using is this:
Imports System.IO.Ports
Public Class Form1
Dim instance As New SerialPort
[Code].....
I have tried several things and I still get the error message that the port is closed.
View 6 Replies
Mar 11, 2010
I'm trying to make a light version of a Blackjack game. The rules I need to use are as follows:
Ace = 1
Normal Cards = 2-10
Color Cards (king, queen, etc,) = 11
The dealer can keep hitting until it reaches 17 or under 21, he must always stay once it hits 17 or over (without busting obviously).
I know the ace normally should be 1 or 11 normally but I don't want to complicate things, I want to get the main thing of the program working first.
Public Class frmMain
'declaration to help generate number
Dim RandomClass As New Random()
[code]....
View 10 Replies
Nov 27, 2010
how can I determine if there is network traffic?I would like for example to show how fast the network traffic goes or to add a flash using a picturebox to animate the network activity
View 5 Replies
Nov 30, 2011
How can I monitor the internet traffic and identify when a specific website is visited so that a certain function could be run? I'm making a internet censor program for a school project.
For example, I want to be able to browse the internet all day long with the program running in the background, but once I were to visit a specific URL (listed in the code somewhere) the program would run a function when the specific URL is detected.
View 6 Replies
May 20, 2012
so with google analytics , it can tell you if you have direct traffic or if you traffic was referred from a website. I have no idea how it can tell that the traffic has been referred, and I want to fool it to make it look like I was refrerred from another site using the webbrowser component.
View 5 Replies
Jan 14, 2011
How do i monitor internet only traffic without LAN traffic(such as file transfer between LAN) using vb
View 1 Replies
Jul 18, 2008
My boss wants me to create local databases on the light-side of things. I was researching on what solutions are available, we discussed the possibility of using text or xml files... but we dropped the idea since we want to use SELECT, UPDATE, DELETE command sets (or the like)I proposed the idea of using Access files (mdb) but he told me that he doesn't want the user to have Access installed on their computers.What are the choices avaible, am I forced to install Access on machines that would be using my VB .NET app to access mdb files?
View 2 Replies
Oct 10, 2009
I want just a code that calculate and show the traffic (volume) of sending and receiving to/from internet?for example, IE is opening a page and IDM is downloading a file ; NOW , how many bytes has been sent / received
View 5 Replies
May 12, 2012
I want just a code that calculate and show the traffic (volume) of sending and receiving to/from internet?
for example, IE is opening a page and IDM is downloading a file ; NOW , how many bytes has been sent / received?
View 2 Replies
Feb 27, 2011
I want to create a Small application for all the computers in my house that Monitors Network Traffic Because we are using large amounts of data each month and that leads to high costs.I can Monitor A computers total traffic with the system.net.networkinterface namespace. Now I would like to know if it is possible to Monitor an Process/applications Network Traffic to pinpoint The Problem.I've Read About WMI But there is so Much info on MSDN that i can't actually get to what i want and i don't think there is something so direct like the amount of bytes sent over the network.
View 3 Replies
Jun 23, 2011
How to measure the number of bytes sent and received while using the internet from VB.NET 2010 ?
View 1 Replies
Feb 27, 2011
I want to make a Small Traffic Monitoring Program for our house. Since in South Africa Internet is One of the many things that are way overpriced I want to monitor each computers traffic with a small Program since even when we are not at home for a day we might easily use 2 gigs of data. Somewhere a computer is downloading like mad?For a 4 mib(you only get 3.5 at most) line here Will cost you around R413(36 GBP/ 58 Usd) per month and One gig of data around R19(1.68 GBP/ 2.70 Usd) - R112(9.9 GBP - 15 USD).Ok enough Complaining. Each Computer in our house Connects to the internet either with lan or Wlan So is their a way to get how much traffic passes through one of those OR is there a way to monitor the total internet traffic regardless of how it connects to the internet ?
View 3 Replies
Jun 23, 2011
Me and a few other people are developing a piece of software that measures levels of distraction based on some user settings. The user will be able to designate certain programs, websites, etc. as "on task" and anything else will be considered "off task" by the program. The only road block we have run into is being able to grab the user's current web page in real time -- at any given second we need to be able to programatically determine what web page the user is viewing (in any browser) and determine whether it falls under "on task" or "off task". We would like to do this by creating a C# extension for Fiddler2 but are open to other suggestions as well (the software itself is programmed in VB.NET).
View 1 Replies
Sep 26, 2011
how to use time in vb.net.I would like to make a traffic lights program in vb.net but am not yet sure where to start besides the interface.I want the lights to change within a give time.
View 8 Replies
Jul 30, 2009
I am trying to write a program that captures log information from my Cisco 5510 firewall. I have a service working where it will perodically write text to a file. What I need now though is how to capture the actual traffic coming from the firewall on the network. It uses UDP port 514 to send it. I need to know how can vb capture that traffic and write it to the log file. I am a beginner to vb.net so please be patient with me if it seems like I am asking too many simple questions.
View 10 Replies
Mar 14, 2011
I want to 'listen' to the network traffic to and from a WebBrowser control. I'm not interested in the HTML.
View 12 Replies
Mar 14, 2011
I just want to know, What parameters or attributes should be taken in connection string so as to handle high traffic enterprise applications? Like in general we use server, initial catalog, userid, passwd. Some times we add timeout , and in some scenario pool etc. But i don't know what attributes should i take in as my common practice apart from above.
View 3 Replies