Public String bar_code (Object STR, int CH, int CW, int type_code)
{
String strtmp = Str. tostring ();
String code = strtmp;
Strtmp = strtmp. tolower ();
Int Height = CH;
Int width = CW;
Strtmp = strtmp. Replace ("0", "_ | _ |__ | _ | ");;
Strtmp = strtmp. Replace ("1", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("2", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("3", "_ | |__ | _ | ");
Strtmp = strtmp. Replace ("4", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("5", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("7", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("6", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("8", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("9", "_ | |__ | _ | ");
Strtmp = strtmp. Replace ("A", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("B", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("C", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("D", "_ | |__ | _ | ");
Strtmp = strtmp. Replace ("e", "_ | |__ | _ | ");
Strtmp = strtmp. Replace ("F", "_ | |__ | _ | ");
Strtmp = strtmp. Replace ("g", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("H", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("I", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("J", "_ | _ |__ | _ | ");
Strtmp = strtmp. Replace ("k", "_ | _ |__ | ");
Strtmp = strtmp. Replace ("L", "_ | _ |__ | ");
Strtmp = strtmp. Replace ("M", "_ | _ |__ | ");
Strtmp = strtmp. Replace ("N", "_ | _ |__ | ");
Strtmp = strtmp. Replace ("O", "_ | _ |__ | ");
Strtmp = strtmp. Replace ("P", "_ | _ |__ | ");
Strtmp = strtmp. Replace ("r", "_ | |__ | ");
Strtmp = strtmp. Replace ("Q", "_ | |__ | ");
Strtmp = strtmp. Replace ("S", "_ | |__ | ");
Strtmp = strtmp. Replace ("T", "_ | |__ | ");
Strtmp = strtmp. Replace ("u", "_ |__ | _ | ");
Strtmp = strtmp. Replace ("V", "_ |__ | _ | ");
Strtmp = strtmp. Replace ("W", "_ |__ | _ | ");
Strtmp = strtmp. Replace ("X", "_ |__ | _ | ");
Strtmp = strtmp. Replace ("Y", "_ |__ | _ | ");
Strtmp = strtmp. Replace ("Z", "_ |__ | _ | ");
Strtmp = strtmp. Replace ("-", "_ |__ | _ | ");
Strtmp = strtmp. Replace ("*", "_ |__ | _ | ");
Strtmp = strtmp. Replace ("/", "_ |__ | ");
Strtmp = strtmp. Replace ("%", "_ | _ |__ | ");
Strtmp = strtmp. Replace ("+", "_ |__ | ");
Strtmp = strtmp. Replace (".", "_ |__ | _ | ");
Strtmp = strtmp. replace ("_", "<span style = 'height:" + height + "; width:" + width + "; Background: # ffffff; '> </span> ");
Strtmp = strtmp. replace ("|", "<span style = 'height:" + height + "; width:" + width + "; Background: #000000; '> </span> ");
If (type_code = 1)
{
Return strtmp + "<br>" + code;
}
Else
{
Return strtmp;
}
}
You can convert the returned string to the text box, and add a * sign before and after the string. This is the most important