ImageCtx and Firefly

Started by Barry Marks, January 08, 2009, 05:20:52 PM

Previous topic - Next topic

Barry Marks

I began this on the Jose Roca forum for the ImageCtx control and Paul thought it might be better here so here I am.

I began a small project using DDT just before I got Firefly and I'm not sure I want to try to port it even though it's not very far along.  But it occurred to me that it might be a way to get some kind of feel for Firefly.  It will use ImageCtx from Jose Roca's forum and basically it display an image and then break it up into rectangles and disarranged and the user (me) can re-arrange them by exchanging rectangles.  Probably some of you have seen this sort of puzzle game.

I've sort of got ImageCtx working in DDT although it's fighting back a lot.  I'm just at the point where I have a resizable image. no blocks yet.

Anyway I asked how I would do that in Firefly and Paul Squires suggested that making ImageCtx into a DLL would be easier.  I'm not sure I want to do that although I can.  I kind of like the idea of simple single programs with no installation issues whatever.  I also have no idea how to make that thing into a DLL.

The other suggestion was that I wait for Firefly 3, which might well be worth doing. :)

Anyway, he mentioned that someone else might also be interested in this topic so I guess I was hoping to start a small discussion here and just get an idea of what is involved.

Any thoughts?

Barry

TechSupport

#1
Hi Barry,

Attached to this post is a simple project that shows how to use the ImageCtx control. It uses Jose's version of the Image control prior to his changes to the new includes. It works exactly like the new control only that it uses Jose's older COM calls instead of PB's own COM calls. The equates and function calls are named differently.

The project is extremely simple and uses 4 custom controls. When you load an image, the 4 controls display the 4 different ways that the control can display an image:

%TB_IMGCTX_AUTOSIZE
%TB_IMGCTX_ACTUALSIZE
%TB_IMGCTX_FITTOWIDTH
%TB_IMGCTX_FITTOHEIGHT

Notice that the control is initialized in the FF_WinMain special function:

   '  Initialize the control
   TB_InitImgCtx


Hope this helps!

(edit: uploaded the zip file to the website rather than post as an attachment: http://www.planetsquires.com/files/imageview.rar )


Jean-Pierre LEROY

Paul,

I'm not able to unzip the file; it seems to be corrupted; please, can you create another zip file and upload it again ?

Thanks. Jean-Pierre

jcfuller

Quote from: Jean-Pierre LEROY on January 09, 2009, 05:47:29 AM
Paul,

I'm not able to unzip the file; it seems to be corrupted; please, can you create another zip file and upload it again ?

Thanks. Jean-Pierre

Same here. From WinZip:


Extracting to "D:\FireFly Visual Designer\Samples|\ImageCtx\"
Use Path: yes   Overlay Files: no
skipping: frmImageMain.frm        unsupported compression method 98
skipping: TB_IIMGCTX.INC          unsupported compression method 98
skipping: TB_IMGCTX.INC           unsupported compression method 98
skipping: ImageView.exe           unsupported compression method 98
skipping: ImageView.prj           unsupported compression method 98
Extracting frmImageMain.frx



James

TechSupport

#4
I've now uploaded to the website:  http://www.planetsquires.com/files/imageview.rar


Jean-Pierre LEROY

I'm sorry Paul ... it still doesn't work  ??? I don't know why; I have no problem to download the file, but then it's impossible to unzip it ?

Paul D. Elliott

Unzips fine for me. I'm using WinZip v10.0 and Windows 2000.

jcfuller

No go here with WinZip 8.1 or WinRar 3.70

James

Pete Totushek

I have been playing with this too.  Thanks for the example!

FYI - I had to extract the example with winzip 12 - winrar and XP's compressed folder gave errors.

-Pete

Barry Marks

I'm using PowerArchiver, which I've used for over 10 years with never a problem.  It says it's unarching it but there are no files.  If I open the file in PA and drag the files out I get them as 0 length files.

Barry

Barry Marks

If FF 3 will be out in the next month or 2 or 3 it's probably not worth spending much time with this.  You mentioned that that ImageCtx was built in and that means I'd just have to learn it all over again so I think I'm going to just wait for that.

In the meantime I'll just do some small stuff with Fireflly to learn it, which was my original plan.

Barry

TechSupport

Hi guys... not sure why the zip file won't work. Maybe because there is an EXE in it and some virus scanners are blocking the extraction?

If anyone wants it just email me and I will send you a .RAR version. I use RAR for everything these days.


Barry Marks

PowerArchiver unzips .exe's all the time.  That's not it.

I'm guessing but someone mentioned that WinZip 12 would unzip it so maybe it's zipped with a new compression method they have that the others haven't included yet.

I just checked their website and they do have a new compression method: LZMA.  Could that be it?

Barry

TechSupport

No idea....

I just uploaded the files using a rar archive instead of zip.

http://www.planetsquires.com/files/imageview.rar


Barry Marks