Click here to Skip to main content
15,896,278 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Multiple Return Types Pin
Tom John14-Dec-04 1:12
Tom John14-Dec-04 1:12 
GeneralOpen Dialog Initial Directory Pin
kenexcelon13-Dec-04 17:29
kenexcelon13-Dec-04 17:29 
GeneralRe: Open Dialog Initial Directory Pin
Tom John13-Dec-04 22:08
Tom John13-Dec-04 22:08 
GeneralRe: Open Dialog Initial Directory Pin
kenexcelon14-Dec-04 8:34
kenexcelon14-Dec-04 8:34 
QuestionHow do u make a button link to a website? Pin
Shrex13-Dec-04 10:25
Shrex13-Dec-04 10:25 
AnswerRe: How do u make a button link to a website? Pin
Mekong River13-Dec-04 17:13
Mekong River13-Dec-04 17:13 
GeneralAdd zero to the front of a number Pin
viettho13-Dec-04 8:27
viettho13-Dec-04 8:27 
GeneralRe: Add zero to the front of a number Pin
Dennis C. Dietrich13-Dec-04 11:45
Dennis C. Dietrich13-Dec-04 11:45 
viettho wrote:
Hi, i'm doing a project and I need to add 0 to the front of a number. Is there a way to format a number?

for example: 898 become 000898


I assume you have some kind of variable where you store your number. Let's also assume this variable is an Int32 (Integer in Visual Basic). The easiest way is to use the method Int32.ToString(String)[^] and pass an appropriate NumberFormatInfo[^].
Dim myInt As Integer = 898
MessageBox.Show(myInt.ToString("D6"))

Best regards
Dennis
GeneralRe: Add zero to the front of a number Pin
viettho13-Dec-04 12:04
viettho13-Dec-04 12:04 
GeneralRe: Add zero to the front of a number Pin
Tom John13-Dec-04 22:22
Tom John13-Dec-04 22:22 
GeneralRe: Add zero to the front of a number Pin
OICU81215-Dec-04 17:08
OICU81215-Dec-04 17:08 
QuestionUPLOAD CONTROL - HELP HELP - WHICH? Pin
Purple Monk13-Dec-04 6:15
Purple Monk13-Dec-04 6:15 
GeneralPrint MsChart in VB.Net Pin
Brightday13-Dec-04 5:19
Brightday13-Dec-04 5:19 
GeneralRe: Print MsChart in VB.Net Pin
Mekong River13-Dec-04 17:16
Mekong River13-Dec-04 17:16 
GeneralRe: Print MsChart in VB.Net Pin
Brightday14-Dec-04 3:35
Brightday14-Dec-04 3:35 
GeneralRe: Print MsChart in VB.Net Pin
Mekong River14-Dec-04 11:04
Mekong River14-Dec-04 11:04 
GeneralRe: Print MsChart in VB.Net Pin
Brightday15-Dec-04 2:45
Brightday15-Dec-04 2:45 
GeneralHelp with a timeout function Pin
Nilus13-Dec-04 1:24
Nilus13-Dec-04 1:24 
GeneralRe: Help with a timeout function Pin
Dave Kreskowiak13-Dec-04 3:56
mveDave Kreskowiak13-Dec-04 3:56 
Generalstring manipultion Pin
SelvaRavi13-Dec-04 0:43
SelvaRavi13-Dec-04 0:43 
GeneralRe: string manipultion Pin
Dave Kreskowiak13-Dec-04 3:53
mveDave Kreskowiak13-Dec-04 3:53 
GeneralRe: string manipultion Pin
kostasvel14-Dec-04 16:25
kostasvel14-Dec-04 16:25 
GeneralError in program Pin
ShayShay12-Dec-04 23:35
ShayShay12-Dec-04 23:35 
GeneralRe: Error in program Pin
Tom John13-Dec-04 0:10
Tom John13-Dec-04 0:10 
GeneralRe: Error in program Pin
Dave Kreskowiak13-Dec-04 3:49
mveDave Kreskowiak13-Dec-04 3:49 

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.