VS 2010 4 Math Operations ONE Single Time

Sep 19, 2011

I need to creater a menu that will offer 4 operations ALL at once by using & vbcrlf [code]heres what i was able to do but it shows all the 4 operation in my msgbox..

View 2 Replies


ADVERTISEMENT

Why Do Simple Math Operations On Floating Point Return Unexpected (inaccurate) Results In .Net And Python

Oct 20, 2009

x = 4.2 - 0.1
vb.net gives 4.1000000000000005
python gives 4.1000000000000005
Excel gives 4.1
Google calc gives 4.1

What is the reason this happens?

View 4 Replies

VS 2010 Hmwk - Display The Largest And Smallest Using Math.max - Math.min

Mar 5, 2012

well i am having a couple of issues with this particular homework problem and this is my first programming class so there is probably quite a few mistakes well the homework problem is to take three double values entered by a user and display the largest and smallest using math.max and math.min and display the smallest and largest so i thought i could use a listbox and take the values that went to the listbox and assign variables to each so i can try to use each variable in the math.max and min but im not making it to far and i actually might be way off

[Code]...

View 4 Replies

Multiple Operations Using Single RecordSet?

Jun 18, 2012

I have some task regarding do operations on database using ADODB in Vb.NET.regarding using the same record set multiple times?

I have tried on this topic just by closing the recordset after performing First operation and doing second operation e.t.c.

In ADO.NET we have "MultipleActiveResultSets=True" in ConnectionString for SqlDataReader.Do we have any property like this in ADODB?

View 1 Replies

Math Rounding Using Single?

Jul 13, 2011

I'm using .Net 3.51 SP1. I've been having problems with .Net's inability to add single numbers, could anyone throw some light on this.

[Code]...

View 12 Replies

Perform Two Hashing Operations Concurrently On A Single File Without Reading The File Twice?

May 18, 2011

I want to perform two hashing operations concurrently on a single file, without reading the file twice. Is there some way to share the FileStream between two synchronized hashing threads? For example:

