-Windows XP : FnxBasic03
dim f as form
f.Caption="test"
f.showmodal
when i run this program, I obtains 2 buttons on my taskbar. A Form button and a button with the caption of this code. I do not have this bug with the old version of fnxbasic.
;) from Paris
2 buttons on the taskbars.
2 buttons on the taskbars.
hi,
I know that is a problem if i do it the old way your form does not minimize to the task bar . One butt in the taskbar is for the applicasion and the other for the form. I `m not yet sure how the solve the problem, so for now on you can asign your application to the main form with this code:
[code]dim app as application
declare set_windowlong as "SetWindowLongA" of "user32.lib"
hwnd As Long
nIndex As Long
dwNewLong As Long
end declare
sub setparent(fhwnd as integer)
set_windowlong.hwnd=app.handle
set_windowlong.nindex=-8
set_windowlong.dwnewlong=fhwnd
set_windowlong
end sub
``example
dim f as form
f.caption="test"
setparent(f.hwnd)
f.showmodal[/code]
best regards
I know that is a problem if i do it the old way your form does not minimize to the task bar . One butt in the taskbar is for the applicasion and the other for the form. I `m not yet sure how the solve the problem, so for now on you can asign your application to the main form with this code:
[code]dim app as application
declare set_windowlong as "SetWindowLongA" of "user32.lib"
hwnd As Long
nIndex As Long
dwNewLong As Long
end declare
sub setparent(fhwnd as integer)
set_windowlong.hwnd=app.handle
set_windowlong.nindex=-8
set_windowlong.dwnewlong=fhwnd
set_windowlong
end sub
``example
dim f as form
f.caption="test"
setparent(f.hwnd)
f.showmodal[/code]
best regards
2 buttons on the taskbars.
Hi Marco!
I tried the code to avoid the double button on the taskbar with FNXBasic 2009 but when I compile the code I get
error: `=app.handle` not declared /unknow
What is wrong?
Thanks.
I tried the code to avoid the double button on the taskbar with FNXBasic 2009 but when I compile the code I get
error: `=app.handle` not declared /unknow
What is wrong?
Thanks.
2 buttons on the taskbars.
have you first dimmed the application
dim app as application
?
best regards
dim app as application
?
best regards
2 buttons on the taskbars.
Yes I have done it.
This is the code I used (copy and past).
----------- Start Code ---------------
dim app as application
declare set_windowlong as "SetWindowLongA" of "user32.lib"
hwnd As Long
nIndex As Long
dwNewLong As Long
end declare
sub setparent (fhwnd as integer)
set_windowlong.hwnd=app.handle
set_windowlong.nIndex=-8
set_windowlong.dwNewLong=fhwnd
set_windowlong
end sub
dim f as form
f.caption="test"
setparent(f.hwnd)
f.showmodal
-------- End Code -------------
It happens with any statement which contains the symbol of equal `=` inserted in the sub setparent.
If I try to comment the first line in the sub I get the same error with the second line e so on.
Thanks.
This is the code I used (copy and past).
----------- Start Code ---------------
dim app as application
declare set_windowlong as "SetWindowLongA" of "user32.lib"
hwnd As Long
nIndex As Long
dwNewLong As Long
end declare
sub setparent (fhwnd as integer)
set_windowlong.hwnd=app.handle
set_windowlong.nIndex=-8
set_windowlong.dwNewLong=fhwnd
set_windowlong
end sub
dim f as form
f.caption="test"
setparent(f.hwnd)
f.showmodal
-------- End Code -------------
It happens with any statement which contains the symbol of equal `=` inserted in the sub setparent.
If I try to comment the first line in the sub I get the same error with the second line e so on.
Thanks.
2 buttons on the taskbars.
First of all declare the variables not as long, fxn does not know what to do with it.
Declare the long variables as integer (is the same).
Second user32.lib does not exists it must be user32.DLL
Then try your code again.
best regards marco
Declare the long variables as integer (is the same).
Second user32.lib does not exists it must be user32.DLL
Then try your code again.
best regards marco