Thank you for the code,
The problem is solved, a standard Number take a wrong value, cause such trouble.
From: Stefan Pendl <pendl2megabit@...
Sent: Sunday, May 5, 2013 4:29 PM
Subject: Re: [libertybasic] Multi face Program !
Am 05.05.2013 14:32, schrieb Sarmed:
> Hi All,
> Is there a way to makes my program know if it is run under LB editor or under executable mode?
> Because I wrote some routine here it works well under editor, after changing it into exe runs with error, I make simple change, the program runs well as exe but reflects error under editor.
> No mind to post the code but it needs some work to extract it and put it in new GUI.
> The question is.
> Is that possible?!
> How could we post code to file location then?
Would you mind posting the changes to make things work?
In general the GetModuleFileName API function should be of help.
nSize = _MAX_PATH + 2
lpFilename$ = space$(nSize); chr$(0)
calldll #kernel32, "GetModuleFileNameA", _
hModule as ulong, _
lpFilename$ as ptr, _
nSize as ulong, _
result as ulong
LB 4.04 Pro ... http://www.libertybasic.com/assist.html
LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe
LB Community Wiki .............. http://basic.wikispaces.com/
LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/
Books at http://www.lulu.com/
Alyce Watson ... APIs for Liberty BASIC
Carl Gundel .... Beginning Programming with Liberty BASIC
Windows 7 Home Premium 64-bit SP1
AMD Turion X2 RM-70 2GHz, 4GB RAM
[Non-text portions of this message have been removed]