|
Post by mikymoon on Jul 8, 2018 14:24:13 GMT -5
Hello. Guys please tell me how to properly connect the library WindowSystemObject (wso.dll) version 1.1 and print the form this library.
Show an example please.
I tried on an example of an output MessageBoxA
nomainwin
wtype = _MB_SERVICE_NOTIFICATION
message$ = "This is a message box."
title$ = "A Windows Message Box"
calldll #user32, "MessageBoxA",_
0 as ulong,_
message$ as ptr,_
title$ as ptr,_
wtype as ulong,_
RESULT as long
end
but the example of this library is not clear to me. I will be grateful for the help
and the second question. Are there any methods for working with threads?
|
|
|
Post by Chris Iverson on Jul 8, 2018 20:58:39 GMT -5
Are you able to provide any more information on what you're trying to do with WSO? I can only find one reference to a wso.dll that seems to fit - this one - and I don't know what feature it has that you're trying to use. LB has built-in GUI capabilities that would be far easier to use than trying to use an external DLL, and from the looks of it, the DLL requires COM/ActiveX to use it, making it even harder to do from raw LB. As for your second question, put simply, no. LB is not a multi-threaded application, and the LB runtime code is not re-entrant. If you do anything that can cause LB code to start executing somewhere it wasn't previously, you will crash. You would need to either package the multicore code into a separate component, like a DLL, and call THAT from LB, being careful to not interact with LB across different threads, or you would need to just run multiple copies of your program, and have them communicate via some form of IPC.
|
|
|
Post by mikymoon on Jul 9, 2018 2:36:04 GMT -5
I will be satisfied with the example of creating a form through this library. I would like to do an editor with the functionality. I think that will be enough.
wso = new ActiveXObject("Scripting.WindowSystemObject") wso.EnableVisualStyles = true form = wso.CreateForm(0,0,0,0) form.ClientWidth = 150 form.ClientHeight = 100 form.CenterControl() button = form.CreateButton(10,10,75,25,"Close") button.OnClick = ButtonClick
function ButtonClick(Sender) { form.Close() }
form.Show() wso.Run()
|
|
|
Post by Rod on Jul 9, 2018 6:12:13 GMT -5
We have a native texteditor, is that discounted? It is much easier to use.
nomainwin WindowWidth = 300 WindowHeight = 200 UpperLeftX = (DisplayWidth-WindowWidth)/2 UpperLeftY = (DisplayHeight-WindowHeight)/2 texteditor #main.te 0, 0, 200, 100 button #main.done, "Done", [done], LR, 50, 40 open "Text Editor" for window as #main #main "trapclose [quit]" #main.te "This is a text editor control." wait
[done] 'get, change, save, contents here
[quit] close #main end
|
|
|
Post by mikymoon on Jul 9, 2018 6:33:33 GMT -5
I would like to work with this library. for studying. Help to connect the component (form) for the start.
|
|
|
Post by Rod on Jul 9, 2018 6:37:18 GMT -5
We have been shown how to use one or two COM objects but they usually involve some sort of trick or compromise. So I think you are probably on the wrong forum. Other languages may make it far easier to work with this .dll
|
|