Oh yeah, here we go ....
I'll assume already that you know php, and are confident that you can follow instructions and function prototypes similar to those you see @ php.net, that's pretty much all you need.
Firstly, a little bit about how this is done, so it doesn't seem like voodoo or something to you.
As you know php is an extendible language, you can pretty much write any C code you want to ( c++ if you're good enough ) and have php execute it, and I'm sure youre aware of PHP-GTK, well for some time now there has existed a library going by the name of WinBinder, what winbinder does is fuses the power and glory of php with the accessibility of windows and it's own native API to allow even novice php programmers to build fully featured windows applications using thier existing knowledge and skills.
I won't go into how the Windows API works, I don't need to you don't need to know.
Here is some pseudo code with the structure of a WinBound application
Writing windows applications from php really is as simple as that, please take a look at winbinder and it's documentation, and any questions you might have regarding it's usage feel free to ask if you don't get a response from the forums @ winbinder.
Once your applications are written, you'll notice they are still .php(w) scripts, however there are remedies for that, one of them exists : phpCompile : and of course has my name on it, so is far superior to anything else you might find, and now your php is an actual windows .exe that you can distribute like the big boys do .....
phpCompile is also suitable for making console applications from php, no further knowledge needed there, you write php scripts to do whatever you need and can turn them into an .exe to do whatever you need anywhere there is windows
Obviously the code for an actual windows application will be more complicated, but I promise not by much, and if you have the ability to use http://winasm.net winasm studio, you'll save yourself even more time, once winbinder is installed look in the examples directory for a look at most of the features that wb has to offer, this is definately one library every php programmer should know by heart ......
Thanks for listening ....
I'll assume already that you know php, and are confident that you can follow instructions and function prototypes similar to those you see @ php.net, that's pretty much all you need.
Firstly, a little bit about how this is done, so it doesn't seem like voodoo or something to you.
As you know php is an extendible language, you can pretty much write any C code you want to ( c++ if you're good enough ) and have php execute it, and I'm sure youre aware of PHP-GTK, well for some time now there has existed a library going by the name of WinBinder, what winbinder does is fuses the power and glory of php with the accessibility of windows and it's own native API to allow even novice php programmers to build fully featured windows applications using thier existing knowledge and skills.
I won't go into how the Windows API works, I don't need to you don't need to know.
Here is some pseudo code with the structure of a WinBound application
PHP:
<?php
// first include the wb functions that are contained in some php scripts distributed with winbinders installation package
include('winbinder.php');
// next you need to create a window probably for the user to interact with
$mainwin = wb_create_window( [ function args ] );
// next you need to draw controls on the above window
wb_create_control( $mainwin, [ function args ] );
// next you need to set a handler for that window, this function will handle the button pushes and tab changes etc in your application, it's the "brains" of the operation so to speak
wb_set_handler( $mainwin, 'process_my_window' );
// next we need to define the function and all it's procedures, notice this function has at least two parameters, the window it's for, and the id of the control being clicked, id's are specified in wb_create_control and normally defined before that, passing them works and trying to be as simple as I can be.
function process_my_window( $window, $id )
{
switch( $id )
{
// this ID is predefined by wb, it's for the exit button, and you MUST put one in
case IDCLOSE:
wb_destroy_window( $window );
break;
case IDC_BUTTON:
// your other cases and buttons and what not here
break;
}
}
// the next step is to tell wb to start looping infinitely with
wb_main_loop( );
?>
Writing windows applications from php really is as simple as that, please take a look at winbinder and it's documentation, and any questions you might have regarding it's usage feel free to ask if you don't get a response from the forums @ winbinder.
Once your applications are written, you'll notice they are still .php(w) scripts, however there are remedies for that, one of them exists : phpCompile : and of course has my name on it, so is far superior to anything else you might find, and now your php is an actual windows .exe that you can distribute like the big boys do .....
phpCompile is also suitable for making console applications from php, no further knowledge needed there, you write php scripts to do whatever you need and can turn them into an .exe to do whatever you need anywhere there is windows
Obviously the code for an actual windows application will be more complicated, but I promise not by much, and if you have the ability to use http://winasm.net winasm studio, you'll save yourself even more time, once winbinder is installed look in the examples directory for a look at most of the features that wb has to offer, this is definately one library every php programmer should know by heart ......
Thanks for listening ....