PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Finding info on built-in controls?

I know you can find the supported properties of ActiveX controls be using Properties() and other funtions. However, where can I learn about the controls that are part of the PIDE, like the Tab control? Properties, events, methods
Best place is WWW.MSDN.COM

Do a search on COMBOBOX, EDIT, etc...
Funny. I couldn't find any 'helpful' info on the tab control; The control I was looking for help with.
mmtbb,

I'm no expert, so I can only offer a nickel worth of advise on the subject.

First, the control doesn't really do much for you. When I first tried to use it, I was hoping it had many of the abilities of the Property Sheet. I kept looking for the useful information, but after I finally found some examples online, I realized that the useful information was omited because there wasn't any.

This control exists to show you some tabs and then notify you if someone clicks on a tab. That is about it. You get notified that the last tab is closing so you can save values and hide the controls for that tab, then you get notified of the tab that was clicked on and so then you show the necessary controls...

For an example in PPL, look at the DialogOpen.ppl file and the ControlEdit.FRM form in the VFB project. This is where I display the list boxes for selecting styles. If you look in the form, you'll see that I create a tab control then I create 4 listboxes on the tab control all hidden. That is all I did for the form. The Listboxes were just placed there and not sized properly. The code in the PPL file takes care of that.

In the PPL code, the form is created, SetParent is called to make the Listboxes children of the tab control, so that translation of the size and position coordinates are interpreted properly, Then I create the needed tabs. This is one step that could have been avoided if you know the number and the names of your tabs at the time the tab control is created. Then get the size of the client area for the tab control, size the listboxes to the area. When actually using the tab control, you hide a control when a tab closes and you show a control when a different tab gets activated.

With only one control per tab, this isn't too bad to manage, but when you have a bunch of things, then it gets complex pretty quickly.

I hope that having the code for this real world example in PPL helps. I'm going to post a new version of PPL Main also (probably tomorrow). It is going to very prominately feature a tab control. Some tabs will be controls, at least one of the tabs is drawn by processing the WM_Paint command. I'll post the source for you to look at and an exe to run. Since the code depends on fixes and new features of the PPL compiler, you will not be able to compile this code for your self, but the source should get you going.

Good Luck

bmanske
bmanske,

Thank you for the post. You put a lot of time into it.

You know, when it comes to programming, I have been down a lot of roads. Every package seems to have it's strengths and weaknesses. I had narrowed it down to Five categories that were important to me in picking:

C++ -
Language learning: Hard
Visual Forms/Control coding: Feature rich, medium hard to design
Speed: Very Fast
Game Programming: must know hard language
Program on PPC: Not so easy
C# -
Language learning: Medium difficulty
Visual Forms/Control coding: Feature rich, Very easy to design
Speed: Fast
Game Programming: Not so easy
Program on PPC: Not so easy (there is a way)
NSBasic -
Language learning: Very Easy
Visual Forms/Control coding: Feature rich, easy to design
Speed: medium (I did new tests, faster then we thought).
Game Programming: Not so easy
Program on PPC: Very easy
PPL -
Language learning: Easy-medium difficulty
Visual Forms/Control coding: Not so easy (easy design/hard coding)
Speed: medium (PASM - Very Fast)
Game Programming: Feature rich/ easy
Program on PPC: Very easy

By coincidence I happened upon PPL when I was in a gaming phase. I ate it up! Nothing was as feature rich and easy to use as PPL! I knew it was in its infancy and so I knew it could only get better.

