efratomer Posted September 29, 2005 Report Posted September 29, 2005 Hello guys, I have a program in VB, and I would like to put it as a module in FS, how is it possible? thanks, Omer.
Thomas Molitor Posted September 30, 2005 Report Posted September 30, 2005 It is not possible to use VB to write a FS module. You will need C/C++ (I think Delphi works too). Regards Thomas
efratomer Posted September 30, 2005 Author Report Posted September 30, 2005 Thomas thanks for your reply. Is it possible to make a FS Module with C that will execute a VB program? Thanks, Omer.
Hamed_ji Posted September 30, 2005 Report Posted September 30, 2005 Hi i want to know how we can write module for FS, i know some C/C++ but i don't know how to get info from FS in program. and what i must write in my program to work please help me to write a module for reading data from FS tell me where to start and what should i write in my program thank you efratomer: i don't know VB6 but i'm sure there is way to do what you want you can have C/C++ code and then make it DLL to use in VB in .NET framework it's so simple and in other version it's possible with COM i think, i think it's the way you can use C/C++ in VB
Ron Buchwald Posted September 30, 2005 Report Posted September 30, 2005 Have you checked out this? http://www.schiratti.com/files/dowson/FSUIPC_SDK.zip it will answer many of your questions. ron
efratomer Posted October 1, 2005 Author Report Posted October 1, 2005 Thomas thanks for your reply.Is it possible to make a FS Module with C that will execute a VB program? Thanks, Omer. Someone?
Thomas Molitor Posted October 10, 2005 Report Posted October 10, 2005 That is of course possible. One possible solution would be to use window messages to communicate with the VB program (there are of course many other ways...). But why do you need that FS module then? Are you missing something in FSUIPC that requires a module? Thomas
efratomer Posted October 10, 2005 Author Report Posted October 10, 2005 I would like a FS Module because I have built a VB program which comunicates with FSUIPC and I find it more comftarble to users who uses my program to use it without minize the FS each time.
Thomas Molitor Posted October 11, 2005 Report Posted October 11, 2005 But you don't need a module then. You have to modify the parent window of your main VB window, so it uses the FS main window as its parent and is displayed infront of FS. But this does not work very well with all VGA cards out there. So you need to be careful with this. Thomas
efratomer Posted October 11, 2005 Author Report Posted October 11, 2005 But you don't need a module then. You have to modify the parent window of your main VB window, so it uses the FS main window as its parent and is displayed infront of FS. But this does not work very well with all VGA cards out there. So you need to be careful with this.Thomas I didn't know this option, how do I do it execly? or if you can tell me where I can learn about it. Thanks in advance, Omer.
Thomas Molitor Posted October 12, 2005 Report Posted October 12, 2005 The best starting point is at MS MSDN: http://msdn.microsoft.com This is the online bible for windows APIs and all MS related products. You have to look for the API function 'SetParent', but it might be that you have to set different window styles/properties for you window via 'SetWindowLongA'. The VB declaration are: Public Declare Function GetParent Lib "user32" _ (ByVal hwnd As Long) As Long Public Declare Function SetParent Lib "user32" _ (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _ (ByVal hwnd As Long, ByVal nIndex As Long) As Long Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _ (ByVal hwnd As Long, ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long You can try google to find some VB related articles about those API functions. Hope this helps Thomas
hm Posted October 12, 2005 Report Posted October 12, 2005 Hi, Probably, you can find something here: Jose Oliveira has written some interesting applications (even Pete has made one available at his download pages, http://www.schiratti.com) and you can download some of his sources here: http://jcboliveira.flysplash.org/ Regards, Hugo
efratomer Posted October 12, 2005 Author Report Posted October 12, 2005 The best starting point is at MS MSDN: http://msdn.microsoft.comThis is the online bible for windows APIs and all MS related products. You have to look for the API function 'SetParent', but it might be that you have to set different window styles/properties for you window via 'SetWindowLongA'. The VB declaration are: Public Declare Function GetParent Lib "user32" _ (ByVal hwnd As Long) As Long Public Declare Function SetParent Lib "user32" _ (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _ (ByVal hwnd As Long, ByVal nIndex As Long) As Long Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _ (ByVal hwnd As Long, ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long You can try google to find some VB related articles about those API functions. Hope this helps Thomas I did found those functions but when I tried making my VB as a child window into FS my FS at least got stuck. what frame's hWnd I should select for it? Hi, Probably, you can find something here: Jose Oliveira has written some interesting applications (even Pete has made one available at his download pages, http://www.schiratti.com) and you can download some of his sources here: http://jcboliveira.flysplash.org/ Regards, Hugo I tried looking for a program that I can learn from, I have read the program's descriptions and thought the FSUIPCRun Options program will do it. But I checked that program and what it does is executing another program which you select after the FS flight have started, But not in the FS Frame. Thanks in advance, Omer.
Thomas Molitor Posted October 13, 2005 Report Posted October 13, 2005 What you need is the FS main window hwnd. This can be done by searching for the windclass name 'FS98MAIN' (via API 'FindWindowEx'). I am now away for three weeks, so maybe someone else can continue to assist you. ;) Thomas
efratomer Posted October 25, 2005 Author Report Posted October 25, 2005 Well, on other windows, it works great, but somewhy when I try it on the simulator main screen it appers and it looks like the simulator window cover it, so you can't see it anymore.. Anyone? Thanks in advance, Omer.
efratomer Posted November 12, 2005 Author Report Posted November 12, 2005 *Cough* Someone? Thanks in advance, Omer.
Pete Dowson Posted November 12, 2005 Report Posted November 12, 2005 Well, on other windows, it works great, but somewhy when I try it on the simulator main screen it appers and it looks like the simulator window cover it, so you can't see it anymore... Yes, it is almost impossible. Try running FS in Windowed mode instead, you can make it work then. Otherwise you have to keep trying all sorts of horrible repainting tricks involving intercepting loads of messages. It really sucks and gets extremely convoluted. Ugh. It worked with FS2002 (but even then it was messy). The problem with FS2004 is the new way the DirectX does the graphics. I once asked some FS team guys how to get around it and they pretty much said "don't, it isn't possible"duh! :-( Pete
efratomer Posted November 13, 2005 Author Report Posted November 13, 2005 Well, is there a way for me to use a module file somehow to make my VB program visible?
Pete Dowson Posted November 13, 2005 Report Posted November 13, 2005 Well, is there a way for me to use a module file somehow to make my VB program visible? Not that I know of. Sorry. Pete
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now