お世話になります。
end sub以降で下記の症状が発生します。end sub以降はどのような処理しているの
かもし、ご存知の方がおりましたら参考程度で教えて頂けませんでしょうか。
宜しくお願い致します。
症状
Win95では特にテスト_Onを起動後STOPまでは問題ありませんでしたが、end subを
実行しますと即終了するはずがメニューに設置してありますビットマップボタン
(BMPBUTTON)の部分が数秒間色抜け(白色)状態になります。その後、終了状態に
なります。
declare sub テスト_On edecl ()
sub テスト_ON()
・
・
STOP
end sub
if G_TESTON then テストで テストの代わりにstopまたendなどを設けてテストしました。
endは即終了されます。stopは即停止になります。stopを実行しますと数秒後になって停止状態になります。
詳しい事は解りませんが、イベントの停止する為のSystem内のdllが関係しているのかと思っていますが?
API見習い中のTOKOです・・
>例 declare function API_XYZ & lib "ABC" alias "XYZ" ( byval A$ , byval ・・・・ )
上記の場合
API_XYZと&の間に空白が入っていないとしてAPI_XYZ&は自由に変更することができます。
DLLの部分"ABC"および関数名"XYZ"は変数に置き換える人はいないでしょうが
#define Z$ "ABC"
#define W$ "XYZ"
declare function API_XYZ& lib Z$ alias W$ ( byval A$ , byval ・・・・ )でも動きます。
例えば下記のAPIをF-BASICで使いたい場合、
Public Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" _
(ByVal dwExStyle As Long, ByVal lpClassName As String, _
ByVal lpWindowName As String, ByVal dwStyle As Long, _
ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, _
ByVal nHeight As Long, ByVal hWndParent As Long, _
ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
TOKOさん
APIのDestroyWindowのご回答によりまして
作成後のビットマップボタンをプログラムで取り除く事ができました。
if (GETDLGITEM("Bmpbutton21"))<>0 then RET=winapi_DestroyWindow(GETDLGITEM("Bmpbutton21"))
お陰様で目的通りのものが出来ました。
心より厚くお礼を申しあげます。
本当にありがとうございました。
SUB SORT(TOTALCNT1&,ITI,ZYUN$)
SELECT CASE ZYUN$
CASE IS = "U"
for L& = TOTALCNT1& to 1 step -1
for J& = 1 to L& - 1
if SORTWORK1(J&, ITI) > SORTWORK1(J& + 1, ITI) then
for M = 1 to 6
swap SORTWORK1(J&, M), SORTWORK1(J& + 1, M)
next
endif
next
next
CASE IS = "D"
For L& = TOTALCNT1& to 1 step -1
for J& = 1 to L& - 1
if SORTWORK1(J&, ITI) < SORTWORK1(J& + 1, ITI) then
for M = 1 to SORTKOUMOKU
swap SORTWORK1(J&, M), SORTWORK1(J& + 1, M)
next
endif
next
next
END SELECT
ENDSUB
open "sort.txt" for output as #1
for j&=1 to 50000
nen$=right$( space$(3)+str$( SORTWORK1(J&, 2) ),3 )
kin&=1000000&-val( SORTWORK1(J&, 6) ) '金額は0〜999999(6桁)の場合
kin$=right$( space$(6)+str$( abs(kin$) ),6 )
print #1, nen$+kin$+right$( space$(5)+str$(j%),5 )
next j&
close #1
open "sort.out" for input as #1
while not eof(1)
line input #1, buf$
code&=val( right$( sortkey$(j&),5 ) )
for m=1 to 6
print SORTWORK1(code&, 6)
next m
wend