Save Actual Age (in Whole Years) For Future Use In The Program?
Jan 20, 2009
I need to save actual age (in whole years) for future use in the program. The problem is, 'Years' returns a big, fat 0 every time. Changing "Dim years As Integer" to Dim years As String" does exactly the same thing.
Code:
Dim myDate = New Date(Convert.ToInt32(Year.Value), Month.SelectedIndex + 1, Convert.ToInt32(Day.Value))
'If Month, Day, or Year not selected then
Create a project that determines the future value of an investment at a given interest rate for a given number of years. The formula for the calculation is Future value = Investment amount * (1 + Interest Rate)^ Years..Form- Use labeled text boxes for the amount of investment, the interest rate (as a decimal fraction), and the number of years the investment will be held. Display the future value in a text box formatted as currency. Include buttons for calculate, Clear, Print, and exit. Format all dollar amounts. Display a message to the user for nonnumeric or missing input data.Remember that the result of an exponentiation operation is a Double data type. Interest rate is annual.So far this is what I have and I am missing something(s) in the calculate process.[code]
Suppose $800 is deposited into a savings account earning 4% interest compounded annually, and $100 is added to the account at the end of each year. Calculate the amount of money in the account at the end of 10 years. Determine a formula for computing the balance at the end of one year based on the balance at the beginning of the year.Allow the user to input the beginning balance and the amount to be contributed at the end of each year. You must a loop in this program. [code] I cannot figure out how to make the previous years balance become the next years and so forth.
I want to save an excel file with the following prefix: Order-Monday for Mondays, Order-Tuesday for Tuesdays etc and then this file will be overwritten the next week. For the following bit of vb
the Now().DayOfWeek returns '5' apart from doing a case expression to decipher 1-7 as days of the week is there any other way I can get lstrDateStamp = DAY (i.e. Friday)
program that allows the user to enter a month and a number of years. (e.g March and 10 years) The program then displays all the months of the year from the entered month in a loop that runs as many times as the number of years.(e.g March April May.....December January February March....)
The program I am working on uses arrays and a text file. In one section of the program it's suppose to display the most active year for storms between the years 1990-2008. The year that has the most active storms is 2005, but I don't know how to write it in the code so that it displays. Attached is the text file.
So far I have a For Next loop that counts the arrays.
Public Class frmHurricanes ' Class Level Variables Public Shared _intSizeOfArray As Integer = 18
Is it possible to make a program with visual basic 2010 that does not use the actual form but instead only uses other components (e.g. Message Box) to form a complete program?
I'm creating a program and i want it to secretly save when the user clicks on save.
In other words, i have made it so that it saves twice. Once for the user to read (like a fancy copy) and another that the program uses to open up the form.
Currently when pushed, 2 save dialog boxes come up after each other. I don't want this to happen. I want 1 to come up (the user friendly, fancy version) which is the easy part, but i also want the other 1 to save automatically and secretly without asking the user to set the destination.
I almost have this text editor/Stopwatch/Calculator program done. I am having mojor difficulties to get this code for Save and for Save As to work properly. I do not have code for save yet. When I click on Save I want it to save without popping up the dialog box. I do not have code for Save yet. When I click on Save As I want the popup box to show. Here is the code I have for Save As:
Imports System.Data.OleDb Public Class Form2 Dim Conn As OleDbConnection [code]...
this is my codes in vb?I am thinking what is the error in this code?because everytime I execute this There is an error appearing in this part OleA.Fill (DSSearch, 0) it says that "No value given for one or more required parameters." so, what should i need to do?
I know the WOW environment is currently shipping on Windows 7 and 2003/2008 MS server products to enable the use of 32-bit applications. But does anyone have any thoughts on whether they are going to provide this environment on PC and server operating systems beyond Windows 7?
I know that the runtime files (DLL, etc.) will not be provided beyond Windows 7 for 32-bit VB 6.0 applications to run on.
I am performing a migration on a vb6 program, to vb.net. The basic knowledge you need to understand this question is that there are two forms that need to talk to each other, frmInput1 and frmInput2. I have the following code (behind frmInput1) that checks if a textbox on frmInput2 has a certain value, seemingly before it has loaded:
I need to replace something that's going to change in the future and I don't know what that's going to be, so is that possible? I'm talking about Flash Player, current version is 11.1.102.55 and I can replace that with nothing, but if that version is changed my text replace wont work. I have one empty space after flashVer=WIN 11,1,102,55. Textbox1.Text = Textbox1.Text.Replace("flashVer=WIN 11,1,102,55", "")
I'm creating an application software. It has many features, which is in the base version of the software. And people could buy my software (which will be enough for most of them since it had all the common features needed) and use it. But some of them might need additional features to this version.So, I can add new features to the base version of my product and provide them a custom or extended version.
But my question is, how can I effectively manage these versions of the software while updating (or upgrading with new features which are common to all of them)
[Code]...
In the above example F1, F2, F3, F4 & F5 are the features available common for all editions of my software.Whereas, A1, A2, A3 & A4 are the additional features added based on customer's request.
Ok major problem with a paint program i am making. When i have a window overlap or anything and move to side of screen and minimize and maximize i lose whats in the picturebox...Here is an example of the code I use to draw a line after click a button:
Private Sub btndraw_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlinedraw.Click lxs = txtslinelocationx.Text lxe = txtelinelocationx.Text[code].....
Here is a picture of my program running: How do I stop everything being deleted when things pass it...? how can i add a save feature to this program?
I'm using the ASP.Net Membership system but I'm having an issue with the LastActivityDate for the users in the database. For some users, their last activity date is in the future...
I'm automating some outlook functionality in a .NET app. It works great. I am compiling it and using v 12.0.0.0 of the Outlook Interop assembly. My code should work on any version of Outlook so it seems silly to have to bind it to a specific version. Is it possible to use reflection to do this instead of compiling a reference? Are the interop assemblies on PC's by default that have Office installed anyway or do I need to include them with my application?
After right clicking on the form Context Menu give option to see 'View Code Window' which opens the the view code window and shows from the first line of code in the file, where actually it should show Event handlers related to the control on which Mouse was right clicked. right now we have to go through the line of codes to locate the event related to particular control.Also after double clicking on the control, VB inserts a default event handler to Code file which should happen only when there is no Event Handlers added for that control previously & if a previously added Event Handler present, double clicking controls should locate that procedure.[code]after dragging dataset table to the form vb assigns 'field name' concatinated with 'TextBox' to TextBox Control likewise 'field name' concatinated with 'ComboBox' for ComboBox Control where it is difficult to locate them in Controls Member list into code..Instead why don't you prefix them with 'txt' for TextBox, 'cbo' for ComboBox etc. It is then easy to find one in code. Or make the original Optional.
I have a form where a user can choose an election date. One of the most frequent errors users make is entering the incorrect due dates of reports. Therefore, I am attempting to generate the report due dates in the application using the report guidelines. For instance, reports are due 32 and 15 days prior to the election and 30 and 60 days after an election.
I know the following won't work but you get the jest of what I am attempting to do. I am assuming I will need to break down the month, day and year somehow before I subtract or add the days to the date to get the actual report date.
I need to have the Calendar Control start 36 hours after the current date. How would I do that?
I have a form that requires that the future date has to be at least 36 hours from the current date in the order for the workers involved to be able to complete the task.
check values and keep the form from processing:
Protected Sub calPickupDate_SelectionChanged(sender As Object, e As System.EventArgs) Handles calPickupDate.SelectionChanged If calPickupDate.SelectedDate < Today.AddHours(36) Then
I am at the stage of planning the application which will conect to a Ms SQl database, and process some data to Excel files.The problem is, that i would like to make a base pure application, without any functionality, and then add functionalities by adding some external files with code to program folder.I`not sure if what i just wrote is clear. To simplify:I would like to have an application which connects to a database, but let`s say when after 1 year, i will be in need of some more functionality, i woun`t have to change the code of whole application, but can just add a new file, and when I run the application there will be one more function to be chosen from the list.
I am stuck, I am doing a Case Statment and this loop to calculate pay per hour and thexpected raise percentage on 40 hr week @ 52 wks per yr. THe raise increase each amount after the first year.The display for next 10 years is the head bump. Any suggesions will be tried. In this loop trying to get the 1 year values to add the intrest rate to the following 10 years is something I can not seePrivate Sub btnCalculatePay_Click(ByVal sender As System.Object, ByVal e As ystem.EventArgs) Handles btnCalculatePay.Click
how to disable the datetimepicker dates in the future and also all the weekend dates but i am unable to find any! Only thing i can find is ASP.net code.
I am trying to flag rows in a grid in the following order based on a date column
When 2 or more days old from today then RED When 1 day old then YELLOW When 0 days old then GREEN When the date is in the future then BLUE
I have the following which is working fine except for the future dates which are GREEN instead of BLUE.
Dim myDate As DateTime = CType(grdSummaryView.GetRowCellValue(e.RowHandle, "myDate"), DateTime) Select Case Now.Subtract(myDate).Days '2 or more days old then RED FLAG Case Is >= 2