Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 5 of 32 1 2 3 4 5 6 7 31 32
Re: C# wrapper - RELEASE [Re: DJBMASTER] #280761
07/24/09 06:55
07/24/09 06:55
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
Ah ok, if i get some spare time i will maybe look into c# forms and thus be able to investigate where the problem lies ^^
Could you send me an example for the WinAPI and/or form ?

Last edited by Stromausfall; 07/24/09 07:14.

get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper - RELEASE [Re: DJBMASTER] #280773
07/24/09 08:00
07/24/09 08:00
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
With the older wrapper was the same problems.
No problem rendering in C++
but trying to render into a form was a no go.
I thought it was me.
//
Maybe the other way (see above) is ok, only problem is that it works and looks like Gimp windows. This seems to be better for applications anyway i think. No problems using it this way,
and you can add System.Threading too. I am building my classes
and hoping that a7Wrapper does not change too drastically, but
still this should not affect my classes too much, and i can just use them with the new updated wrapper.
//
@Stromausfall
There are some probs with a7.Delegate and/or a7.DelegateEvent
or i cannot overstand it in your manual, perhaps a clear(er) example?
I was trying to delegate an event for EventLoad(percent).
but it seems to not want to work.
//
@anyone
ARGHHHH the posting form is driving me mad, it keeps jumping away from the line you are writing back to the top of the page???

Last edited by pararealist; 07/24/09 08:00.

A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: C# wrapper - RELEASE [Re: pararealist] #280774
07/24/09 08:07
07/24/09 08:07
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
yepp you are right in this version of the wrapper the delegates are kind of messed up, but in the new version there are delegates that match all types of events including the ones that pass an int -> like on_level (that's what you meant with eventload(percent) or ?
The new version of the wrapper should be ready, i only need to update the manual and maybe add a page, but i should be able to upload the new version of the wrapper today.

Concerning the forms: here's the post pararealist is speaking of, concerning the c# form problem, afaik : http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=111527&page=1

Re: C# wrapper - RELEASE [Re: Stromausfall] #280775
07/24/09 08:14
07/24/09 08:14
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
@ pararealist > Yeh that way of displaying the forms does work, but i'm building an MDI application, and so i would need to embed the form into the application. I don't know if SetParent(...) will work for this.I'll have a look...

Also, Stromausfall, have you ever considered using C++/CLI to load the engine into a .NET environment. Here is an article that showed how they embedded a directX engine into C#.

http://www.gamedev.net/reference/articles/article2526.asp

I know you wouldn't really want to do this after all the work you have started but just a thought.

Either way I'd say your the first to come this far with C#, and i do appreciate it.

Re: C# wrapper - RELEASE [Re: DJBMASTER] #280790
07/24/09 08:54
07/24/09 08:54
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
hmmm SetParent(...) actually works. I just created a MDIParent Form in my application, loaded the engine, and used SetParent(a7.EngVar.hWnd,myform.Handle);

You do have to do a bit of sizing and positioning, but i use SetWindowPos, which can perform sizing, positioning and Z-order editing. It doesn't seem that bad.

Here is a screeny...



I'm sure there is a Win32 function that can remove the Title and close button from the engine window... I'll try and find that now...

Last edited by DJBMASTER; 07/24/09 09:09.
Re: C# wrapper - RELEASE [Re: DJBMASTER] #280797
07/24/09 09:19
07/24/09 09:19
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
Great Work !
actually you can remove the title, the border and the close button via the acknex function video_window afaik!
a7.EngFun.video_window(null, null, (a7.Var)1, "MyTitle");
that should do the trick!

Last edited by Stromausfall; 07/24/09 09:39.

get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper - RELEASE [Re: Stromausfall] #280804
07/24/09 09:53
07/24/09 09:53
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
LOL, i went the hard way and used win32, i forgot about video_window.

Here is how it looks now after modifying the engine window...



This seems to be promising although there might be a couple of issues with hooking input and resizing when the parent form is moved / resized. I think on_message can be used to send the engine's message loop to another window.

I'll keep at it and post the code if anyone wants it. There is a restriction that it will only work for a MDIForm, so we would still need the hWndTarget working to render into other forms/controls.

This method of embedding the form inside a parent form doesn't actually need to use any part of the wrapper. You can do this by running Process.Start(), and retrieving the handle to the engine window. I just used the wrapper because it exposes the hWnd variable nicer.

Last edited by DJBMASTER; 07/24/09 10:01.
Re: C# wrapper - RELEASE [Re: DJBMASTER] #280806
07/24/09 10:03
07/24/09 10:03
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
That's great!
I have no clue about forms, mdi and stuff, but is mdi an as adequate solution as c# forms ?


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper - RELEASE [Re: Stromausfall] #280810
07/24/09 10:17
07/24/09 10:17
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Ermm well I would say that most Windows Forms applications are MDI, because they allow you to manage child forms easier, and allow you to implement interfaces easier. They also look more professional.

So this 'seems' to be quite a good solution to using Acknex in C#. I emphasise 'seem' because there might be some things i havent encountered yet.

I'm currently creating a MDI application for use with Game Studio, so this solution seems to be fine for me.

Last edited by DJBMASTER; 07/24/09 10:19.
Re: C# wrapper - RELEASE [Re: DJBMASTER] #280814
07/24/09 10:31
07/24/09 10:31
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
@DJBMASTER
Please post code, would be interested to see acknex in MDIForm working.

Didnt they (on this forum somewhere) say to keep away from MDI? Was that real or what?

I'll use both ways to see which works better for my App.



Last edited by pararealist; 07/24/09 10:32.

A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Page 5 of 32 1 2 3 4 5 6 7 31 32

Moderated by  TWO 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1