Foro de elhacker.net

Programación => Programación Visual Basic => Mensaje iniciado por: msdl en 21 Marzo 2011, 11:54 am



Título: [HELP] Align Text !
Publicado por: msdl en 21 Marzo 2011, 11:54 am
hello..

I just wonder how to Align Text to left direction ...

example :

Código:
     Name : XXXX XXXX
       Age : 23
   Skills : XXXX, XXXX , XXXX
            Address : XXXXX XXXX ( XXXX )

I want to align it to be like this :
Código:

 Name : XXXX XXXX
 Age : 23
 Skills : XXXX, XXXX , XXXX
 Address : XXXXX XXXX ( XXXX )

with no space before words or with specific number of spaces ..

any idea .. ??!!?!


Título: Re: [HELP] Align Text !
Publicado por: raul338 en 21 Marzo 2011, 12:17 pm
Well... you don't show your code or your enviroment, I cant figure out how you get the text, or how do you print it


Título: Re: [HELP] Align Text !
Publicado por: msdl en 21 Marzo 2011, 12:30 pm
raul338 what code ??
my homework is to code simple text editor with VB6 ..
!!


Título: Re: [HELP] Align Text !
Publicado por: 79137913 en 21 Marzo 2011, 13:04 pm
HOLA!!!

raul338 what code ??
my homework is to code simple text editor with VB6 ..
!!

Homework?

You re not at the right place.

GRACIAS POR LEER!!!


Título: Re: [HELP] Align Text !
Publicado por: raul338 en 21 Marzo 2011, 13:15 pm
Well in this forum we don't do homework for anybody.

Try to code a function to remove spaces, if you have problem then tell us, explaining and/or showing code.

If you don't know much about vb, you always can search for a reference, like this one Visual Basic 6 String Functions (http://www.vb6.us/tutorials/vb6-string-functions)


Título: Re: [HELP] Align Text !
Publicado por: Edu en 21 Marzo 2011, 13:18 pm
You should start it, and then we will tell you the mistakes, 'cause we dont do homework here.


Título: Re: [HELP] Align Text !
Publicado por: msdl en 21 Marzo 2011, 13:53 pm
hey guys i just want a help to make align option !!

my homework is to do simple text editor like notepad ..
i already do replace , find , copy , paste , .... and i just wanna know how
to make all text aligned to left with no sapce or with specific number of spaces..

thats it ..!!


Título: Re: [HELP] Align Text !
Publicado por: 79137913 en 21 Marzo 2011, 13:57 pm
HOLA!!!

Just the alignment ?

Código
  1. Private Sub Form_Load()
  2.    Text1.Alignment = 0
  3. End Sub

GRACIAS POR LEER!!!


Título: Re: [HELP] Align Text !
Publicado por: raul338 en 21 Marzo 2011, 14:10 pm
If you would saw the link that i've posted. You would noticed about RTrim$ and LTrim$ :rolleyes: , you just have to used on every line that you want to put an "Alignment"