"For tax purposes an item may be depreciated over a period of several years. Write a program that request a description of an item, year purchased, cost of the item, the number of years to be depreciated (estimated life) and the method of depreciation (combo box), compute and display a depreciation schedule for the item similar to the schedule below. NOTE: FOR NEXT for Straight line method, DO WHILE LOOP for sum of years, DO LOOP UNTIL display table of depreciation."i don't know it this is correct 'cos when i run it, it doesn't show anything. when i clicked compute
Public Class prjactivity6
Dim intyearp%, intlife%, intmethod%, intstraightyear%
Dim dblcost#, dblstraight#
im using Trace to trace and debug my Application which works fine. Now i wanted to output my Trace Information to a text file like below:
Dim c As Integer = Console.ForegroundColor Dim ts As TraceSwitch = New TraceSwitch("SPMassUploader-TraceSwitch", "") Dim tw As New TextWriterTraceListener(Now.ToString("yyyyMMddHHmmssfffffff") & "-" & "output.txt") Trace.Listeners.Add(tw)
I have been working on a much larger project and came to a point where I decided threading should be used.It seems in previous version of .Net, a background worker was able to update controls that were were not created on that thread. Now, it doesn't seem to be the case.I basically just began a new small project to try and teach myself the basics.Form1 Consists of A listbox, A progress bar, a label and two buttons, one to start and one to cancel.
imports system.threading private sub btngo(byval sender as system.object, byval e as system.eventargs) handles btngo.click pbprogress.minimum = 0[code=....
This code appears to be updating the listbox.I can see the vertical scrollbar getting smaller, but no data is shown in the listbox. The progressbar is also updating properly while that is working, indicating proper background operation.But what it's not doing is this:
1. Label is not updating percentage
2. The form is not free to be used by the user (me)
I've been having a problem setting certain items in a listbox as checked when the form is loaded. I have tried putting the code in the form_activate, form_load, and form_shown events and each still crashes when it encounters:
Trying to get the user to put 3 numbers in 3 text boxes and get the average.Private Sub btnAverage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAverage.Click
Dim a As Integer = CInt(txtone.Text) Dim b As Integer = CInt(txtTwo.Text) Dim c As Integer = CInt(txtThree.Text)
I've been making a scheduling program using the calendar object.I can manage to select any date with a single click with a message box pop up entering a memo for the date selected. After pressing ok, the memo is displayed in a list box, with date.
1.Unfortunately the date is being displayed twice - perhaps because i used .selectedrange in the handler ? i would like it to be listed only once
2. the memo comes up on a separate line, ideally id like it to be displayed on the same line as the date.i tried ListBox1.Items.Add(whendate, memo) but it cant compile, so ive had to put each line in seperately
3. I would like to mark the sundays and national holidays in red color (the calendar is only set for a year so i dont mind doing them by hand, however the only tool i can find in the Monthcalendar1 properties is MonthlyBoldedDates, and no color assignment [code]
I am extremely new to programming and have been asked to create a simple point of sale receipt application using VB.NET. Here are my tasks. > the application adds items to a sales receipt one at a time using an input text box and an Add to Receipt button(done)each time the Add to Receipt button is pressed, the new item price is added to a list box control which acts as the receipt and the input text box is cleared for the next entry(done)> the application should also contain output labels for subtotal, sales tax (13%), and total that should be updated whenever an item is added to the receipt(not done)> the program should use a constant for the sales tax(done)> the application should be formatted with dollar symbols and two decimal places (for cents)(done)> the application also includes a clear button which when pressed clears everything and allows the user to start a brand new sales receipt.(done)> the application also includes an Exit button that will shut down the application when clicked
I've start on another program and I'm confused whether to use a listbox or listview to display output. I have 2 books but neither mention the use of Listviews and they don't cover using Listboxes for displaying output, and will be used in combination with combo boxes as this is how the user will enter the information. I know I want to use a global variable to total scores if this makes any difference at all.
I have to create an application that will display all the odd and even numbers between the input values of number 1 and number 2. Display the output in a lstOdd and lstEven listbox.
I'd like to ask assistance for the following scenarios below:
1. I want to check whether certain applications are already running or not. 2. The applications i need to check are the ff: a. MS Word b. MS Excel c. Notepad d. MS Project e. MS Powerpoint
3. If any of these are running, the window title of that application will be filled-in in a listbox.
i am having trouble displaying the values i get from an IList(Of T) and displaying that in a listbox found on another form. I have used a for loop to get the values from the IList, then i can display that in a msgbox. for eg:
Dim j As Integer Dim path As String = "" For j = 0 To best_tour.Count - 1
[code]....
best_tour is ot type IList() path keeps the name found in the list everything works fine inside the loop..but it does not populate the lst_output listbox.I have tried using files, but in vain. It just get the values from the list but does not display that on the listbox.If that can help, then listbox is found in a panel on the form2, but taking it out of the panel does not affect anything.
I need my program to select the proper output in the listbox based on what the user input as the delivery code!I have attached the complete file that is run in Visual basics 2008 express edition.
This is the code:
Public Class frmMain Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click
I would like to create a program that will query all security permission to a given registry path. I attached the image so you have overview. I'm new to VB.Net 1/10 to rate my skill here. This will all the output I will put the output in a listbox or list view.
What I am trying to do: There are three powershell scripts with different time delays as shown below.I am trying to run them asynchronously in .NET and I followed this article to implement Asyncrhonous programming. Where I am stuck:The I am not able to retrieve output after the events are invoked.The scripts are being called but then the program ends and it shows "Press any key to continue" in console windows.I don't what I am missing here.
Info: JobRequest is a class that I use to pass around information keep track of jobs.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Microsoft.VisualBasic.Interaction.Beep() System.Diagnostics.Debug.WriteLine(3 + 2) End Sub
Why I don't see in Output window number 5 as output?
I'm just going to throw all my code in here in case there's something wrong with a piece of the code not in the "SelectName()" sub.
Module Module1 Dim selectednames As String = "" Dim index As Short = 0 Dim inarray As Boolean = False
[code]....
Here's an image of what it does (I suppose you can see what went wrong)13 inputs, 3 outputs expected, only 1 output given.As from what I've figured out so far, it's doing the correct amount of loops etc. It's just as soon as it starts generating the "winner" for the 2nd game key it doesn't get a string value from namesarray.Also, why is
For x = 0 To totalnames - 1 Debug.Print("namesarray(" & x & ") = " & namesarray(x)) Next
If I set a ListBox.Height = ListBox.PreferredHeight when the control is hidden and IntegralHeight = True, then set it visible:
a) Actual Height reduces by typically 3-5 pixels after redraw (but not 1 pixel per item).
b) PreferredHeight does not not appear to give the correct integral of item heights.
Is there a way to make ListBox calculate the correct integral Height before the ListBox is made visible, so it can be correctly pre-positioned from bottom edge?
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
I have a Datagridview collections embedded in several Tabpages of a TabControl. I want to use to control Button to import data to the datagridview. Data is different for different datagridview. I want to know which DataGridView is currently shown (on the top) when I click the control button so that I can send corresponding data to it. What shall I do?
I have a form consisting of datagridview and two buttons of update and load all.. I have used fillby method to obtain data from database. The query seems to be working fine, except that the data is not shown in the gridview. As in, for the qeury, if the returned rows are 2, it will show 3 rows in the gridview, but all empty.
I'm using Windows 7 Aero DesktopI've seen in many applications like Google Chrome, Microsoft IE that when a download is in progress, the windows taskbar shows the progress of it's download something like in green color.