Results 1 to 1 of 1

Thread: Picturebox / VB6 upgrade & conversion?

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Posts
    89

    Arrow Picturebox / VB6 upgrade & conversion?

    Hello,

    I am currently upgrading a VB6 application to ASP.NET........ does anybody know the follow equivalent code for ASP.NET? Basically there's 2 pictureboxes using VB6 one inside of the other and as you scroll or zoom in an image......it resises the image.
    Do pictureboxes exist in webforms? It doesn't look like it or can the Image control work?

    VB Code:
    1. 'Method that does the zoom
    2. Public Sub ZoomPicture(pct As PictureBox, zoom As Double)
    3.     With pct
    4.         .Width = .Width * zoom
    5.         .Height = .Height * zoom
    6.         .PaintPicture .Picture, 0, 0, .ScaleWidth, .ScaleHeight
    7.     End With
    8. End Sub
    9. 'Zoom in
    10. Private Sub cmdPlus6_Click()
    11.     ZoomPicture Picture12, 1.1
    12.     Picture12.AutoRedraw = True
    13. End Sub
    14.  
    15. 'zoom out
    16. Private Sub cmdMinus6_Click()
    17.     ZoomPicture Picture12, 0.9
    18.     Picture12.AutoRedraw = True
    19. End Sub
    20.  
    21. Private Sub HScroll6_Change()
    22.     Picture12.Move 0 - HScroll6.Value
    23. End Sub
    24.  
    25. Private Sub HScroll6_Change()
    26.     Picture12.Move 0 - HScroll6.Value
    27. End Sub
    28.  
    29. Private Sub ArrangeScrollBars6()
    30.     ' Resize scroll bars to fit form, and set their max value (in relation to form size)
    31.     With HScroll6
    32.         .Move 0, Picture11.ScaleHeight - .Height, Picture11.ScaleWidth - VScroll6.Width
    33.         .Max = IIf((Picture12.ScaleWidth - Picture11.Width + VScroll6.Width) > 0, _
    34.             Picture12.Width - Picture11.ScaleWidth + VScroll6.Width, 0)
    35.         .SmallChange = IIf(Int(.Max / 10) > 0, Int(.Max / 10), 1)
    36.         .LargeChange = IIf(Int(.Max / 5) > 0, Int(.Max / 5), 1)
    37.     End With
    38.     With VScroll6
    39.         .Move Picture11.ScaleWidth - .Width, 0, .Width, Picture11.ScaleHeight - HScroll6.Height
    40.         .Max = IIf((Picture12.Height - Picture11.ScaleHeight + HScroll6.Height) > 0, _
    41.             Picture12.Height - Picture11.ScaleHeight + HScroll6.Height, 0)
    42.         .SmallChange = IIf(Int(.Max / 10) > 0, Int(.Max / 10), 1)
    43.         .LargeChange = IIf(Int(.Max / 5) > 0, Int(.Max / 5), 1)
    44.     End With
    45.     With Text1
    46.         .Left = HScroll6.Width
    47.         .Top = VScroll6.Height
    48.         .ZOrder 0
    49.     End With
    50. End Sub

    Thanks in advance!


    Chris

    P.s. Anybody know a website that shows conversion tables between vb6 and vb.net?
    Last edited by Trancedified; Jan 2nd, 2004 at 04:39 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width