Click here to Skip to main content
16,006,006 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to change the datagrid column based on an adjacent column's true or false Pin
nlarson111-Nov-06 6:50
nlarson111-Nov-06 6:50 
QuestionEvent Pin
Socheat.Net31-Oct-06 16:01
Socheat.Net31-Oct-06 16:01 
AnswerRe: Event Pin
Alex Feature31-Oct-06 19:31
Alex Feature31-Oct-06 19:31 
GeneralRe: Event Pin
Socheat.Net3-Nov-06 15:38
Socheat.Net3-Nov-06 15:38 
QuestionCrystalReports in vb.net: How to change SqlSelectCmd used for a report Pin
mp000131-Oct-06 14:18
mp000131-Oct-06 14:18 
QuestionFormating strings in VB6 Pin
No-e31-Oct-06 10:08
No-e31-Oct-06 10:08 
AnswerRe: Formating strings in VB6 Pin
SNathani31-Oct-06 15:46
SNathani31-Oct-06 15:46 
AnswerRe: Formating strings in VB6 Pin
Guffa31-Oct-06 20:00
Guffa31-Oct-06 20:00 
A text file has no formatting capabilities, so you have to use spaces to line them up, and specify for anyone who will be using it to use a non-proporional font when displaying it.

You can use alignment in composite formatting to line up the columns. Example from MSDN:

string myFName = "Fred";
string myLName = "Opals";
int myInt = 100;
string FormatFName = String.Format("First Name = |{0,10}|", myFName);
string FormatLName = String.Format("Last Name = |{0,10}|", myLName);
string FormatPrice = String.Format("Price = |{0,10:C}|", myInt); 
Console.WriteLine(FormatFName);
Console.WriteLine(FormatLName);
Console.WriteLine(FormatPrice);

FormatFName = String.Format("First Name = |{0,-10}|", myFName);
FormatLName = String.Format("Last Name = |{0,-10}|", myLName);
FormatPrice = String.Format("Price = |{0,-10:C}|", myInt);
Console.WriteLine(FormatFName);
Console.WriteLine(FormatLName);
Console.WriteLine(FormatPrice);

Example output:
First Name = |          Fred|
Last Name = |         Opals|
Price = |           $100.00|
First Name = |Fred      |
Last Name = |Opals     |
Price = |$100.00   |



---
b { font-weight: normal; }

GeneralRe: Formating strings in VB6 Pin
ChandraRam31-Oct-06 23:05
ChandraRam31-Oct-06 23:05 
QuestionHow do you set the DateTimePicker at runtime ? Pin
Shawn Owens31-Oct-06 10:03
Shawn Owens31-Oct-06 10:03 
AnswerRe: How do you set the DateTimePicker at runtime ? Pin
Dave Kreskowiak1-Nov-06 4:05
mveDave Kreskowiak1-Nov-06 4:05 
Questionaccessing data from another programs form Pin
njdnjd31-Oct-06 9:54
njdnjd31-Oct-06 9:54 
QuestionFormat number Pin
jds120731-Oct-06 9:01
jds120731-Oct-06 9:01 
AnswerRe: Format number Pin
Christian Graus31-Oct-06 9:14
protectorChristian Graus31-Oct-06 9:14 
GeneralRe: Format number Pin
jds120731-Oct-06 9:34
jds120731-Oct-06 9:34 
GeneralRe: Format number Pin
jds120731-Oct-06 10:27
jds120731-Oct-06 10:27 
GeneralRe: Format number Pin
Christian Graus31-Oct-06 10:49
protectorChristian Graus31-Oct-06 10:49 
GeneralRe: Format number Pin
jds12071-Nov-06 5:47
jds12071-Nov-06 5:47 
QuestionWhere are the referenced dll's?? Pin
dfense_germany31-Oct-06 8:31
dfense_germany31-Oct-06 8:31 
AnswerRe: Where are the referenced dll's?? Pin
No-e1-Nov-06 3:42
No-e1-Nov-06 3:42 
AnswerRe: Where are the referenced dll's?? Pin
Dave Kreskowiak1-Nov-06 3:53
mveDave Kreskowiak1-Nov-06 3:53 
QuestionPrinter Properties [modified] Pin
alexfromto31-Oct-06 8:17
alexfromto31-Oct-06 8:17 
QuestionProtecting your code Pin
dgibson553131-Oct-06 7:54
dgibson553131-Oct-06 7:54 
AnswerRe: Protecting your code Pin
Christian Graus31-Oct-06 8:53
protectorChristian Graus31-Oct-06 8:53 
QuestionMy form is not visible Pin
cstrader23231-Oct-06 6:06
cstrader23231-Oct-06 6:06 

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.