Click here to Skip to main content
15,889,505 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionfail to add data into database... Pin
zaimah9-Mar-09 17:43
zaimah9-Mar-09 17:43 
AnswerRe: fail to add data into database... Pin
Yusuf9-Mar-09 17:53
Yusuf9-Mar-09 17:53 
GeneralRe: fail to add data into database... Pin
zaimah9-Mar-09 18:03
zaimah9-Mar-09 18:03 
GeneralRe: fail to add data into database... Pin
Christian Graus9-Mar-09 18:32
protectorChristian Graus9-Mar-09 18:32 
GeneralRe: fail to add data into database... Pin
zaimah9-Mar-09 18:53
zaimah9-Mar-09 18:53 
QuestionFormat Numbers in Visual Basic Listbox Pin
NMIB9-Mar-09 10:26
NMIB9-Mar-09 10:26 
AnswerRe: Format Numbers in Visual Basic Listbox Pin
0x3c09-Mar-09 10:56
0x3c09-Mar-09 10:56 
AnswerRe: Format Numbers in Visual Basic Listbox Pin
supercat99-Mar-09 11:29
supercat99-Mar-09 11:29 
You could convert each number to a string using either String.Format or its ToString property, specifying a format that you like. If you do that, you'll have to convert the string back to a number when somebody selects an item; the conversion back to a number may not be exact.

Alternatively may could define a class which holds a number but defines a 'toString' function that formats numbers the way you want (indeed, the numeric format may be defined as a property of the class). Doing this would allow you to easily determine the exact (rather than represented) value of whatever the user clicked on. You could also store any other desired information in your class. If you define iComparable within your class, you could also take advantage of the ListBox's ability to sort its items (which you could not do very well if the ListBox just held strings.
Public Class numThing
    Implements IComparable(Of numThing)

    Public myVal As Double
    Public Overloads Function toString() As String
        Return myVal.ToString("0.0000")
    End Function

    Public Function CompareTo(ByVal other As numThing) As Integer Implements System.IComparable(Of numThing).CompareTo
        Return myVal.CompareTo(other.myVal)
    End Function
End Class

GeneralRe: Format Numbers in Visual Basic Listbox Pin
0x3c09-Mar-09 11:31
0x3c09-Mar-09 11:31 
Questionget URL from previous web page Pin
edwin_nice9-Mar-09 5:32
edwin_nice9-Mar-09 5:32 
AnswerRe: get URL from previous web page Pin
Eddy Vluggen9-Mar-09 5:40
professionalEddy Vluggen9-Mar-09 5:40 
AnswerRe: get URL from previous web page Pin
edwin_nice9-Mar-09 6:04
edwin_nice9-Mar-09 6:04 
Questionhi Pin
mouhamad rayed8-Mar-09 23:21
mouhamad rayed8-Mar-09 23:21 
AnswerRe: hi Pin
dan!sh 8-Mar-09 23:57
professional dan!sh 8-Mar-09 23:57 
AnswerRe: hi Pin
Eddy Vluggen9-Mar-09 0:40
professionalEddy Vluggen9-Mar-09 0:40 
AnswerRe: hi Pin
Jon_Boy9-Mar-09 6:34
Jon_Boy9-Mar-09 6:34 
AnswerRe: hi Pin
0x3c09-Mar-09 7:02
0x3c09-Mar-09 7:02 
Questionproblemme capture picture from webcam programme not install on visual studio 2008 Pin
mouhamad rayed8-Mar-09 23:18
mouhamad rayed8-Mar-09 23:18 
AnswerRe: problemme capture picture from webcam programme not install on visual studio 2008 Pin
Dave Kreskowiak9-Mar-09 2:17
mveDave Kreskowiak9-Mar-09 2:17 
GeneralRe: problemme capture picture from webcam programme not install on visual studio 2008 Pin
Jon_Boy9-Mar-09 6:41
Jon_Boy9-Mar-09 6:41 
Questionhi all Pin
vidhish8-Mar-09 21:04
vidhish8-Mar-09 21:04 
AnswerRe: hi all Pin
Rupesh Kumar Swami8-Mar-09 21:52
Rupesh Kumar Swami8-Mar-09 21:52 
AnswerRe: hi all Pin
Eddy Vluggen9-Mar-09 0:41
professionalEddy Vluggen9-Mar-09 0:41 
AnswerRe: hi all Pin
Jon_Boy9-Mar-09 6:34
Jon_Boy9-Mar-09 6:34 
AnswerRe: hi all Pin
0x3c09-Mar-09 6:55
0x3c09-Mar-09 6:55 

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.