Search found 629 matches
Something like this? #Include "windows.bi" #Include "win\psapi.bi" Dim As HANDLE processhandle, hwnd Dim As ULong PID Dim As ZString*MAX_PATH filename hwnd = GetActiveWindow() If hwnd Then GetWindowThreadProcessId(hwnd, @PID) processHandle = OpenProcess(PROCESS_QUERY_INFORMATION ...
The sub is that awfully slow, because with every extension the whole existing string is copied to an other memory location. Better once create an empty string of spaces of the necessary length an then replace the spaces with the converted doubles (maybe even faster with indexed strings instead of MI...
If your problem is how to get an image section from an existing image, this can be done quite easy: ScreenRes 640,480,32 Dim As Any Ptr sourcepic = ImageCreate(200, 200) 'buffer for source picture Dim As Any Ptr grabpic = ImageCreate(100, 100) 'buffer for image section 'replace "marmot.bmp"...
- Jan 26, 2019 14:18
- Forum: Beginners
- Topic: ShellExecuteW() (does a folder exist?)
- Replies: 4
- Views: 355
Sometimes I wonder why a BASIC dialect doesn't have BASIC functions like FileRead$() or IsFolder () ;-) Something like this? #Include "dir.bi" If Len(Dir("временная папка", fbDirectory)) Then Print "temp folder exists" Else Print "no temp folder" EndIf
- Jan 20, 2019 16:26
- Forum: Beginners
- Topic: DIR does list (some) files as directories
- Replies: 14
- Views: 629
I would recommend to call DIR with all attributes set and check the desired attributes afterwards: #Include "dir.bi" ChDir "C:\Users\padawan\FreeBASIC-1.05.0-win64" Declare Sub listFiles (filespec As String, attrib As Integer) Sub listFiles (filespec As String, attrib As Integer)...
I assume you're not content with just passing percent-encoded ASCII URLs to the function? Your assumption is wrong. :-) It's all the same to me what I have to pass to the function, as long as it works. The URL that I extracted from the (german) homepage of Wikipadia already is percent-encoded (&quo...
I can confirm that, thank you for the hint to wget. Is there a way to use wget as a library?caseih wrote:wget, on the other hand, retrieves the document just fine.