|
-
Sep 19th, 2003, 03:32 AM
#1
Thread Starter
New Member
vScrollbar problem after converting from vb to vb .NET
hi friends ,
i devloped one application in vb in that i am using vScrollbar.now i am converted the application to vb .NET.when i am running the application after convertion the Vscrollbar is not working as earlier in vb. i placed the vscroll on one small frame which contains another big frame in it.
plz help me in solving this problem.below is the code in vb.
form load()
with vScrollbar
.min=0
.max=vScrollbar.height -largeframe.height
.largechange=400
.smallchange=200
.value=0
end with
end sub
vScrollbar_change()
largeframe.top=vScrollbar.value
endsub
vScrollbar_scroll()
largeframe.top=vScrollbar.value
endsub
so after convertion the .Net changes the change event as procedure.and in scroll event its calling the change even through
select- case.but it works only for the first click.
so my friends plz help me in solving this problem.
thanks in advance.
-
Sep 19th, 2003, 11:23 AM
#2
Sleep mode
Frame control replaced with Panel in .NET . VScrollbar is the same in .NET , with little changes in events and properties . I don't know how you're organizing these controls togother so I can't even make a demo . Try rewriting this part in .NET way .
-
Sep 19th, 2003, 10:18 PM
#3
Thread Starter
New Member
form_load()
Dim NewLargeChange As Short
With VSCAttach
.Minimum = 0
.Maximum = (VB6.PixelsToTwipsY(.Height) - VB6.PixelsToTwipsY(fraMAttachment.Height) + .LargeChange - 1)
NewLargeChange = 400
.Maximum = .Maximum + NewLargeChange - .LargeChange
.LargeChange = NewLargeChange
.SmallChange = 100
.Value = .Minimum
End With
end sub
'UPGRADE_NOTE: VSCAttach.Change was changed from an event 'to a procedure. Click for more: 'ms-'help://MS.VSCC.2003/commoner/redir/redirect.htm?'keyword="vbup2010"'
''UPGRADE_WARNING: VScrollBar event VSCAttach.Change has a 'new behavior. Click for more: 'ms-'help://MS.VSCC.2003/commoner/redir/redirect.htm?'keyword="vbup2065"'
Private Sub VSCAttach_Change(ByVal newScrollValue As Integer)
fraMAttachment.Top = VB6.TwipsToPixelsY(newScrollValue)
End Sub
'UPGRADE_NOTE: VSCAttach.Scroll was changed from an event ' to 'a procedure. Click for more: 'ms-'help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup2010"'
Private Sub VSCAttach_Scroll_Renamed(ByVal newScrollValue As Integer)
fraMAttachment.Top = VB6.TwipsToPixelsY(newScrollValue)
End Sub
Private Sub VSCAttach_Scroll(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.ScrollEventArgs) Handles VSCAttach.Scroll
Select Case eventArgs.type
Case System.Windows.Forms.ScrollEventType.ThumbTrack
VSCAttach_Scroll_Renamed(eventArgs.newValue)
Case System.Windows.Forms.ScrollEventType.EndScroll
VSCAttach_Change(eventArgs.newValue)
End Select
End Sub
liike this the converter changes the code into .net
so by this code plz try to solve my problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|