|
Based on a suggestion from someone on another forum, and mega frustration, I decided to abandon the current ODBC DSN. I found and installed a Visual FoxPro driver and created a new DSN using that driver.
The query is now case-sensitive as it should be.
|
|
|
|
|
How To select audio track use vb.net using cronoapi.dll?
|
|
|
|
|
Never heard of it.
I have no idea where you got it from, so I don't know where you should ask about it either.
You ask the people who write the .DLL about how to use it.
|
|
|
|
|
ChronoTron[^] it seems.
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
Yeah, I Goggled the sh*t out of the .DLL name and came up empty. Either way, the advice is still the same. ask the people who wrote it, not the people who are guessing at what you're using!
|
|
|
|
|
Dave Kreskowiak wrote: Goggled
That's your issue, you needed to Google it!
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
Damn spellcheck built into IE!
|
|
|
|
|
can't you show me how to implement it to vb.net source?
|
|
|
|
|
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...
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...
|
|
|
|
|
You should not use floating point numbers for financial calculations, as they tend not to hold exact values. Use integer values and convert all your totals to NP. You can then do the rounding quite easily by converting to whole rupees and using the remainder to decide which way to round off.
Veni, vidi, abiit domum
|
|
|
|
|
Hi Richard,
many thanks for your quick reply. But could you please help me on coding method how would I do that ?
|
|
|
|
|
When you enter the money amounts, multiply the rupees by 100 and add the paisa, to give the total and convert to (and save as) integer type. You can then perform all currency calculations on these integer values. When you wish to print or display the values you will divide by 100 to get the round number of rupees and use the Mod operator to get the remainder (paisa). You can then print the two values to give tha absolute total, or use the paisa value to decide whether to round up or down. My knowledge of Visual Basic is not very good, so you will have to turn that into code for yourself.
Veni, vidi, abiit domum
|
|
|
|
|
Thanks Richard,
Let me try it first.
Thanks again.
|
|
|
|
|
Richard MacCutchan wrote: Use integer values and convert all your totals to NP.
Or use the built-in Decimal[^] type, which does that for you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks, I forgot about that.
Veni, vidi, abiit domum
|
|
|
|
|
Hi all,
Thank you for your ideas. I solved the problem.
Thanks again...
Regards.
|
|
|
|
|
Okay, so basically I have 3 forms..
The first form asks the user questions, the second form is a loading gif while the third form processes the information into a database. So all the processing happens in the third form while the second form shows a gif saying that the form is loading.
Now when I insert a background worker into the third form, the form freezes and the second form doesnt even show up. What am I doing wrong?
This is my code:
Form 2:
Private Sub Wait1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ProfileSetup.Show()
ProfileSetup.Visible = False
End Sub
Form3:
Private Sub ProfileSetup_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Visible = False
TextBox1.ReadOnly = True
TextBox1.Enabled = False
TextBox2.ReadOnly = True
TextBox2.Enabled = False
TextBox3.ReadOnly = True
TextBox3.Enabled = False
TextBox4.ReadOnly = True
TextBox4.Enabled = False
TabControl1.Hide()
GroupBox1.Hide()
TabControl1.SendToBack()
GroupBox1.SendToBack()
CheckForIllegalCrossThreadCalls = False
BackgroundWorker1.RunWorkerAsync()
End Sub
Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
TextBox1.Text = UsersTableAdapter1.LoggedInUser(True)
TextBox2.Text = UsersTableAdapter1.PasswordGet(TextBox1.Text)
TextBox3.Text = UsersTableAdapter1.EmailGet(TextBox1.Text)
Variables.avatar = PictureBox1.BackgroundImage
original = PictureBox1.BackgroundImage
previous = PictureBox202
PictureBox202.Hide()
TextBox4.Text = UsersTableAdapter1.RankGet(UsersTableAdapter1.LoggedInUser(True))
End Sub
Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
Wait1.Close()
Me.Visible = True
End Sub
What I actually want the program to do is display form 2 with the gif while form 3 is getting ready, when it is ready form 3 opens in gui mode while form 2 closes.
Any help please?
|
|
|
|
|
|
Sorry, mind being a bit more clear?
|
|
|
|
|
More clearer than what? Did you follow the link I gave you and read the article?
Veni, vidi, abiit domum
|
|
|
|
|
Umm, yes? Im still new, I didnt exactly understand everything..
|
|
|
|
|
Suhayb Bashir Yousif wrote: I didnt exactly understand everything. Then maybe you should stop using advanced features. Seriously, you need to understand events, delegates and threading, and the implications of using them before trying to create a project such as you describe. There are many articles and books that will help you. The article I pointed you to also has links to other articles that give more details on these subjects. It is most unlikely that I could give a better explanation than is provided in them.
Veni, vidi, abiit domum
|
|
|
|
|
Suhayb Bashir Yousif wrote: So all the processing happens in the third form while the second form shows a gif saying that the form is loading. You don't need a form to do processing; put it in a separate class or module.
Suhayb Bashir Yousif wrote:
CheckForIllegalCrossThreadCalls = False "No".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Sounds good, I'll try it
And whats wrong with the CheckForIllegalCrossThreadCalls? I keep getting errors if I dont do that..
|
|
|
|
|
Because touching controls from anything other than the UI thread introduces bugs into your application that are nearly impossible to reproduce, find and fix.
That property is in there to support legacy code should not be used anymore.
|
|
|
|