Jump to content
The simFlight Network Forums

Problem create a Module for FS2004 with Delphi


Recommended Posts

Guest goose30
Posted

Hello,

after i have recived a Mail with an example of a Module ( written in Delphi ) i try to create a form with only a button that hiddes the Form.

But at every time i click the Button i recive a Error Message. Only when i close the Form with the X-Button in the right top corner of the Form it will close.

Is there anyone to help me ?

In the atachment is the source for the module i have recived.

Here comes only a MessageBox when i click on the new Menüentry in FS2004. And at this Position must open the Form with a Button to hide the form ( e.g. STRG+F9 for IVAP )

PLS HELP ME

Matthias

http://www.starflight-virtual.de/Modul.rar

Posted

Is there anyone to help me ?

I know very little about Delphi, but there are one or two Delphi programmers who visit here occasionally. One is Pell Liljental, the author of the FSInterrogate program (which is written in Delphi) -- see the announcement near the top of the Forum. Maybe he will see your messge.

Regards,

Pete

Guest goose30
Posted

Hello Pete,

ok, i will wait if he reads my Post.

Or can you give me the Username from Pell Liljental ?

So i can write a private Message or a e-Mail.

Thanks

Matthias

Posted

ok, i will wait if he reads my Post.

Yes, that is best.

Or can you give me the Username from Pell Liljental ?

Did you check the announcement I mentioned? Actually I think it is listed as a "sticky". It is called "New version of FS-Interrogate in the works".

Regards,

Pete

Guest goose30
Posted

He Pete,

i have recived a answer from him :

Gutentag Matthias, wie gehts ;-)

I must admit I have never tried making a Module for MSFS, so I can't say

that I know how to do it, however I might have an idea or two so I don't

mind looking into it (without promissing that I can fix it ).

Pelle

Hmmmm ???

Matthias

Guest goose30
Posted

Hi,

that means i have no more Plan hot to bring my module correct to work :-)

Matthias

Guest goose30
Posted

Hello again,

can anyone give me a code sniplet how to create the Window ?

@Pete.... The window will now be created but with a taskbar entry and this is not what i want :-)

Can you or anyone give me the procedure ( Delphi or C eg) where the window was created ?

THANKS

Matthias

Posted

can anyone give me a code sniplet how to create the Window ?

@Pete.... The window will now be created but with a taskbar entry and this is not what i want :-)

Creat a window? I just use the normal CreateWindow() API. Or am I not understanding your question? What is the problem? Only top level Windows get taskbar entries. if yours is a top level window (i.e. its parent is the desktop) I don't know how you suppress the taskbar entry -- presumably make sure the top level one is invisible, then create a child which is visible?

Pete

Guest goose30
Posted

Hello Pete,

in delphi VCL it is a litle bit different.

I create the window with Form1 := TForm1.Create(Application); or at this time with TForm1.createParented(HFSimWindow);

So the window has no taskbarentry but it is not visible eg it is behind all other FS Windows ( View front and view Panel )

What must i do here ?

Pls give me your procedure how you create the window,

so i can try to translate it to Delphi.

Thanks

Matthias

Posted

I create the window with Form1 := TForm1.Create(Application); or at this time with TForm1.createParented(HFSimWindow);

So the window has no taskbarentry but it is not visible eg it is behind all other FS Windows ( View front and view Panel )

What must i do here ?

In order to do what? Sorry, you have lost me.

If FS is running in Windowed mode you just put your Window on top by the Z-order thing, or HWND_TOPMOST or something like that. I really don't know without looking it up. Don't you have a reference?

If FS is in full screen mode, you cannot do it from another program as far as I know.

Pete

Guest goose30
Posted

Hi Pete,

you say in a previous message that you create the window with the CreateWindow() command from the WinApi.

Delphi goes here a another way, but i can also use this Method to create my window.

in this case please give me the codesnipsel where you create your window as an example for me.

No, i have no other reference.

i have at this time no one found that have written a module

in Delphi. :-(

Matthias

Guest goose30
Posted

Hi Pete and all the others,

I HAVE READY !!!!!!!!!!!!!!!!!!!

Now i have ready my first Module in Delphi Language .... FREU :-) :-)

In the Atachment i have applied the code for all other users here.

THANKS A LOT TO ALL !!

Matthias

WORKING.rar

Posted

in this case please give me the codesnipsel where you create your window as an example for me.

No, i have no other reference.

Any call to CreateWindow will have parameters relevant to your window only. There is no point in me showing you a call to CreateWindow! If you have no reference wmaterial with your compiler system (!!!), look these things up on the Internet, or better please go and buy Charles Petzold's book on Programming Windows and look up how to write such programs.

I am not a teacher and this is not the place. Sorry. I have bought many books on programming and on Windows and use them constantly. Just look these things up please.

Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.