Home > database >  A Null object reference at line 23 in the open event of object * * * mistake how to solve?
A Null object reference at line 23 in the open event of object * * * mistake how to solve?

Time:09-21

Line 23 open in the event of the object code is as follows (red) : * * *
If the sqlca. Sqlcode & lt;> 0 then
Beep (1)
Messagebox (" connection error ", "unable to connect to the database ~ r ~ n ~ r ~ n error message:" + sqlca. Sqlerrtext)
The halt close
The else
Open (w_login)
Open (w_main)
luo_toolbarfont. Of_settoolbarfont (w_main, "tahoma", to 10, "123456")//set the toolbar font
End the if
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Custom functions including user object of_settoolbarfont (window aw_frame, string as_fontname, integer ai_fontsize, string as among the return none) code is as follows:

Long ll_hwndtoolbar, ll_unknown
Ll_hwndtoolbar=of_gettoolbarhandle (aw_frame)

If ll_hwndtoolbar & gt; 0 then
Ll_unknown=getwindowlonga (ll_hwndtoolbar, 0)
Fn_toolbarsetfont (ll_unknown, as_fontname ai_fontsize, 0, as_extent)
End the if
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The fn_toolbarsetfont for partial external functions:

The function long fn_toolbarsetfont (long unknow, string fontname, long fontsize, long unknow1, string STR) library "pbvm90. DLL
"
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Brother I dig broken head, to run the program or to the errors, what happened?

CodePudding user response:

Luo_toolbarfont. Of_settoolbarfont (w_main, "tahoma", to 10, "123456")//set the toolbar font

That no more than two objects, luo_toolbarfont and w_main, estimation is one of the damage, please carefully check!!!!!!

CodePudding user response:

Is there a instantiation luo_toolbarfont?

CodePudding user response:

Luo_toolbarfont, a statement
  • Related