Page 1 of 1
Distributing FNXBasic-generated EXE files
Posted: Fri Jun 29, 2007 10:38 pm
by GSAC3
Marco:
I plan to send an FNXBasic-generated EXE file to a friend who does not have FNXBasic on his Windows-XP system. My question to you is will this EXE file run on an XP system that does not also have FNXBasic installed on it? I know from my experience that this EXE works fine on my XP system, while it will not run on either a Windoes 98SE or ME system.
Don
Distributing FNXBasic-generated EXE files
Posted: Sat Jun 30, 2007 5:49 pm
by Marco
The programs fnx produces are stand alone, with the files you used in your program. If your program do not use files only the produced exe file should work. In other words you don`t need to install fnxbasic to run your application.
Although fnx is created under winxp enviroment it must work under win98, i think. Except if you you use windows xp specific api calls or use filenames. But I can`t solved it without an example. Maybe you can isolate the problem by putting things off line or place a messagebox between it.
ie
object form
etc
etc
showmodal
messagebox
rest of the program
best regards
Distributing FNXBasic-generated EXE files
Posted: Sat Jun 30, 2007 9:31 pm
by GSAC3
Marco:
Here is an example of a FNXBasic program that locks-up a pc running Windows 98SE or Windows ME, but works fine under XP. It is a variation of one of your sample programs that come with the FNXBasic distribution.
``array of 25 radio buttons
dim myform as form
dim btn(25) as radiobutton
dim push as button
dim col as integer,row as integer
dim c as integer
c=0
myform.center=True
myform.autosize=True
for col=0 to 4
for row=0 to 4
btn(c).parent=myform
btn(c).height=45
btn(c).width=85
btn(c).top=btn(c).height*row+100
btn(c).left=btn(c).width*col+150
btn(c).tag=c+1
btn(c).caption=str$(c+1)
btn(c).onclick=radiobutton_click
inc(c)
next row
next col
push.parent=myform
push.caption="push"
push.top=360
push.left=325
push.height=50
push.width=80
push.onclick=button_click
myform.ShowModal
sub radiobutton_click(sender as radiobutton)
showmessage "button "+str$(sender.tag)+" is clicked on"
end sub
sub button_click(sender as button)
showmessage "push is clicked on"
end sub
I hope this helps.
Don
Distributing FNXBasic-generated EXE files
Posted: Sun Jul 01, 2007 11:54 am
by Marco
Myform.center is causing the problem, if you leave this line out it works. I think this could be a delphi problem so I must do a little tests and research.
By the way if you want the xp computers use their themes you must include the manifest file. You can create one with the editor.
best regards marco
Distributing FNXBasic-generated EXE files
Posted: Mon Jul 02, 2007 8:26 pm
by GSAC3
Marco:
Thanks -- removing the "myform.center" allows thes sample to run under 98SE and ME.
I have another question -- this time about RADIOBUTTONs in two separate GROUPBOXes.
How can I establish the independence of the RADIOBUTTONs in two different GROUPBOXes so that when I click on a button in one box it does not change the click status of a button in the other box?
Don
Distributing FNXBasic-generated EXE files
Posted: Tue Jul 03, 2007 1:23 pm
by Marco
This goes automatic only the radiobuttons in the current groupbox are changed as far as I know.
best regards
Distributing FNXBasic-generated EXE files
Posted: Tue Jul 03, 2007 2:18 pm
by GSAC3
Marco:
The following example illustrates my problem with GROUPBOXes. When I run it, the RADIOBUTTONs in the two GROUPBOXes ARE NOT independent. Can you tell me what I am doing wrong?
TEST2
dim PARM as string
dim myform as form
dim GP1 as groupbox
dim GP2 as groupbox
dim RAD1 as radiobutton
dim RAD2 as radiobutton
dim RAD3 as radiobutton
dim RAD4 as radiobutton
dim TEXT1 as edit
dim TEXT2 as edit
dim LAB1 as label
dim LAB2 as label
dim push as button
myform.caption="TEST2"
myform.center=True
myform.autosize=True
LAB1.parent=myform
LAB1.caption=" THIS IS A GROUPBOX TEST "
LAB1.fontbold=True
LAB1.fontsize=12
LAB1.fontcolor=rgb(255,0,0)
LAB1.top=50
LAB1.left=100
LAB2.parent=myform
LAB2.fontcolor=rgb(0,0,255)
LAB2.caption=" (use TAB to toggle between choices)"
LAB2.top=100
LAB2.left=100
GP1.parent=myform
GP1.caption="DISTANCE"
GP1.fontbold=True
GP1.height=45
GP1.width=400
GP1.top=120
GP1.left=120
GP2.parent=myform
GP2.caption="WEIGHT"
GP2.fontbold=True
GP2.height=45
GP2.width=400
GP2.top=180
GP2.left=120
RAD1.parent=myform
RAD1.taborder=1
RAD1.caption="FEET"
RAD1.fontbold=True
RAD1.checked=True
RAD1.top=140
RAD1.left=305
RAD2.parent=myform
RAD2.caption="METERS"
RAD2.fontbold=True
RAD2.top=140
RAD2.left=400
RAD2.width=100
RAD3.parent=myform
RAD3.taborder=1
RAD3.caption="POUNDS"
RAD3.fontbold=True
RAD3.top=200
RAD3.left=305
RAD3.width=150
RAD4.parent=myform
RAD4.caption="KILOGRAMS"
RAD4.fontbold=True
RAD4.top=200
RAD4.left=400
RAD4.width=110
TEXT1.parent=myform
TEXT1.top=135
TEXT1.left=190
TEXT1.width=105
TEXT1.fontcolor=rgb(0,0,255)
TEXT2.parent=myform
TEXT2.top=195
TEXT2.left=190
TEXT2.width=105
TEXT2.fontcolor=rgb(0,0,255)
push.parent=myform
push.caption="START"
push.fontbold=True
push.top=240
push.left=280
push.height=50
push.width=80
push.onclick=button_click
myform.ShowModal
sub button_click(sender as button)
` showmessage TASK
end sub
Don
Distributing FNXBasic-generated EXE files
Posted: Tue Jul 03, 2007 8:16 pm
by Marco
You set the parents of all buttons to myform, if you set the parents to the groupboxes it works alright.
dim myform as form
dim g as groupbox
dim g1 as groupbox
g.parent=myform
g1.parent=myform
dim b as radiobutton
etc
b.parent=g
dim b1 as radiobutton
etc
b1.parent=g1
best regards
Distributing FNXBasic-generated EXE files
Posted: Tue Jul 03, 2007 9:34 pm
by GSAC3
Marco:
I tried what you suggested, but now all the RADIOBUTTONs disappear from the form!
Actually, I tried this before my last message as well, thinking the RADIOBUTTONs needed to have the respective GROUPBOXes as their parents. But it does not seem to work -- they just vanish?
Don
Distributing FNXBasic-generated EXE files
Posted: Wed Jul 04, 2007 9:49 am
by Marco
Your left and top are not correct anymore because you must give up the left and top position within the groupbox. Now the fell out of the groupbox.
best regards