5 Replies - 10315 Views - Last Post: 02 January 2009 - 11:21 PM Rate Topic: -----

#1 mrfikri  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 22
  • Joined: 12-October 08

How to move to new line?

Post icon  Posted 17 December 2008 - 10:59 PM

I've a problem to move to a new line in vsual basic 6. In Java for example; i simply write '\n' to move the cursor to new line. how about in visual basic 6?

Text1.Text = "I love dog" & " She loves chicken"


The code wil produce I love dog She loves chicken. I want to make it something like this:
I love dog
Show loves chicken


besides that... i also have a problem to insert a .gif image into my form. i already tested to insert .gif into picturebox. however, mine is an animation image. it didn't work! how to fix it? does anyone can help me? :)

Is This A Good Question/Topic? 0
  • +

Replies To: How to move to new line?

#2 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 774
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: How to move to new line?

Posted 17 December 2008 - 11:19 PM

This should work:
Text1.Text = "Text" & vbCrLf & "Another Text"


And GIF animations are not supported in older versions of VB.

This post has been edited by Core: 17 December 2008 - 11:20 PM

Was This Post Helpful? 1
  • +
  • -

#3 mrfikri  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 22
  • Joined: 12-October 08

Re: How to move to new line?

Posted 17 December 2008 - 11:42 PM

View PostCore, on 17 Dec, 2008 - 10:19 PM, said:

This should work:
Text1.Text = "Text" & vbCrLf & "Another Text"


And GIF animations are not supported in older versions of VB.


thanks a lot :)

why vb6 makes it hard... '\n' is much more simle :D
Was This Post Helpful? 0
  • +
  • -

#4 sam_benne  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 16
  • View blog
  • Posts: 732
  • Joined: 16-January 08

Re: How to move to new line?

Posted 18 December 2008 - 12:55 AM

There is a component that will allow you to add flash or .gif into vb6 but not sure.
Was This Post Helpful? 0
  • +
  • -

#5 reyben_89  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 69
  • Joined: 30-November 08

Re: How to move to new line?

Posted 30 December 2008 - 03:57 AM

use & vbnewline & _
Was This Post Helpful? 0
  • +
  • -

#6 vzybilly  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 160
  • Joined: 24-September 08

Re: How to move to new line?

Posted 02 January 2009 - 11:21 PM

View PostCore, on 17 Dec, 2008 - 10:19 PM, said:

GIF animations are not supported in older versions of VB.


you can take each frame out and put it into multiple images like jpg or something then have a timer that will change the picture box at a set time, like

movie.Gif, Movie, 5 frames, set at 2 frames per second
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
then set a time at an interval of 500 ticks (1/2 seconds)
then code the timer like...
dim image_num as integer = 1

private sub tick()
Select case image_num
Case 1
me.picturebox1.image = 1.jpg
Case 2
me.picturebox1.image = 2.jpg
Case 3
me.picturebox1.image = 3.jpg
Case 4
me.picturebox1.image = 4.jpg
Case 5
me.picturebox1.image = 5.jpg
End case
image_num = image_num + 1
if image_num = 6 then
image_num = 1
end if
end sub


i think that should make it seem like an animated gif, been a while sence i used VB so you might need to change some code...

This post has been edited by vzybilly: 02 January 2009 - 11:22 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1