PDA

Click to See Complete Forum and Search --> : Another INI Problem - or better,the same


VBrazil
Dec 2nd, 1999, 02:05 AM
I deserve a Great Sorry to the user that has replied to the other INI problem.It is the same, but I cannot find my message in the server.Well, here we go again:

In a list box that must display the following form: Amount X One Unit Price = Total Price. Here is the command:

lstTotal.AddItem (txtQuantidade & " X " & Trim(Temp) & " = " & txtQuantidade * Trim(Temp))

But, It displays only this: Amount X One Unit Price.

Here is the complete command:

Private Sub Command8_Click()
TotalTemp = Text1.Text
Dim ret As Long
Dim Temp As String * 50
Dim lpAppName As String, lpKeyName As String, lpDefault As String, lpFileName As String

lpAppName = "Precos"
lpKeyName = txtNome.Text
lpDefault = "c:\Util\Lojas\preview.ini"
lpFileName = "c:\Util\Lojas\preview.ini"

ret = GetPrivateProfileString(lpAppName, lpKeyName, lpDefault, Temp, Len(Temp), lpFileName)

If txtQuantidade = "1" Then
lstUnitario.AddItem Trim(Temp)
lstTotal.AddItem Trim(Temp)
lstProduto.AddItem txtNome.Text
lstQuantidade.AddItem txtQuantidade.Text
Text1.Text = TotalTemp + (txtQuantidade * Trim(Temp))
ElseIf txtQuantidade = "0" Then
MsgBox "Quantidade é igual a 0!!", vbOKOnly, "Erro de Compreensão"
Else
lstUnitario.AddItem Trim(Temp)
lstTotal.AddItem (txtQuantidade & " X " & Trim(Temp) & " = " & txtQuantidade * Trim(Temp))
lstProduto.AddItem txtNome.Text
lstQuantidade.AddItem txtQuantidade.Text
Text1.Text = TotalTemp + (txtQuantidade * Trim(Temp))
End If
End Sub

------------------
--Alex