VS 2010 Book Penalty Computation?
Mar 23, 2012
I have a 2 DateTimePicker on my design.1 DateTimePicker for Due Date and another 1 DateTimePicker for Date Returned. Now I would like to automatically compute for penalty which is 24 per day just clicking on the Date Returned's DateTimePicker.For example,A student borrowed a book today and the librarian assigned the due date when to return it.
Take note, the date today is 03/23/2012.and the librarian assigned a due date into 03/25/2012 (the exact date when the student should return it).When the student attempts to return the book at 03/28/2012, and the librarian clicks on the Date Returned's DateTimePicker, the penalty will show as 72 and so on and so for.So I am asking on the codes or tips on how should i do it to make this things work?
View 1 Replies
ADVERTISEMENT
Feb 22, 2012
I have been trying to compute the checksum for a line of hex code. This is to create a hex file which will be loaded onto an embedded micro.Some of you guys may not know how this is done so very briefly:
a line of hex bytes:
: 10 01 00 00 21 46 01 36 01 21 47 01 36 00 7E FE 09 D2 19 01 40
The underlined bytes are taken and summed. (in this case the decimal 960). and the bold is the checksum Only the 8LSB (or single least significant byte) is needed to compute the checksum... which in this case, 960 = 03C0 in hex, so only C0 is needed.Two's complement is then taken:
step 1) logical not of C0 which is
step 2) add one (integer)
BIN...........DEC...HEX
[code]....
So here is the code I have been using: (quick mention that in the string passed, the hex bytes are all grouped together, there are no space characters)
Public Sub CreateLine(ByVal Data As String)
'Dim BDataArray(DataLength) As Byte
Dim IDataArray(Data.Length) As Integer
[code]....
where i get into trouble is where i commented 'i get into trouble'. My code works, but it's rather crude Now, in that line i first convert the hex value (string) "SChecksum" into an integer. I want to NOT this, so I get my step 2 from my explanation. However, the results appears to be a signed logical NOT. which gives me the wrong answer. My hashed togther version simply subtracts 256 before the not, in order to give me the correct answer.
Basically, I would love for someone to chime in and point out the flaws in my function, and push me towards figuring out the 'proper' way of doing this. Also I can't quite wrap my head around what would happen in the case a string were passed to my function that is over 16 bits, but I imagine I would have to subtract a larger value than 256, before doing the NOT in this case?(whilst we're on the subject of functions, I've used a 'sub', in which case should I used a sub, and which case should I use a function?).
View 4 Replies
Oct 28, 2009
how to load data (Book) to text box when user just enter the book code?how to load data (student) to text box when user just enter the student id?how to write the code when user click the save button , the book quantity(Book) will reduce 1 and the all the data in textbox will save in database(Issue)the interface is like
[URL]
the database is show at
[URL]
the code is
Public Class frmIssue
Dim dt As New DataTable()
Dim rowIndex As Integer = 0
Dim rowIndex1 As Integer = 0
[code]....
View 2 Replies
Dec 29, 2011
Can anyone recommend a good VB book that will teach functions, file IO, arrays, recursion etc. A lot of the ones I have looked at are very basic I started Sam teach yourself VB 2010 in 24hrs but a lot of it didn't relate to what we do in college.
View 2 Replies
Oct 26, 2009
I want to add an address book to my emailer. I have 2 buttons on my main form,
button1 = Add Contact To Address Book , button2 = Import Email Address.
Basically when I click add I want another form to open and the user to be able to add an email address and save it and if I click import I want the same form as the "Add contact" and enable the user to select a contact and add it to textbox1 on my main form.
View 22 Replies
Feb 2, 2012
I am trying to search my GAL, as my GAL contains over 300k names its not ideal to load the complete list. Now, I found some code on MSDN which allows me to read the GAL, but I can figure out how to search. I would need to use a similar to the SQL LIKE% as there multipul exchange users with the same surname.
MSDN Code.
Dim itemx As ListViewItem
' Create an Outlook application.
Dim oApp As Outlook._Application = New Outlook.Application()
[code].....
View 3 Replies
Jun 21, 2010
How can I get the value of the year, month and/or day from the DateTimePicker if I'm trying to compute for the age? I've tried
Dim x As String = ""
x = Date.FromOADate(Val(DateTimePicker1.ToString))
MsgBox(x)
But it only gave me 12:00 AM.
and
DateDiff(DateInterval.Year, DateTimePicker1, Now.Date)
This time it said datetimepicker1 cannot be converted to date.
View 2 Replies
Oct 6, 2011
I am working on program in vb2008 and facing problem in making a PAYROLL SYSTEM.. well, I've done some of its parts and functions but the main part of it is still unsolved -- the computation of tax!! our boss want that when you input a basic monthly salary, the semisalary will be computed.. minus the sss, pag-ibig and philhealth.. then the tax will be computed but also depending on the number of dependents the employee have...
Code:
Private Sub semiSalary_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles semiSalary.Click
If basicSalary.Text = "" Then
MsgBox("Please enter a salary.", MsgBoxStyle.Exclamation, "Invalid")
Else
Dim result2 As Double
[Code] .....
What I've done is that I'm trying to display those values when the the textbox corresponding to it was clicked. We get each value in our database stored on textboxes from the formtables of sss & philhealth.
Attached image(s)
View 5 Replies
Jan 28, 2009
How to display computation process on VB 2008 form?
View 3 Replies
Aug 28, 2009
[code]...
i would like to have a computation on the table (in sql) im creating en example computation:
Dim FiKg As Integer = ((txtFeNum.Text * txtFiFe.Text + txtMaNum.Text * txtFiMa.Text) * 7 / 1000)
Dim FemaleNum As String = txtFeNum.Text
Dim MaleNum As String = txtMaNum.Text
[code]...
View 1 Replies
Jun 22, 2010
i'm still developing my project bout evaluation of employees. I'm using the code below,I want to multiply the values of the two specific row/column inside my datatable and then insert the product in the KPIGRDEQUI field in the KWEEKDTL table.Is it possible to be done?
[Code]...
View 1 Replies
Aug 29, 2009
for example i have this table
x ! y ! z ! Result !
54 ! 12 ! 5 ! !
54 came from --> Textbox1.Text
12 came from --> Textbox2.Text
5 came from --> Textbox3.Text
and i will display the result at row rowResult
[Code]...
View 1 Replies
Jul 2, 2011
im having a simple computation problem here....
[Code]....
View 2 Replies
Apr 3, 2012
I recently made a change to the code within a loop in my code, and now when I run the code through Visual Studio 2010 Express, the loop runs about 10x slower than the previous loop.I did not make any significant changes (to my knowledge) to the code within the loop.I made the change so that the loop could handle various conditions I imposed in another section of the code.I know that it is this loop that is slowing everything down because I report the loop progress on my form.[code]I feel like my changed code should run better, but it doesn't.I know that my code is not written very efficiently (and feel free to comment on ways to improve it), but my main concern is the significant increase in computation time that resulted from my changes.The loop above is the main block of code within the Sub, which is run via a thread.In my tests, it is the only thread running at that time.Everything works, and the computation yields the correct result, but takes 10x longer than previously. Additionally, the number of iterations does not increase.So the new code isn't iterating excessively, it is simply taking much longer to compute within each iteration.
View 19 Replies
Jan 27, 2011
I'm looking for a book that is pretty much A-Z for LINQ programming from Visual Basic. I am particularly interested in LINQ to SQL. I've found "Programming Microsoft LINQ in Microsoft .NET Framework 4" and while its description sounds interesting, there is no discussion on the book at all . Do any of you have any experience with this book? If so, what do you think of it?
View 3 Replies
Feb 16, 2010
I have been working on a project for some time now and I am stuck. I am trying to sense when a navigation software speaks so i can mute the volume of everything else on the computer.
my problem is that i cant properly sense the audio of the software. i am using windows 7 and vb.net. i have done a good amount of research, but i have not come up with an answer.
i am almost positive that i need to intercept the win32api call of the software to trigger the mute that i will use. i dont know how to do this, all the information i can find that is even close to this subject is for 98, nt and 2k.
does anyone know of any books (or websites) that contain information on this subject?
View 1 Replies
Sep 30, 2009
I just wonder that somone can give me propositions for some good books to learn VB.net / VB2008.. I know the basics.. So I think of not a book like for dummies.. Just something more a step forward for new things to learn.
View 5 Replies
Aug 2, 2009
I was wondering what books/items you guys would recommend to read in regards to VB programming and/or programming in general.
View 9 Replies
Mar 2, 2011
i am searching a good book to learn ADO.NET 4.0,book should be excellent technical overview with practical examples,I want to learn ADO.NET Where should I start?
View 1 Replies
Feb 16, 2010
What I'm Not looking for:Now, just to be clear, i'm not looking for VB6 to C#.Net content, as i know there are a few of those out there.Also, I know about that "syntaxconversion table" website, where it compares VB.Net to C# language features in a side by side table. I am not interested in this either, already know about it.I'm also not looking for a converter, which converts C# code to VB.Net and visa versa, i know there are a few websites which do this and already have the addresses.Finally, I'm not looking for a C# book or resource that caters to current programmers, but specifically to VB.Net programmers!
What I Am looking for:To learn C# (VS2008 or preferably VS2010 version) given that i already know VB.Net 10.0 (VS2010)... as there are many things related to .NET that i won't have to learn again if i can find something that will leap me from vb.net to c#, many bits of the CLR, how .NET works etc... since the languages are the same in what they do, and what they use to do them, i don't want to have to re-learn all this again. The only difference is really the syntax, but also how the C# language differs in dealing with certain things, what default expectations/behaviours are in various scenarios etc...
The set of differences and similarities between C# and VB.Net are so unique that neither of these languages likely could share this unique set/combination of differences and similarities with any other language. So my point is, it really needs to be C# for VB Developers oriented, otherwise it'll almost cetainly be inappropriate or a re-hashing!
View 5 Replies
Aug 16, 2010
The problem is in the line that contains address.save(filename) the part address.save is underlined. When I backspace over the save, it gives me the options of what can go there and save isnt one of them. I am coping this out of a book.[code]...
View 1 Replies
Apr 21, 2010
I am starting off in the .NET world and wanted to know what a great beginner book would be that would explain how to use asp.net, vb and SQL.
I hear "Learning Visual Basic" is a good series but wanted to see if there were anymore out there.
View 1 Replies
Oct 19, 2009
Is it possible to run vb dot net project on Apple (Mac) Book.
View 1 Replies
Nov 9, 2009
I have the vb books of 2005. Should I buy some new books ? Should I start with vb latest versions?
I'm starting as a self-learner and a little bid advanced learner. Few months later my university will start it.
View 2 Replies
Mar 9, 2010
I am really interested in learning VB .net, but I don't really know where to start. Could anyone recommend a good book or website to start learning.
View 15 Replies
Jul 28, 2010
May I expose my "small" problem?Here, i'm following a course in my University, called Introduction to Programming, there are only beginners in our class. i'm also a newbie, to say so.And some stupid students were not paying attention so he gave us a crazy assignment for Friday 30th.This is what his assignment consists in. I have created a PDF file from his requirements and some samples of Code.[url]
View 6 Replies
Mar 23, 2009
Is there a book for learning the microsoft windows form chart control?
View 3 Replies
Jul 29, 2009
I need to develop an application that can search through a book and list out all the pages and lines that contain a given keyword. For books that are split up in some other way, such as a bible which is split up by chapter and verse; they would be able to search for all verses that contain a certain keyword. Or alternatively, search within certain chapters and verses for a keyword. What format should I store the book into? Should it be stored into a SQL database? What format would be easiest for searching as opposed to easiest for storage?
View 7 Replies
Apr 11, 2011
Suppose a teacher has five students who have taken four tests. The teacher uses the following grading scale to assign a letter grade to a student, based on the average of his or her four test scores.
Test Score Letter Grade
90-100 A
80-89 B
[code].....
View 1 Replies
Jan 6, 2010
I need to get friends list (from address book) from Yahoo Mail. How can I do do this in VB.NET?
View 1 Replies