This thread is really for MinWah, as a technical discussion about MameWah, namely the launching of shortcuts and programs.
I have had experience in this field, so I am hoping to give some (hopefully) helpful tips on making MameWah an even better front end. The motive is that I wish to use this as my front end for a cabinet I am currently building, so I would like some specific changes made to suit my needs. I hope this will help create a better front end for everyone. I have coding experience in both C and VB, but as C is my primary and preffered language I have converted alot of code over to VB to help make certain features a reality. I have also attached a VB example project that demonstrates how these features can be applied. So I hope MinWah reads this!
New features demonstrated and requested:
- Launching MameWah main window from Sub Main instead of a form. Creating an API window instead of using a form allows for better control. Also doing it this way means we can have access to functions like the AddressOf operator which is only available inside a module.
- Better launching of lnk's (shortcuts) using ShellExecuteEx so that command line parameters are processed properly.
- Better way of launching executables using CreateProcess. It's better than Shell() IMHO.
- These allow for more control over the application launched. It will allow us to set the process priority, send keys to the application upon launch, simulate a click on a menu, and change various ways the window's application is displayed like removing the border and menu bar, making it fullscreen or moving the cursor off the screen.
- This will also allow the program to force the launched application to the front of the screen. No more hiding windows.
- There is also provisions here to write to the process memory space. This could be used for cheats and the like.
- Currently MameWah removes the cursor by loading an invisible one. This can cause problems while running other applications, the cursor will dissapear and re-appear. The code I demonstrate will only hide the cursor in the MameWah main screen.
- Pressing + or - on the keypad will increase or decrease the global volume. Hopefully MinWah can adapt this to use the second joystick as volume control.
- I started writing an adaptation using a DLL to hook all windows messages of the launched application. This would allow one to set up, for example, the ESC key to exit any application. Unfortunately I couldn't get it to work in VB. Perhaps I will work on this more if MinWah is interested.
I think that covers just about everything in the demo.
When you launch the demo app, keys 1 to 4 on the main keyboard will show demonstrations of launching notepad.exe and shortcuts to notepad.exe and explorer.exe. Pressing the + and - keys on the keypad will turn the global volume up and down. This application is meant for MinWah and him only, there is no point in other people downloading this (except if you are a programmer or just plain interested in this crap).
Thanks for your time, and I hope MinWah will reply and comment on the demo.
VBLaunch.zip