Dim Stream As New IO.FileStream("...", IO.FileMode.Open)
Dim HashA, HashB As Byte()
Dim A = New System.Threading.Thread(Sub()

[code]....

Maybe some way of caching a stream? Trouble is, I don't want the entire file in memory at once (it could be many gigabytes in size) and I don't want the file read more than once, due to speed issues. I want the file cached only sufficiently to ensure that both threads can work.For example, suppose at some point in time, thread A had read 100k of the file, but thread B had only read 20k of the file. The portion of the file between 20k and 100k should be cached; but then progressively forgotten as thread B catches up. Then again, if thread B is too slow, we might still end up with hundreds of megabytes being cached.Maybe thread A should be made to wait while thread B catches up. Maybe the ReadByte() function of the stream should block for a while if one of the threads is too far behind?

View 13 Replies

Simple Math - How To Work Out Hours Within Time Frames

Feb 9, 2012

So i know this is more Math related but it would make life so much easier. What i want to do is enter 2 times into 2 text boxes and then subtract them from eachother to find out the hours inbetween as a decimal.

View 8 Replies

VS 2010 : Add Math Symbols In Messagebox?

Dec 1, 2010

how can I add math symbols in Messagebox? For example square of 5*5...when i click the button that in messagebox will be some math formula.

View 4 Replies

VS 2010 Math Function On Big Numbers

May 9, 2010

I am making a calculator that accepts large number (represented as strings) and performs basic math functions on them. So far I have Add and Multiply figured out.

Here is addition

Private Function Add(ByVal Number1 As String, ByVal Number2 As String) As String
Dim num1, num2, r, total As New Integer
Dim sum As String = ""

[Code].....

I saw something like this in the code bank but the examples there were from VB6(?) and were hugely inefficient (compared his Add and Multiply examples to mine, his having way more code and loops.)

View 6 Replies

VS 2010 : Cross-Threaded Operations: Update RichTextBox In Backgroundworker?

May 22, 2011

I want to execute a few external apps, where in between a RichTextBox gets updated.. Say when program1 has been startet the RichTextBox is updated.. And when program2 has been startet the RichTextBox is beeing updated again.So what i've done so far is this:

Public Class Form1
Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork

[code]....

But when doing the above i get the following error:

Quote:

Cross-thread operation not valid: Control 'RichTextBox1' accessed from a thread other than the thread it was created on.

View 3 Replies

Auto-Typer Single Line At A Time?

Dec 22, 2010

I'm using Visual Basic 2008I've been trying to create a auto typer where I can put a whole page of words into a rich text box and the auto typer then pumps the words out one at a time.The code that I use is:

Timer1.Interval = TextBox1.Text
SendKeys.Send(RichTextBox1.Text)
SendKeys.Send("{Enter}")

That code would just type all of the words at once. Also, I'm putting the words in a rich text box. How could I save the rich text box so that each time I load up the application it still has all of the words in it?

View 3 Replies

Show More Than One User Interface At A Single Time?

Nov 20, 2010

Is it possible to show more than one user interface at a single time in order to show how to show how all relate in real time?

View 1 Replies

Update Date & Time Together To A Single Field?

Sep 17, 2010

I am trying to upate date value as well as time value to a single datetime field.I can update date or time by using today.date or today.time separately.But I don't know how to update both to one field.

View 2 Replies

VS 2005 Show A Single MDI Child One At A Time Only?

Jun 26, 2009

I would want to be able to show a single mdi child form only one at a time, what would be the most efficient way of doing this?

View 2 Replies

Read A Single Character Each Time From A Text File?

Feb 1, 2011

How to read a single character each time, from a text file using vb.net? I mean that if the txt file contains code as " my name is...".It should be read initially as :'m'..after some time it should show 'y'. then 'n'.'a'..'m'.'e'.like that..

View 7 Replies

Real Time Form Updating - Keep Single Threaded - Ongoing Maintenance

Dec 14, 2009

I have an app that I'm trying to keep single threaded, mostly for reasons to do with simplicity of ongoing maintenance. I've structured it so that I can eventually multi-thread it if need be but I'd rather not at this point. It's semi-real time and does perpetual looping to display a number of different graphs and do various work with both the graph display and the work being hosted in their own respective objects. If you're familiar with the Windows dispatch manager it's that general paradigm run synchronously. And yee haw, it pretty much works at this point and runs fast enough to meet requirements by a happy margin. I have a cosmetic problem that I'd like to solve if I could. When I left-click and move any form around, my graphs stop updating until I release the left click button. I was thinking about a doevents somewhere in the click event catalog.

View 1 Replies

C# - Get CheckIn-CheckOut Time Difference From Punch Machine Attendance Log With Single Row Using SQL Query?

Oct 10, 2011

we are using Punch Machine for Attendance with zkemkeeper.dll and geting AttLog using Vs.net 2010.How can Get Records from SQL Query? my table structure like this

LogID int P.K.
DeviceIP varchar
EnrollNo int

[Code]....

View 3 Replies

VS 2008 Make Autotyper Press Enter Every Single Time After The Textbox Message Was Typed?

May 21, 2009

I have Visual Basics 2008 express and I tried to make a autotyper, so this is my

Button1: Timer1.Start
Timer1: Timer2.Start
Timer2: SendKeys.Send(Textbox.text)
Button2: Timer2.Stop

So it was my first try ever with VB and it kind of worked... Only 2 problems;

1. Button 2 doesn't really work, I have to click it really many times, then go to a different window, then click it really many times again, in the meantime it keeps on spamming

2. How do I make my autotyper press enter every single time after the textbox message was typed?

View 5 Replies

VS 2010 Comparing Current Time To Stored Time?

Mar 27, 2011

I'm writing a report scheduler that is somewhat of a clone to the backupexec scheduler and the layout can be seen in post #10 here: [URL]..It works great and saves/edits/deletes records just fine, but now i need to compare those records one at a time in a windows service that i'm writing in order to trigger automated report creation and emailing - i already have the report and i already have the code for the emailing, i'm just looking for the most efficient way to loop through the table (that i've pulled in to a dataset) and compare its records with the current date and time - if true, the event fires.

[Code]...

1stSun, 2ndSun etc are bit fields, time is a datetime, and the remainder are varchar. My service checks the database every thirty seconds.The english version of what i'm trying to do is "Connect to the database, grab the entire table (it will always only have 5-6 entries max, so i felt 30 second sweeps was okay), and If today is the 1st Sunday of the month, and it is currently 11:00:00 a.m. (could be any day or time, this is just an example) - loop through the dataset to identify if any records match the time field or greater - if they do, fire the report

View 2 Replies

VS 2010 - Possible To Display Several Forms In Single One

Jan 16, 2011

Is it possible to display several other forms in a single WindowsForm (by using a table layout or something else) ?

View 4 Replies

VS 2010 - Single Instance Of Application

Jul 12, 2010

i am using "Animated Window Effects with "Toast" popup demo" code from the code bank created for jmcilhinney. I put a NotifyIcon control on it and check Make single instance application on the project properties windows. the problem is that every time that i launch the app it creates one instance on the system tray of the app. i can not figure out how to over come this attached is a copy of my project.

View 10 Replies

VS 2010 Single Or Multiple Datasources?

Sep 23, 2010

Is it better to add just one datasource to your project that holds all your database tables and queries that you use as typed datasets. Or, create a datasource for each individual form or situation where your using the database tables as typed datasets. It seems simplier to have just one datasource but is there a down side. We're talking about @25 database tables/queries.

