aldweb

Fermer I. aldweb

Fermer II. Gratuitiels PC

Fermer III. Gratuitiels Palm

Fermer IV. Partagiciels Palm

Fermer V. iziBasic Palm

Fermer VI. Connaissance Palm

Fermer VII. Ordinateur Poche

Fermer VIII. miniPortail

Spécial !



Version mobile
de l'aldweb Site

m.aldweb.com


Ni Français, ni Anglais ?

Essayez donc l'un de ces drapeaux :
[de] [es] [it] [pt]
Recherche




Météo / Spam / www

Météo Lyon


aldweb contre le SPAM


Newsletter
Pour avoir des nouvelles de ce site, inscrivez-vous à notre Newsletter.
S'abonner
Se désabonner
298 Abonnés
Sites web de la famille

Webmaster - Infos
News Amis
Visites

   visiteurs

   visiteurs en ligne

Sondage
Comment trouve-tu le nouvel habillage de l'aldweb Site ?
 
Superbe !
Joli
Moyen
Moche...
Résultats
forum.gifForum - iziBasic - Sujet n°1601

Forum - Forum
iziBasic - iziBasic


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

actif  Sujet n° 1601  Custom forms and controls

le 21/11/2007 @ 11:03
par PalmSounds

Anonyme



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.
Ecrire à PalmSounds   Poster une réponse  Haut

[]   


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

Anonyme

visiteur
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?
  Poster une réponse  Haut

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

Anonyme

visiteur
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?
Ecrire à PalmSounds   Poster une réponse  Haut

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

Anonyme

visiteur
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


  Poster une réponse  Haut

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

Anonyme

visiteur
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
Ecrire à Nate Weil   Poster une réponse  Haut

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

Anonyme

visiteur
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


  Poster une réponse  Haut

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

Anonyme

visiteur
yuppers that helps thanks :) now I just need a palm to try it on... :D and happy thanksgiving everyone!
  Poster une réponse  Haut

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

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut
actif sujet actif   clos sujet clos   Important! Important!   Nouveau Nouveau message   -   Rectifier Rectifier message   Clôturer Clôturer sujet   Remonter Remonter
[]
Catégories de discussion  Forum 



 
^ Haut ^