Click here to Skip to main content
15,887,027 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Send Keys to another application (Hard one) Pin
dan!sh 4-Aug-09 19:07
professional dan!sh 4-Aug-09 19:07 
GeneralRe: Send Keys to another application (Hard one) Pin
Kobi_Z4-Aug-09 21:53
Kobi_Z4-Aug-09 21:53 
GeneralNOT WORKING Pin
Kobi_Z5-Aug-09 18:40
Kobi_Z5-Aug-09 18:40 
GeneralRe: Send Keys to another application (Hard one) Pin
Kobi_Z6-Aug-09 6:48
Kobi_Z6-Aug-09 6:48 
QuestionMy First Post so be gentle ;) Problem stoppiong code from running in a closed form Pin
William Ralls4-Aug-09 7:01
William Ralls4-Aug-09 7:01 
AnswerRe: My First Post so be gentle ;) Problem stoppiong code from running in a closed form Pin
nlarson114-Aug-09 7:23
nlarson114-Aug-09 7:23 
AnswerRe: My First Post so be gentle ;) Problem stoppiong code from running in a closed form Pin
N a v a n e e t h4-Aug-09 7:43
N a v a n e e t h4-Aug-09 7:43 
GeneralRe: My First Post so be gentle ;) Problem stoppiong code from running in a closed form Pin
William Ralls4-Aug-09 9:00
William Ralls4-Aug-09 9:00 
The code that is running to populate the frmAmort form:

Private Sub frmAmort_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        ' Used as the index for the for loop
        Dim i As Int32

 
        ' We will be resetting the balance as payments are made so we need a starting balance
        Dim dBalance As Double = dPrincipal_g
        Dim dInterestPaid As Double
        Dim dPrincipalPaid As Double = dPayment_g - dInterestPaid
        Dim loops As Integer = 0

        lblHeading.Text = "Pmnt#        Balance                     Interest Paid  Principal Paid"

        ' Loop for every payment
       
        For i = 1 To iMonths_g
            ' Calculate the amount of interest paid for that month
            dInterestPaid = Math.Round(((dBalance * dInterestRate_g)), 2)
            ' Calculate the balance after the payment for that month
            dBalance = dBalance - dPayment_g + dInterestPaid


            ' Calculate the amount of principal paid for that month
            dPrincipalPaid = dPayment_g - dInterestPaid


            loops += 1
            ' Display the amounts in the listbox
            If dBalance > 0 Then

                lstAmort.Items.Add(i & Chr(9) & FormatCurrency(CDec(dBalance)) & Chr(9) & _
                                   FormatCurrency(dInterestPaid) & Chr(9) & FormatCurrency((dPrincipalPaid)))

            Else
                ' If the number is too small, it will not tab properly so add an extra tab.
                lstAmort.Items.Add(i & Chr(9) & FormatCurrency(CDec(dBalance)) & Chr(9) & Chr(9) & _
                                   FormatCurrency(dInterestPaid) & Chr(9) & FormatCurrency(dPrincipalPaid))
            End If

            ' Cause the form to display the values without waiting until control
            ' is returned to the form (process all messages in the queue).
            Application.DoEvents()


            'If we have displayed 36 months of data, then pause
            If (loops = 36) Then

                'pause the display 2 seconds (2000 milliseconds)
                Threading.Thread.Sleep(2000)

                ' reset the loop counter
                loops = 0

            End If

            lstAmort.SelectedIndex = i - 1
        Next

    End Sub

   Private Sub btnCloseAmort_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCloseAmort.Click
        Me.Close()
        frmMain.Show()
    End Sub


Thanks again for looking into this for me. the pausing is not an option. USing a gridbox maybe but I am not there yet in my training.

William
GeneralRe: My First Post so be gentle ;) Problem stoppiong code from running in a closed form Pin
Luc Pattyn4-Aug-09 15:00
sitebuilderLuc Pattyn4-Aug-09 15:00 
AnswerDataGridView Pin
David Mujica4-Aug-09 8:04
David Mujica4-Aug-09 8:04 
AnswerRe: My First Post so be gentle ;) Problem stoppiong code from running in a closed form Pin
Christian Graus4-Aug-09 13:24
protectorChristian Graus4-Aug-09 13:24 
QuestionHow to check if TCP/IP connection is active with a device Pin
sohaib_a4-Aug-09 5:26
sohaib_a4-Aug-09 5:26 
AnswerRe: How to check if TCP/IP connection is active with a device Pin
N a v a n e e t h4-Aug-09 7:45
N a v a n e e t h4-Aug-09 7:45 
GeneralRe: How to check if TCP/IP connection is active with a device Pin
sohaib_a4-Aug-09 11:42
sohaib_a4-Aug-09 11:42 
QuestionHot to read uncommon picture format? Pin
Sonhospa4-Aug-09 0:22
Sonhospa4-Aug-09 0:22 
AnswerRe: Hot to read uncommon picture format? Pin
Luc Pattyn4-Aug-09 1:16
sitebuilderLuc Pattyn4-Aug-09 1:16 
GeneralRe: Hot to read uncommon picture format? Pin
Sonhospa4-Aug-09 6:26
Sonhospa4-Aug-09 6:26 
GeneralRe: Hot to read uncommon picture format? Pin
Luc Pattyn4-Aug-09 6:52
sitebuilderLuc Pattyn4-Aug-09 6:52 
GeneralRe: Hot to read uncommon picture format? Pin
Sonhospa4-Aug-09 8:32
Sonhospa4-Aug-09 8:32 
GeneralRe: Hot to read uncommon picture format? Pin
Luc Pattyn4-Aug-09 8:44
sitebuilderLuc Pattyn4-Aug-09 8:44 
GeneralRe: Hot to read uncommon picture format? Pin
Sonhospa4-Aug-09 9:47
Sonhospa4-Aug-09 9:47 
AnswerRe: Hot to read uncommon picture format? Pin
Steven J Jowett4-Aug-09 3:49
Steven J Jowett4-Aug-09 3:49 
GeneralRe: Hot to read uncommon picture format? Pin
Sonhospa4-Aug-09 6:31
Sonhospa4-Aug-09 6:31 
Questionconnecting gmail using IMAP in VB.NET? Pin
nevincm3-Aug-09 21:16
nevincm3-Aug-09 21:16 
AnswerRe: connecting gmail using IMAP in VB.NET? Pin
Mike Ellison4-Aug-09 3:17
Mike Ellison4-Aug-09 3:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.