PDA

Click to See Complete Forum and Search --> : Wang imgEdit Control ScrollPosition


BobBarker
Nov 11th, 1999, 03:19 AM
I have a Wang imgEdit control that was packaged with VB 5.0, which is giving me grief!

I am trying to set the ScrollPositionX & Y properties at runtime, but it will not allow me to. Documentation says that ScrollPosition X & Y can only be set in the Load event which is invoked after the Display event, which I have done. The scrollPositionX is reset to 0.

Sample code:
Option Explicit
Const cstrImage_Broncos ="D:Projects\TestProj
\Broncos.bmp"

Private Sub cmdDisplay_Click()
ImgEdit1.Display

If Not IsNumeric(txtScroll.Text) Then Exit Sub
ImgEdit1.ScrollPositionX = CInt(txtScroll.Text)

End Sub

Private Sub cmdLoad_Click()
ImgEdit1.Image = cstrImage_Broncos
ImgEdit1.Zoom = 200
End Sub

Private Sub cmdSetScroll_Click()
If Not IsNumeric(txtScroll.Text) Then Exit Sub
ImgEdit1.ScrollPositionX = CLng(txtScroll.Text)
End Sub

Private Sub ImgEdit1_Load(ByVal Zoom As Double)
'MsgBox "ImgEdit1_Load", vbInformation

If Not IsNumeric(txtScroll.Text) Then Exit Sub
ImgEdit1.ScrollPositionX = CLng(txtScroll.Text)
End Sub