Results 1 to 8 of 8

Thread: Obligatory Newbie Question #1

  1. #1
    Member Kuron's Avatar
    Join Date
    Sep 2017
    Location
    Nashville
    Posts
    49
    Blog Entries
    2
    Rep Power
    5

    Obligatory Newbie Question #1

    Apologies, if this is not where the question should be placed...

    How do you access a DLL from TB? I have read the manual and can't seem to find anything.

    Thank you in advance for any help.

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,168
    Blog Entries
    2
    Rep Power
    10
    To be able to use a function that is inside a DLL you need to tell thinBasic what function, what DLL, what parameters.
    To do so, use DECLARE statement.
    See help here: http://www.thinbasic.com/public/prod...ml?declare.htm

    Example:
    '---Declare WinBeep function from KERNEL32 dll library
    DECLARE FUNCTION WinBeep LIB "KERNEL32.DLL" ALIAS "Beep" ( _
                                                              BYVAL dwFreq     AS DWORD, _
                                                              BYVAL dwDuration AS DWORD _
                                                             ) AS LONG
    
    Ciao
    Eros
    Last edited by ErosOlmi; 24-09-2017 at 12:17.
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  3. #3
    Member Kuron's Avatar
    Join Date
    Sep 2017
    Location
    Nashville
    Posts
    49
    Blog Entries
    2
    Rep Power
    5
    Thank you. Exactly what I needed. I knew it was something that had to be there that I was inadvertently overlooking.
    Last edited by Kuron; 24-09-2017 at 18:33.

  4. #4
    Member Kuron's Avatar
    Join Date
    Sep 2017
    Location
    Nashville
    Posts
    49
    Blog Entries
    2
    Rep Power
    5

    Obligatory Newbie Question #2

    Are there any tips for getting thinBasic to fully unload once you are finished with it? After several of hours after closing the program, it is still hogging resources.



  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,168
    Blog Entries
    2
    Rep Power
    10
    Mainly it depends on how you write your code.
    It seems you have an endless loop.

    If you post some code, I can check and see.
    Last edited by ErosOlmi; 24-09-2017 at 20:18.
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  6. #6
    Member Kuron's Avatar
    Join Date
    Sep 2017
    Location
    Nashville
    Posts
    49
    Blog Entries
    2
    Rep Power
    5
    Found the culprit (at least I think this is the cause). Had forgot to disable Panda before compiling, and as I mentioned elsewhere, Panda immediately quarantines the compiled EXE and that causes TB to freeze up. It seems the only to fully get TB shut down is a reboot at that point.

    Going to get rid of Panda. Sadly it was the least resource intensive and the least false positive problematic for my very low spec system.

  7. #7
    Kuron, look the answer of ReneMiner here about my question: http://www.thinbasic.com/community/s...gram-correctly
    as an example open the file C:\thinBasic\SampleScripts\UI\Canvas\Canvas_SineCurve.tbasic
    and when the draw finish click the close button 'X' you will see thinbasic.exe stay in memory.
    one of the solutions as ReneMiner wrote is to use this approach:
    change Canvas_WaitKey(27) to:
    Do
    Loop Until Canvas_WaitKey = 27 Or IsWindow(hWin) = FALSE


    i have posted before a bat file to check if thinbasic.exe still in memory, this is the file , name it as fileName.BAT
    TASKLIST /FI "IMAGENAME eq thinbasic.exe"
    tskill thinbasic
    pause

    this BAT file works in windows xp, but don't know if it works in windows 7 or more.
    i don't use antivirus, i use Returnil virtual to run every thing in virtual mode, i think they stop to sell returnil now, it is not completely safe but it better than nothing.

  8. #8
    Member Kuron's Avatar
    Join Date
    Sep 2017
    Location
    Nashville
    Posts
    49
    Blog Entries
    2
    Rep Power
    5
    Thank you primo. I appreciate the feedback. Seems in my case getting rid of Panda solved the problem. The cloud version of Comodo (which I was unaware of until today) was not any better although it was extremely light on resources. So, back to solely using ClamWin. This has solved the issue for me (at least for now).

Similar Threads

  1. newbie question
    By steiny in forum Shout Box Area
    Replies: 7
    Last Post: 05-11-2009, 22:16
  2. Newbie
    By johnph77 in forum Who you are
    Replies: 13
    Last Post: 06-04-2009, 23:21
  3. Newbie question regarding speed.
    By cocoflop in forum TBGL General
    Replies: 8
    Last Post: 12-05-2007, 14:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •