VO AnimationControl OpenResouce()

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
leighproman
Posts: 60
Joined: Tue Oct 11, 2016 8:56 pm
Location: UK

VO AnimationControl OpenResouce()

Post by leighproman »

Hi

Does anyone have an example of using the VO AnimationControl in X# ?

In VO we used a modified version of the AnimateDialog class by John Marshall.
A cut-down bit of the code:

Code: Select all

PARTIAL CLASS AnimateDialog INHERIT DIALOGWINDOW 

	PROTECT oDCFixedText1 AS FIXEDTEXT
	PROTECT ocAnimate 	AS AnimationControl

METHOD PreInit 
	// Get instance handle of SHELL32.DLL
	SELF:hShell := LoadLibrary(String2PSZ("SHELL32.DLL"))


METHOD PostInit 

	SELF:oCAnimate := AnimationControl{SELF, ANIMATE_ANIMATE, SELF:oDCFixedText1:Origin,;
							SELF:oDCFixedText1:Size,, _OR(WS_CHILD,ACS_CENTER,ACS_TRANSPARENT,ACS_AUTOPLAY),;
							SELF:hShell}
	SELF:oDCFixedText1:Hide()

	// 161 == folder to folder (1 page)
	SELF:oCAnimate:OpenResource( 161 )
This generates a Runtime Data Type error (33) at the OpenResource() line - see screenshot.

How should OpenResouce() be called in X# ?

Thanks

Leigh
Attachments
openresouceerror.jpg
openresouceerror.jpg (37.5 KiB) Viewed 747 times
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

VO AnimationControl OpenResouce()

Post by lumberjack »

Hi Leigh,
leighproman wrote: Does anyone have an example of using the VO AnimationControl in X# ?
This generates a Runtime Data Type error (33) at the OpenResource() line - see screenshot.
How should OpenResouce() be called in X# ?
Your error message say Vulcan.NET. Are you actually compiling with X#?
______________________
Johan Nel
Boshof, South Africa
leighproman
Posts: 60
Joined: Tue Oct 11, 2016 8:56 pm
Location: UK

VO AnimationControl OpenResouce()

Post by leighproman »

Using Vulcan runtime.
User avatar
Chris
Posts: 4922
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

VO AnimationControl OpenResouce()

Post by Chris »

Hi Leigh,

It's very hard to say, without knowing how the control works, what params it takes etc. I assume you have the source code to it, so can you please create a small standalone sample in VO that uses it, will the full code needed, make sure it compiles and runs fine in VO, then export and send me the .aef to have a look/try to port it in X#?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
leighproman
Posts: 60
Joined: Tue Oct 11, 2016 8:56 pm
Location: UK

VO AnimationControl OpenResouce()

Post by leighproman »

I don't have the source code for the control - its the VO AnimationControl class.
Can make an AEF though.
Attachments
anim2.jpg
anim2.jpg (73.12 KiB) Viewed 747 times
anim3.jpg
anim3.jpg (37.28 KiB) Viewed 747 times
anim1.jpg
anim1.jpg (69.47 KiB) Viewed 747 times
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

VO AnimationControl OpenResouce()

Post by Karl-Heinz »

Hi Chris,

the attached ( x# runtime ) viaef shows the "conversion Error from USUAL (LONGINT) to PSZ" when i try to open a AVI resource from a DLL.. The sample uses the AVI resource 16935 from the "ieframe.dll"

Code: Select all

oAnimation1:OpenResource(16935)  // <------- crash
regards
Karl-Heinz
Attachments

[The extension viaef has been deactivated and can no longer be displayed.]

User avatar
Chris
Posts: 4922
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

VO AnimationControl OpenResouce()

Post by Chris »

Guys,

Ah, the obvious answer is usually the correct one, I was for some reason thinking of an exotic 3rd party control :)
Karl-Heinz, thanks for the .viaef, but I would really like to have the VO version first, to make sure it works well in it, then run them side by side the VO/X# versions to be able to debug what and where fails.

TIA!
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

VO AnimationControl OpenResouce()

Post by Karl-Heinz »

Chris wrote:Guys,

I would really like to have the VO version first, to make sure it works well in it, then run them side by side the VO/X# versions to be able to debug what and where fails.
Hi Chris,

beleave me, there are even things that work OOTB in VO ;-)

BTW I: . In newer win versions the shell32.dll doesn ´t contain avi resources any longer. That´s the reason why i selected the "ieframe.dll" and the resource no. 16935.

BTW II: attached is the aviApp.zip

BTW III: adding AEF to the allowed extension would be nice.

regards
Karl-Heinz
Attachments
aviapp.ZIP
(1.88 KiB) Downloaded 84 times
User avatar
Chris
Posts: 4922
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

VO AnimationControl OpenResouce()

Post by Chris »

Guys,

Thanks a lot for the help in tracking this down, well I am very surprised indeed, but this does work well in .Net just fine! Problem is in the VOGUI SDK code, where it casts the resource number to a PSZ, which of course does not make sense and we will fix it for the next build. For now, it should work (at least it does here) when you change the code from

SELF:ocAnimate:OpenResource( 161 )

to

Animate_Open(SELF:ocAnimate:Handle(), PTR(161))

hth!
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
leighproman
Posts: 60
Joined: Tue Oct 11, 2016 8:56 pm
Location: UK

VO AnimationControl OpenResouce()

Post by leighproman »

Thanks Chris - that works for me.
Post Reply