View 8 Replies

VS 2010 / 20 Or More Series In A Single Chart Area

Apr 2, 2012

Im trying to plot the reading of 20 or more thermocouples in a single chart area.But it seems that the build in charting in vb.net can't handle that. My program just crashes when adding a series somwhere between the 14th or 18th series.Anyone know of any setting i can change or a better charting plugin?

View 2 Replies

VS 2010 : Add Multiple Labels In A Single Panel?

Oct 4, 2010

im trying to add multiple labels in a single panel via code and not design thats what i got so far :

Controls.Add(hoveritem)
hoveritem.BringToFront()
hoveritem.AutoSize = True

[code]....

both test1 and test2 are registered as labels , when i hover over a picture i see only the test1 label and i dont know how to put the test2 under test1.

View 1 Replies

VS 2010 : Multiple Connections To Single Webcam?

Nov 11, 2011

I have written a program that uses directshowlib to capture a stream from a webcam and save as an AVI whenever a bird lands on the experiment platform for behavioral research. What I would like is to be able to allow another program or connection to the same webcam at the same time simply for preview purposes, is this possible?

Basically I want my app to still be able to record on demand when a bird interacts but I would also like a IP cam program like webcamXP/Webcam7 to be able to stream a live feed to the internet so we can have a live view of the platform. I had found some articles about connecting multiple streams from one webcam but am not sure how to go about it. If I have to I will simply mount a 2nd cam in the Bird colony and dedicate it to the web stream but if I can use the same cam as the recording cam that would be great.

View 2 Replies

VS 2010 Convert String To Single (Fontsize)?

Jan 28, 2011

I have a combobox which I want to use to change the font-size of text, but I'm getting an error.

vb.net Dim xfont As New Font(font_cbo.Text, font_cbo_size.Text, FontStyle.Regular, GraphicsUnit.Point)

Conversion to Type Single is invalid So I tried to convert the string to Single, but with the same error. If I replace the "font_cbo_size.Text" to a number, it'll work fine.

View 9 Replies

VS 2010 Switching DataViews For A Single DataTable?

Jan 13, 2011

I have a data table a simplified version of which is represented below:

Number | Group | Date | Client | Amount
--------+-------+-------+--------------+--------
1 | 220 | 28/12 | Company A | 0.345
--------+-------+-------+--------------+--------
2 | 220 | 29/12 | Company B | 0.451
--------+-------+-------+--------------+--------
3 | 240 | 26/12 | Company A | 0.510
--------+-------+-------+--------------+--------
4 | 240 | 27/12 | Company A | 0.510
--------+-------+-------+--------------+--------
5 | 220 | 30/12 | Company C | 0.151
etc.

I have a default view which represents the whole table.

But I need also a different view which represents the summary of the same data.

Code | Amount
------+--------
220 | 0.947
------+--------
240 | 1.02

In other words, I need grouped totals.

The question is - is it possible to accomplish by preparing a dataview for the datatable and assign it to the .DefaultView property (I need a user to be able to switch between detailed and summary views). Normally I always prepare views in a database but now I need to do it with DataTable and I simply have no experience of working with DataView class.

View 4 Replies

Is Running Multiple Threads Faster Then A Single Thread On A Single Core Cpu

Dec 23, 2009

Say I have a code with 3 methods that do some pretty intensive work. Would executing these methods on 3 seperate threads be faster then executing them one after the other on a single core cpu? And what if it's a dual core or HT?

View 8 Replies

VS 2010 - Change A Single Element Of One Of The Elements Of The Array

Jun 8, 2012

I haven't managed to find it and it is driving me nuts! If I have a structure such as

[Code]...

If I want to change a single element of one of the elements of the array, for example the DayHi field of the 0th element, then the code ATRList(0).DayHi = 4 causes the error: Error3Expression is a value and therefore cannot be the target of an assignment. Now I could get round this by reading all the items out of the 0th element into newATR, changing the field I'm interested in and then doing a "ATRList(n) = newATR" but there must be an easier way?

View 17 Replies

VS 2010 Consolidating Code - Use A Single Datasource (containing All 80 Fields)

Aug 1, 2011

I am converting a VB 6 app to VB.Net. In the vb 6 version I have a table that contains roughly 80 fields. Over that table the users currently have a single form which gives 12 diferent views. Each view is placed on a different tab, which, although giving a distinct set of fields per tab, also leads to a ton of duplicated code. Changing the underlying table is not an option.

What I would like to do is to use a single datasource (containing all 80 fields), a single datagridview on the form, and have a combobox act as the filter choice for the differing views. Does my solution seem like the right way to handle this? If so, I'm not sure I know which controls would best be used.

View 3 Replies







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