How To Stop A Circuit
Sep 27, 2010I had a program,like this:
n=10;
do while n<1000000000
n=n+1
[code].....
I had a program,like this:
n=10;
do while n<1000000000
n=n+1
[code].....
Currently, one of our assignment for Physics are to create a program that can calculate series, parallel and combined circuit, with any number of capacitance. We are using Visual Basic.
1. How to make that when we click the 'Enter Capacitance', a pop up show and tell us to enter number of capacitance, or to enter value for a number of capacitance?
[code]...
i want to build my own electronic circuit simulator which is use mathematical models to replicate the behavior of an actual electronic device or circuit. Simulating a circuits behavior before actually building it can i do that with vb.net is there any library that deal with simulation or something
View 6 RepliesWe had a Nullable object must have a value error today on this line of code:list = From x In Me Where x.FooDate.HasValue AndAlso x.FooDate.Value.Date >= barDate
Funny thing is that I feel sure this used to work fine (and there has always been a sprinkling of null values in the underlying data). And logically it looks fine to me. The check for HasValue and the AndAlso look as if they're going to shield us from any Null danger.But it seems suddenly they're not. Am I missing something?OK, we can correct it to this, which eliminates the error:
list = From x In Me Where If(x.FooDate.HasValue, x.FooDate.Value.Date >= barDate,False)
But this looks to me less readable. In simplifying the above code to shorten the line I left out a crucial chunk of the code. The original problem should have read something like:
list = From x In Me Where x.FooDate.HasValue AndAlso x.FooDate.Value.Date >= fromDate And x.FooDate.Value.Date <= toDate
Because of the rules of shortcircuiting and operator precedence (as outlined in an answer to a long ago question of my own) I needed to add brackets round the second part of the instruction in order to stop LINQ evaluating the second x.FooDate.Value.Date:
list = From x In Me Where x.FooDate.HasValue AndAlso (x.FooDate.Value.Date >= fromDate and x.FooDate.Value.Date <= toDate) LINQ really does obey AndAlso and force me to look more closely at the original problem.
I implemented a serial communication between a PC and a circuit based on ATMEL mP, managing the submission of correct / incorrect reception of commands ... The following code works, I wanted a block on the performance and reliability as it is for me very important part of this project that I'm doing.
Public Class frmTrattamento
Dim IsStart As Boolean = False
Dim inputData As String = ""
Dim Stmp As String = ""
Public Event DataReceived As IO.Ports.SerialDataReceivedEventHandler
[Code] .....
I'm trying to develop a module that calculates voltages in a circuit based on setting for certain components. Is a module available to handle circuit calculations including parallel paths.
View 1 RepliesIt titled E-Speech Door Access System. It security based system which user need register before use it. Now im using Visual Basic 2008 Express. I have use VB6 code it show error. Now i need the coding which when password spoken then signal need travel trough my laptop port. My laptop oni hv VGA port. So I plan 2 by USB parallel port.[code]...
View 2 RepliesI have written a programm with visual basic 2008 express edition and I'd like to use the parallel port to communicate with my self-made circuit. I want to controll 120 LEDs with the parallel port but I don't get it how. I know how to activate the databus but not how to activate the controle lines of the parallel port.
View 5 RepliesApparently this used to be a way in VB6 and VBA to short circuit and execute the first true case:
[Code]...
How can i return null values in if statement above. This statement is not working if condtion is false its retruning me 0 value even if condition is false
dim d as nullable(0f Decimal)
d=(if(_dr("value") isnot dbnull.value,Convert.toDecimal((_dr("value")),Nothing)
Alright, so I'm still working on the slot machine. I have three timers all independently going for my three "wheels" of the slot machine.
My issue, is that I'm trying to make a Stop button to stop each timer one at a time, and I'm not understanding why this code isn't working. The logic completely makes sense, and the first "wheel" stops when I click the button, however, it doesnt appear to stop the other two timers.
CODE:
I have a simple application that use thread pool to read a file and input the data into a listbox. I want to be able to stop threadpool from running after clicking a stop button. How do I stop threadpool? Here is the code for my application below:
Imports System.Threading
Public Class Form1
Private Delegate Sub StringDelegate(ByVal text As String)
[Code]....
I created a form and have the variable inputs for 4 motor run statements. Then with a start button the script starts and it is surrounded by a for next statement to loop 10 times. It works fine but if i need to stop the execution of the script with a stop button. I put the stop in a new section but of course does not work to do a motor stop. It just causes the exe to not respond till the loop is complete. Just need to be able to stop the Run1_Click button section.
Edit:I do not mind if it finishes the 4 motor run commands and then stops execution of the loop. So need to figure out a way to trigger a stop from a button on the form to stop the cycle. For the future the loop will be a variable integer input so 10 will not be the standard.
Edit::Does a ' Do ' statement sound like the thing to use? If so how and where would I place that? Have a Stop button on the form and it would stop after the 4th motor run command.
#End Region
Declare Function InitStp Lib "stp.dll" () As Integer
Declare Function RunMotor1 Lib "stp.dll" (ByVal steps As Integer, ByVal interval As Integer, ByVal direction As Integer, ByVal outputs As Integer) As Boolean
[code]....
I have a START and STOP button and when the user clicks "start" the program does a whole bunch of calculations and all. However, I noticed that when I was testing the program I clicked STOP the program continues to execute stuff.
My START code is basically a while loop that iteratively does some calculations.
So I just put a boolean variable as the while condition and when user clicks stop its set to false and when user clicks start its set to true. However, when I click stop, the condition is set to false yes but it still executes all the code until the condition is re-evaluated right...so my question is how can I get out of the while loop when user instantly clicks "stop"?
I am trying to make an application with a start button and a stop button on a stop watch program. These are the codes I am using but my seconds on the stop watch don't start.
Public Form Dim intSecond As Integer = 0
Form 1
Private
Dim intSecond As Integer = 0
intSecond +=1
[Code]...
After I write my code and try to run the program, the seconds will not start,
I need to record the screen when my user clicks start, and stop recording when he clicks stop.I've searched for a while on this subject, and I have found nothing.I want to do this without adding any files to my project, I just want to use some built in function in Visual Basic, and start recording, or even take a snapshot and add it to an AVI file or something...These are some sites I have found:
http:[url]......
This code is in VB6, but I am not sure how to even start using it?
I have started working on a legacy project (ASP.NET 1.1) which was done in an old machine (which I dont have access to). And I am unaware of the development environment settings used for building this project.
Nonetheless, I am able to build the project and deploy it all well from my machine (I created the full development enviroment locally). In my machine everything works great.But some screens where one of the assembly dlls (third party dlls) are used do crash on any machine other than mine! They probably do net get the proper assembly (with matching version or something), even though when I have put all the assemblies in bin (and used the same files while adding references to the project). .NET runtime probably tries to find them in the GAC of the other computers? Or probably in my system itself it loads from GAC and not from the bin? How could I know all this? The question is it runs perfectly fine on my machine, where the assemblies are at both places - in bin and in GAC.
I am lost what I should do to so that no matter which machine I deploy the project, it should always look in bin only! Also, I dont want to change the code in any way because its a legacy code and has been working all right since ages! Just some settings e.g. maching.config or soemthing?
I get the feeling I am still using asp type scripting techniques in the script below instead of proper asp.net scripting...
If this is true, how do I do the below the proper .net way?
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
[Code].....
I know in the older versions of Visual Studio, there was an "Add Watch" option where you can choose to stop execution when the value of the field changed. I am using VS 2010, and I can't figure out how to hit the breakpoint when the value of the field changes.
View 2 RepliesI have an application for PDAs with a long running process, and I'm getting the problem that the PDA is going to sleep before the process has completed.
I haven't got any control over the power settings on the PDA, does anyone know a good way for my application to stop the PDA from going to sleep?
When an ADOX database's Table is filled, the cursor always stop at the first row. How to make to stop at the last row?
View 8 RepliesI have read everything I can find, and understand some of it. I don't know what I am missing though. I can't get the flickering to stop. Can anyone help me? I've been using VB 2008 for months now, but I am new to the graphics bit. At first I tried using an ellipse from the powerpack, but that flickered even worse.
[code]...
In vb6 I could define tab stop position as TAB(n), such that TAB(32) will put the tab stop at position 32.I could also put several tab stops in a string or write them to a text file, such asPrint #1, "This"; TAB(14); "is"; TAB(20); "a"; TAB(27); "demo"will write "This" as position 1, "is" at position 14, "a" at position 20, and "demo" at position 27.
View 8 Repliesin c++ we use break statement to stop a loop what do i do in vb.net to break a loop
View 6 RepliesPrivate Sub cmdGenerer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGenerer.Click
'Ceci remet le focus si l'age en en-dessous de 18 ou au-dessus de 65.
[code].....
How to Stop This " Like to Make a button That will Stop it from Repeat".[code]
View 3 Repliesfor x = 1 to 45
if x = 15 or x = 30 then (push a button to continue)
for y = 1 to 50
{some code here}
next
next
what i want is the loop to stop at 15 and 30 where you have to press the ok button on this form to restart the loop.
is there anyway to stop a label going below 0, when the label is the result of a sum which often goes below zero??
View 18 RepliesI have a from with various timers. what is the code to turn off all timers in a form at once?
i all ready tried:
For Each crt As Control In Me.Controls<br/>
If TypeOf crt Is Timer Then<br/>
crt.Stop()<br/>
End If<br/>
Next
I would like to stop the looping. Once the name is found and the invokemember click is completed. I tried End For but it keeps looping.
For Each curElement As HtmlElement In theElementCollection
Dim controlname As String = curElement.GetAttribute("name").ToString
If curElement.GetAttribute("name").Equals("star") Then
[code]....