aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1601

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1601  Custom forms and controls

21/11/2007 @ 11:03
by PalmSounds

Anonymous



I have a question which I am sure is a very simple one to answer. I understand how to launch a custom form, but I don't know how to handle the events from controls on the form. The custom for is made with bird, and I want to handle events from buttons mainly. Also, is it possible to write this code within viziBasic?

Thanks in advance for your help.
Palm Sounds.
Write to PalmSounds   Post an answer  Top

[]   


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1
--------
21/11/2007 @ 15:06
by Nate Weil

Anonymous

visitor
I don't quite understand what you know how to do so I'll start from the bottom just to make sure.
also you can't use resource files with vizibasic.

First obviously you need to make a resource file with bird
next you need to include it in your program(using a text editor not vizibasic) by writing {resourcefile "your file"}

now we will draw an image.
IMAGE [ID in the rsrc file],X,Y

does this help?
  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
--------
21/11/2007 @ 15:31
by PalmSounds

Anonymous

visitor
Thanks for your reply.

You can access a the resources in a resource file using vizibasic. You add it in the program headings option.

In viziBasic I have a button. The code in the button says:

OPENFORM 2

This opens the form (made with BIRD) but I don't know how to handle events from the buttons on the form.

Does that make more sense?
Write to PalmSounds   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
--------
22/11/2007 @ 02:21
by JoeV

Anonymous

visitor
Hello Palmsounds,

I have never found an easy way to use custom forms with Vizibasic. It seems to have been designed for form 0 only. What you ask is easily done in IziBasic, though:

openform 2
repeat
a=waitevent
select case a
case 1
'button 1 code here
case 2
'button 2 code here
'etc,etc
end select
until a=-1

There may be a trick to using custom forms with Vizibasic, but I do not know what it is. Perhap Aldweb can help.

Regards,
JoeV


  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4
--------
22/11/2007 @ 14:32
by Nate Weil

Anonymous

visitor
actually now I'd like to know something too. I have never used a custom form in resource files because I couldn't figure out how... but I'm sure it greatly enhances the program. Anyone care to tell me please?
and palmsounds actually I did know that, when your making the program but I had just forgotten sorry.
If you don't mind a tip from me...
You should be writing your program by hand with src edit instead of visibasic. You can do things that aren't possible in visibasic because you have access to all of the source code, not just the GUI subroutine and event code for the buttons. But you should START your program with visibasic. Give it all the buttons you want it to have, maybe even already give them source code, you can do all that nice and easy, and when it's set do create source code. Then go to src edit and voila it's all there for you to edit. Thanks for listening!
Nate
Write to Nate Weil   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 6
--------
22/11/2007 @ 15:59
by JoeV

Anonymous

visitor
Nate,

You create a custom form in Bird exactly like you would any other resource, such as icon or bitmap. In Bird, click on new and select form. Then fill it in. Personally, I use PalmOS resource editor on my desktop and then upload the .rsrc file to my palm. I find it much easier to use than Bird but the result is the same.

Then in IziBasic, use code similar to mine in the answer above. If you want to open a new form close the current one and open the new one:

closeform
openform 3

Then proceed with an eventloop to handle the buttons, gui objects on form #3. Forms must have an ID in the 1 to 999 range.

Using custom forms lets you place the objects beforehand instead of at runtime and if you need to change the location of the object on the form, you simply change the resource file instead of your basic code. Each form can also have its own unique menu.

Hope this helps.
JoeV


  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 7
--------
22/11/2007 @ 19:03
by Nate Weil

Anonymous

visitor
yuppers that helps thanks :) now I just need a palm to try it on... :D and happy thanksgiving everyone!
  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 7
--------
22/11/2007 @ 22:20
by aldweb

Anonymous

visitor
Quote PalmSounds:
In viziBasic I have a button. The code in the button says:

OPENFORM 2


Quote JoeV:
I have never found an easy way to use custom forms with Vizibasic. It seems to have been designed for form 0 only. What you ask is easily done in IziBasic, though:

openform 2
repeat
a=waitevent
select case a
case 1
'button 1 code here
case 2
'button 2 code here
'etc,etc
end select
until a=-1

There may be a trick to using custom forms with Vizibasic, but I do not know what it is. Perhap Aldweb can help.


What if PalmSounds replaces his source code with the one provided by JoeV, just adding a final CLOSEFORM statement? That should work.

Cheers,
aldweb
Write to aldweb   Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^