COMO FAZER ISSO EM VB.NET
Pessoal gostaria de saber como criar esse mesmo efeito com um flowlayout panel...usando botoes e nao a barra de rolagem....
site que tem o efeito...
http://www.vtotvonline.tv/
http://www.vtotvonline.tv/
tente isso, se for o que vc quer...
#Region [Ô]Botao >>>[Ô]
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
FlowLayoutPanel1.Left -= 540
Label1.Text += 1
If (FlowLayoutPanel1.Left - 540) * -1 > FlowLayoutPanel1.Width Then
Button2.Enabled = False
End If
End Sub
#End Region
#Region [Ô]Botao <<<[Ô]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FlowLayoutPanel1.Left += 540
Label1.Text -= 1
If (FlowLayoutPanel1.Left - 540) * -1 < FlowLayoutPanel1.Width Then
Button2.Enabled = True
End If
End Sub
#End Region
#Region [Ô]Botao >>>[Ô]
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
FlowLayoutPanel1.Left -= 540
Label1.Text += 1
If (FlowLayoutPanel1.Left - 540) * -1 > FlowLayoutPanel1.Width Then
Button2.Enabled = False
End If
End Sub
#End Region
#Region [Ô]Botao <<<[Ô]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FlowLayoutPanel1.Left += 540
Label1.Text -= 1
If (FlowLayoutPanel1.Left - 540) * -1 < FlowLayoutPanel1.Width Then
Button2.Enabled = True
End If
End Sub
#End Region
mehorado.... mas vc quer efeito...
com efeito, mas precisa melhorar....
ops, falto anexo
testei ele ta passando de um por um to fucando aqui....
sim, que eu achei melhor
hehehehe, so mudar o 108 por 540
hehehehe, so mudar o 108 por 540
nao nem precisa e so mudar o FlowLayoutPanel1.Left -= 1 para FlowLayoutPanel1.Left -= 5 ai ele passa a quantidade de fotos...
So nao entendi por que ele ta contando ao inves de paginas ele ta dando como 41 o final... antes tava certo...
Public Class pcprincipal
Dim page As Integer = 1
Dim max As Integer = 1
Dim Run As Boolean = False
#Region [Ô]Form Load[Ô]
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Buscar_Fotos_PC_Grande()
btnProximo.Enabled = False
btnVoltar.Enabled = False
If FlowLayoutPanel1.Width > 540 Then
max = Int(FlowLayoutPanel1.Width / 540) + IIf(FlowLayoutPanel1.Width Mod 540 > 0, 1, 0)
btnProximo.Enabled = True
End If
Label1.Text = String.Format([Ô]{0} de {1}[Ô], page, max)
End Sub
#End Region
#Region [Ô]Botao >>>[Ô]
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProximo.Click
If Run = False Then
Run = True
For i As Integer = 1 To 540
Threading.Thread.Sleep(2)
Application.DoEvents()
FlowLayoutPanel1.Left -= 1
Next
page += 1
Label1.Text = String.Format([Ô]{0} de {1}[Ô], page, max)
btnVoltar.Enabled = True
If page = max Then
btnProximo.Enabled = False
End If
Run = False
End If
End Sub
#End Region
#Region [Ô]Botao <<<[Ô]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVoltar.Click
If Run = False Then
Run = True
For i As Integer = 1 To 540
Threading.Thread.Sleep(2)
Application.DoEvents()
FlowLayoutPanel1.Left += 1
Next
page -= 1
Label1.Text = String.Format([Ô]{0} de {1}[Ô], page, max)
btnProximo.Enabled = True
If page = 1 Then
btnVoltar.Enabled = False
End If
Run = False
End If
End Sub
#End Region
[ô]#Region [Ô]Aqui ele faz como se fosse uma contagem de paginas...[Ô]
[ô] Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
[ô] If Label1.Text = 0 Then
[ô] Button1.Enabled = False
[ô] Else
[ô] Button1.Enabled = True
[ô] End If
[ô] End Sub
[ô]#End Region
[ô]#Region [Ô]Aqui eu tentei usar um timer mais ele nao para aonde eu quero...[Ô]
[ô] Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
[ô] FlowLayoutPanel1.Left -= 10
[ô] If FlowLayoutPanel1.Left = -540 Then
[ô] Timer2.Stop()
[ô] Timer2.Enabled = False
[ô] End If
[ô] End Sub
[ô]#End Region
End Class
pq eu coloque por item
Tópico encerrado , respostas não são mais permitidas