I am looking for a way to have VB6 edit a controls' propertybag right before or while the Form is being saved..
We're using an activeX control (AxisMediaControl) that seemingly uses Spaces in it's propertybag names which throws an error when trying to save the form the control is on.
System Error &H80070057 (-2147024809)
The same problem is described here: Source of a similar problem, but i don't have *.h files ()
but since we use the compiled ActiveX i can't edit the way it handles writing properties, and we don't have access to the source of the ActiveX..
I've managed to create a workaround loading the control at runtime,as an Array of objects, but this way i wont have them indexed to capture events by index.
Dim Axis(1) As AxisMediaControl
For i% = 0 To 1
Set Axis(i%) = Controls.Add("AxisMediaControl.AxisMediaControl.1", "AMC" & i%)
Axis(i%).Tag = "CAM" + Format$(i%)
Next i%
' Play Video
With Axis(0)
.Top = 600
.Left = 240
.Width = 9135
.Height = 5535
.Visible = True
.StretchToFit = True
.MaintainAspectRatio = True
.EnableContextMenu = True
.MediaFile = VideoFile$
.play
End With
' Play Stream
With Axis(1)
.Top = 6840
.Left = 240
.Width = 9135
.Height = 5535
.Visible = True
.StretchToFit = True
.MaintainAspectRatio = True
.EnableContextMenu = True
.MediaFile = VideoStream$
.play
End With
The ActiveX is working fine with younger versions of Visual Basic like express 2005 or vb.net and only occurs under vb6.
Are there ways to 'edit' the way the properties are saved to the propertybag?
Can i edit the dll or ocx to behave differently and have a working up-to-date version of an ActiveX that was previously incompatible? I've tried using Resource Hacker on the dll files but to no avail since my knowledge there is limited..
load
commands. Something like areplace()
i could perform on these properties.. make any sense? – RkdL