Click here to Skip to main content
15,891,136 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionSelect Audio Track Pin
Andre.Adrian23-Sep-13 0:32
professionalAndre.Adrian23-Sep-13 0:32 
AnswerRe: Select Audio Track Pin
Dave Kreskowiak23-Sep-13 1:23
mveDave Kreskowiak23-Sep-13 1:23 
GeneralRe: Select Audio Track Pin
Brisingr Aerowing24-Sep-13 11:39
professionalBrisingr Aerowing24-Sep-13 11:39 
GeneralRe: Select Audio Track Pin
Dave Kreskowiak24-Sep-13 12:05
mveDave Kreskowiak24-Sep-13 12:05 
JokeRe: Select Audio Track Pin
Brisingr Aerowing24-Sep-13 14:23
professionalBrisingr Aerowing24-Sep-13 14:23 
GeneralRe: Select Audio Track Pin
Dave Kreskowiak24-Sep-13 15:45
mveDave Kreskowiak24-Sep-13 15:45 
GeneralRe: Select Audio Track Pin
Andre.Adrian25-Sep-13 23:42
professionalAndre.Adrian25-Sep-13 23:42 
QuestionCurrency Round Off Pin
Biplob Singha Shee22-Sep-13 4:09
Biplob Singha Shee22-Sep-13 4:09 
Hi all,

I am trying to create a sales invoicing system. Everything is OK but I want to round off (+ or -) the value.

Suppose if Invoice Amount is Rupees 2500.65/-

The round off amount will be Rupees 2501.00/- (i.e. 2500.65 + 0.35)

but if the Invoice Amount is Rupees 2500.45/-

The round off amount will be Rupees 2500.00/- (i.e. 2500.45 - 0.45)

I tried the following function...
VB
Private Function CalculateRoundOffAmount(ByVal autoCalculateRoundOff As Boolean) As Double
        
        Dim result As Double = 0.0
        
        result += CDbl(Me.TbRoundOff.Text)
        Dim roundOff As Double = 0
        Dim roundedOffTo As Double = 0
        If autoCalculateRoundOff = True Then
            roundOff = Math.Ceiling(result) - result
        Else
            roundOff = Me.TbRoundOff.Text
        End If
        roundedOffTo = result + roundOff
        Me.TbRoundOff.Text = roundOff
        Me.TbInvoiceValue.Text = roundedOffTo
        Return roundedOffTo
    End Function

TbRoundOff = A TextBox where the round off amount will be calculated and TbInvoiceValue.Text is the textbox where invoice value is being calculated.

and I implemented it in SaveData() method like CalculateRoundOffAmount(True) but nothing happened.

Please help...
AnswerRe: Currency Round Off Pin
Richard MacCutchan22-Sep-13 4:55
mveRichard MacCutchan22-Sep-13 4:55 
GeneralRe: Currency Round Off Pin
Biplob Singha Shee22-Sep-13 6:00
Biplob Singha Shee22-Sep-13 6:00 
GeneralRe: Currency Round Off Pin
Richard MacCutchan22-Sep-13 7:01
mveRichard MacCutchan22-Sep-13 7:01 
GeneralRe: Currency Round Off Pin
Biplob Singha Shee22-Sep-13 7:13
Biplob Singha Shee22-Sep-13 7:13 
GeneralRe: Currency Round Off Pin
Richard Deeming23-Sep-13 1:56
mveRichard Deeming23-Sep-13 1:56 
GeneralRe: Currency Round Off Pin
Richard MacCutchan23-Sep-13 3:05
mveRichard MacCutchan23-Sep-13 3:05 
AnswerRe: Currency Round Off Pin
Biplob Singha Shee23-Sep-13 10:21
Biplob Singha Shee23-Sep-13 10:21 
QuestionHow to use Background worker from a form to fill another form? Pin
Suhayb Bashir Yousif20-Sep-13 22:47
Suhayb Bashir Yousif20-Sep-13 22:47 
AnswerRe: How to use Background worker from a form to fill another form? Pin
Richard MacCutchan21-Sep-13 0:03
mveRichard MacCutchan21-Sep-13 0:03 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Suhayb Bashir Yousif22-Sep-13 4:40
Suhayb Bashir Yousif22-Sep-13 4:40 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Richard MacCutchan22-Sep-13 4:51
mveRichard MacCutchan22-Sep-13 4:51 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Suhayb Bashir Yousif22-Sep-13 4:58
Suhayb Bashir Yousif22-Sep-13 4:58 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Richard MacCutchan22-Sep-13 5:09
mveRichard MacCutchan22-Sep-13 5:09 
AnswerRe: How to use Background worker from a form to fill another form? Pin
Eddy Vluggen21-Sep-13 8:44
professionalEddy Vluggen21-Sep-13 8:44 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Suhayb Bashir Yousif22-Sep-13 4:41
Suhayb Bashir Yousif22-Sep-13 4:41 
GeneralRe: How to use Background worker from a form to fill another form? Pin
Dave Kreskowiak22-Sep-13 8:53
mveDave Kreskowiak22-Sep-13 8:53 
Questionthread runs 21 times then exits Pin
Member 1028281518-Sep-13 7:32
Member 1028281518-Sep-13 7:32 

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.