Now, I am back to the "Form/Control coding" phase. It is only know that I have realized that this is the only real weakness in PPL(as I haven't used it heavily until know). Putting the control on the form is easy in PPL. Actually coding the controls for me is a mightmare (no offense meant). The later, unfortunetely is the most important part.

PPL is sooo close to being a perfect all-round choice, but now we live in a visual/windows based world of programs where most languages make it very easy to do.

Sorry for the shpil. Just my opinion.
You have to understand that all these packages (Delphi, VB, C++, NSBasic ...) all handle Windows controls like PPL. Under windows you have no choice but to deal with it's crappy API. They, on the other hand, wrote wrappers around this crude API. Delphi has a VCL, C++, ATL and MFC. A wrapper like that can take years to write. It has to be written in OO preferably and each control has to be addressed. PPL is still handling the Windows API at it's lowest level. It takes a little while to get use to it but with time it's not too bad.

I definetaly plan to have a control wrapper one day. I really couldn't do all the PPL stuff plus this for v1.0. It's a huge project that I won't be doing myself. If PPL sells great, then I will hire some people to do it. Maybe community projects will start to flourish and will do it too, I don't know.
PointOfLight · 29 May 2006, 18:20 UTC
mmtbb,

First of all, I'd like to say thanks for your breakdown of the various languages / tools for PPC programming. You've clearly put a lot of time into this. I'd like to just offer a couple of clarifications / ask a couple of questions about it.

1. Programming C++ on the PPC - what tool would you use to do that? Short of writing the code in a text editor, I didn't think there was anything available for actually compiling code on the PPC.

2. C# Game Programming - I don't know how far along the support is, but I believe GapiDraw is building C# support into the latest releases of their product. Of course, there's a potentially hefty fee to go along with this, but it should make game development easier. Also, you can use the Edge library with C# if your target is WM2003 and above (I'm not sure if this supports WM2002 or not).

3. NSBasic and game development - from a "professional" standpoint, game development is nearly impossible with this tool. Unless you're going to write an ActiveX wrapper, the use of Game APIs such as PocketHAL, GapiDraw or Edge is impossible, and the native PictureBox control isn't going to cut it. Even the ASpriteCE control isn't a viable option since it is no longer supported.

4. NSBasic development on the PPC - yes it is easy, but development between the PPC and PC is not compatible, so once you start working on a project on the PPC there's no going back.

5. PPL and visual forms coding - there are a couple of things (one old, one relatively new) that can help in this department. One of the newest versions of the PIDE supports object events that work more like Visual Basic. I don't believe this ever made it to public beta, but it's a cool feature. That's the new one. If you look in the lib directory of PPL, there are several files with a _lib extension (for example, combobox_lib.ppl). Many of these were authored by myself and tweaked out over time by kornalius and others, but all of them are designed to make working with their respective objects much easier. It's still not as friendly as NSBasic, I'll admit, but I think everything else that PPL offers more than makes up for this slight inconvenience.

I hope this has been of some use to you.
Kornalius,

Of course PPL is writen by only you (and a few others). It is amazing what you have been able to do. I know that the way PPL handles controls is at a low level, and that all other languages use wrapping to get around it. You have done wonderful on every aspect of PPL. I am so used to the easy of programming controls in other languages that I am having a difficult time with the low level manipulation that PPL uses at this time.

PointOfLight,

Thank you for your post.

-C++ can be coded/compiled on the Pocket PC with PocketGCC freeware project.

-There actually is a third-party C# wrapper for GapiDraw.

-NSbasic/CE and NSBasic/Desktop do have compatibilty problems.

-We have already talk about Gaming in NSBasic. I may be the only individual who has had moderate success with the ASpriteCE. I just got frustrated having to find workarounds (which I found) for stuff the author refused to address.

Anyway, I'll check out the _Lib files.

For now, I may have to use NSB and PPL for the time being to get the full compliment, though I really, really hate to.
mmttb:

It's only a matter of time until PPL is up to the others in terms of control handling.

I am sure that when things will calm down after the initial release I will have to find some major new PPL feature to work on. :wink:
THAT, is what I like to hear. :D
phendric · 30 May 2006, 17:41 UTC — A couple of questions...
PointOfLight wrote:mmtbb,

First of all, I'd like to say thanks for your breakdown of the various languages / tools for PPC programming. You've clearly put a lot of time into this. I'd like to just offer a couple of clarifications / ask a couple of questions about it.

1. Programming C++ on the PPC - what tool would you use to do that? Short of writing the code in a text editor, I didn't think there was anything available for actually compiling code on the PPC.

2. C# Game Programming - I don't know how far along the support is, but I believe GapiDraw is building C# support into the latest releases of their product. Of course, there's a potentially hefty fee to go along with this, but it should make game development easier. Also, you can use the Edge library with C# if your target is WM2003 and above (I'm not sure if this supports WM2002 or not).

3. NSBasic and game development - from a "professional" standpoint, game development is nearly impossible with this tool. Unless you're going to write an ActiveX wrapper, the use of Game APIs such as PocketHAL, GapiDraw or Edge is impossible, and the native PictureBox control isn't going to cut it. Even the ASpriteCE control isn't a viable option since it is no longer supported.


If you don't need to program games, it should be fine, though, right? And isn't one of the main purposes of PPL to program games?

4. NSBasic development on the PPC - yes it is easy, but development between the PPC and PC is not compatible, so once you start working on a project on the PPC there's no going back.


Wait a minute - are you saying that if you start an NSB/CE project on the desktop, and then eventually move to developing the same application on the handheld itself, you won't be able to move back to the desktop again? Or are you saying that the same code is not compatible between NSB/CE and NSB/desktop?

5. PPL and visual forms coding - there are a couple of things (one old, one relatively new) that can help in this department. One of the newest versions of the PIDE supports object events that work more like Visual Basic. I don't believe this ever made it to public beta, but it's a cool feature. That's the new one. If you look in the lib directory of PPL, there are several files with a _lib extension (for example, combobox_lib.ppl). Many of these were authored by myself and tweaked out over time by kornalius and others, but all of them are designed to make working with their respective objects much easier. It's still not as friendly as NSBasic, I'll admit, but I think everything else that PPL offers more than makes up for this slight inconvenience.

I hope this has been of some use to you.


I just wish PPL would come out soon. I've got a project I'm wanting to start immediately, but if PPL hasn't been released, and with the people over at NSB offering a $50 discount on the software, I'm very tempted to just go with that option.

Phillip
PointOfLight · 30 May 2006, 18:55 UTC
phendric wrote:
If you don't need to program games, it should be fine, though, right? And isn't one of the main purposes of PPL to program games?


NSBasic is fine for programming non-game applications, but so is PPL. In fact, there are certain features of PPL (easy to manipulate menu bars, integration with SQLite for example) that make it a nicer development environment than NSBasic. I have been working with NSBasic for quite some time, though, and it is definitely a solid tool.

phendric wrote:
Wait a minute - are you saying that if you start an NSB/CE project on the desktop, and then eventually move to developing the same application on the handheld itself, you won't be able to move back to the desktop again?


This may not be true if you're writing a formless application, but for anything where you want to build forms visually, yes. This is a known limitation and at this point I don't believe they are planning on changing it.

phendric wrote:
I just wish PPL would come out soon.


So does Kornalius. I'm just speculating at this point, but I believe he has everything ready on his end. Unfortunately the hangup at this point is my fault, because I'm the one redoing the help file for him. Unfortunately life keeps getting in the way of me getting this task complete. If I could just take a couple week vacation from my job to get this done for him I would, but unfortunately I can't. I'm trying really hard to get this complete for him, though.
PointOfLight":2ur0vzvo]
phendric wrote:
Wait a minute - are you saying that if you start an NSB/CE project on the desktop, and then eventually move to developing the same application on the handheld itself, you won't be able to move back to the desktop again?


This may not be true if you're writing a formless application, but for anything where you want to build forms visually, yes. This is a known limitation and at this point I don't believe they are planning on changing it.

That's annoying - the point of a development environment on both desktop and PDA is so that you can develop both places, no matter where you are. :mad:

PointOfLight wrote:
[quote="phendric wrote:
I just wish PPL would come out soon.


So does Kornalius. I'm just speculating at this point, but I believe he has everything ready on his end. Unfortunately the hangup at this point is my fault, because I'm the one redoing the help file for him. Unfortunately life keeps getting in the way of me getting this task complete. If I could just take a couple week vacation from my job to get this done for him I would, but unfortunately I can't. I'm trying really hard to get this complete for him, though.


I'm not being critical of you - I know how needed to work can get in the way of other things...If I knew anything about programming, I'd offer to help, but I'm still very much learning right now.

Phillip
PointOfLight · 30 May 2006, 19:31 UTC
phendric wrote:
the point of a development environment on both desktop and PDA is so that you can develop both places, no matter where you are.


I agree. And again, I don't want to speak for them and say that they have no plans of changing that "feature", I just haven't gotten the impression it's on their agenda at the moment.

phendric wrote:
I'm not being critical of you - I know how needed to work can get in the way of other things...If I knew anything about programming, I'd offer to help, but I'm still very much learning right now.


I knew you weren't being critical of me. I was being critical of me. I really want to start using PPL myself, so I want to see it released even more than you do.
I work with George (NSBasic) every now and then. With the new version 6+ they have made improvements on compatibility. Right now, you can actually go in one direction with little problems. I just can't remember if it is fron PPC to PC or the other way around.

Also NSBasic does have SQLite now.

PPL is a fantastic language with many advanced options you can grow into. Basic is, well Basic; there is a definate place for basic though.
PointOfLight · 30 May 2006, 20:32 UTC
Anonymous wrote:Also NSBasic does have SQLite now.


This is true, but the control that makes SQLite available to NSBasic has not been updated for any of the 3.x releases, and I have several requests in to them for such a change that have not been responded to (this is a 3rd party control, not something directly from NSBasic).
Guys, give PPL time. It's not even at version 1.0 and NS/Basic is at 6. Imagine what PPL 6.0 is going to be like! :wink:
Sorry PointOfLight,
That post was me, it put me as a guest though.

Kornalius,
No worries! We are just chatting now. Nothing real important.