VScrollbar hScrollbar
*
Public Class Form1
Sub colorbox()
Dim yassir As Color
yassir = Color.FromArgb(redbar.Value, greenbar.Value, bluebar.Value)
panel.BackColor = yassir
End Sub

Private Sub redbar_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles redbar.Scroll
If e.Type = ScrollEventType.EndScroll Then colorbox()
redbox.Text = redbar.Value
End Sub

Private Sub greenbar_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles greenbar.Scroll
If e.Type = ScrollEventType.EndScroll Then colorbox()
greenbox.Text = greenbar.Value
End Sub

Private Sub bluebar_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles bluebar.Scroll
If e.Type = ScrollEventType.EndScroll Then colorbox()
bluebox.Text = bluebar.Value
End Sub
End Class

코드  

 

 

 

 

이 게시물을

댓글'2'
교교
  • 2014.02.06
Dim ScrollSaved As Integer 
'Previous ScrollBar setting 
 
Private Sub UserForm_Initialize() 
 ScrollBar1.Min = -225 
 ScrollBar1.Max = 289 
 ScrollBar1.Value = 0 
 
 Label1.Caption = "-225 -----Widgets----- 289" 
 Label1.AutoSize = True 
 
 Label2.Caption = "" 
End Sub 
 
Private Sub ScrollBar1_Change() 
 Label2.Caption = " Widget Changes " _ 
 & (ScrollSaved - ScrollBar1.Value) 
End Sub 
 
Private Sub ScrollBar1_Exit(ByVal Cancel as MSForms.ReturnBoolean) 
 Label2.Caption = " Widget Changes " _ 
 & (ScrollSaved - ScrollBar1.Value) 
 ScrollSaved = ScrollBar1.Value 
End Sub 
 
Private Sub ScrollBar1_Scroll() 
 Label2.Caption = (ScrollSaved – ScrollBar1 _ 
 .Value) & " Widget Changes by Scrolling" 
End Sub

이 댓글을

교교
  • 2014.02.06

lblRed.Text = "RED " & redBar.Value.ToString("###")

이 댓글을

공유하기

SEARCH

MENU NAVIGATION