Author Topic: Idea for GUI  (Read 3932 times)

0 Members and 1 Guest are viewing this topic.

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Idea for GUI
« on: September 29, 2021, 02:05:53 pm »
Ok
If i ever find a time and or energy to make simple GUI library ..read .dll
in o2 compiler ...which you can use in QB64
what would be prefered syntax or names for controls and window ?

examples:

OpenWindow .....
SetControl .....

or something else ?
//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Idea for GUI
« Reply #1 on: September 29, 2021, 02:11:34 pm »
Probably would be good to use a Type for all the Controls, including the Window?

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Re: Idea for GUI
« Reply #2 on: September 29, 2021, 03:03:57 pm »
Ok

now i become little bit angry because of Steve which not believe me ..he he
here is something for start and don't become angry it is dll code in o2

Code: QB64: [Select]
  1.  'awi32 .dll test with QB64
  2.   $dll
  3.   $filename "awi32.dll"
  4.   uses RTL32
  5.  
  6.   'print "awi32.dll Loaded"
  7.   'export function in a .dll format
  8.   function HelloQB64(string s) as string, export
  9.     return "Hello_QB64 "+ s
  10.  


is that code BASIC- like ?..i think it is ...?
look into screenshot of created dll in folder...
« Last Edit: September 29, 2021, 03:11:36 pm by Aurel »
//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Re: Idea for GUI
« Reply #3 on: September 29, 2021, 03:13:30 pm »
Quote
Probably would be good to use a Type for all the Controls, including the Window?

Mark...i am not sure what you mean under Type ?
//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Re: Idea for GUI
« Reply #4 on: September 29, 2021, 03:24:21 pm »
Ok
don't panic ..i am just testing this primitive dll
Code: QB64: [Select]
  1. 'test awi32 dll
  2.   $filename "Test_HelloQB64.exe"
  3.   uses RTL32
  4.  
  5.   declare function HelloQB64 lib "awi32.dll" (string s) as string
  6.   print HelloQB64 "World!"

..so i just need to translate above code to QB64 code and must work ...i hope
i must copy that .dll into QB64 folder then try...
//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Re: Idea for GUI
« Reply #5 on: September 29, 2021, 03:56:16 pm »
what i need to call external dll
this one :

 DECLARE CUSTOMTYPE LIBRARY
 FUNCTION FindWindow& (BYVAL ClassName AS _OFFSET, WindowName$)
 END DECLARE

or something else or different ?
any help?
//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Re: Idea for GUI
« Reply #6 on: September 29, 2021, 04:03:54 pm »
it looks that this is a proper way compile fine :

Code: QB64: [Select]
  1.   FUNCTION HelloQB64$ (name$  )
//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Re: Idea for GUI
« Reply #7 on: September 29, 2021, 04:24:16 pm »
OK...(like i use ZX ..heh)
I tested this dll under qb64 and seems that work fine .
hmm at first i think that i made mistake because i don't see message box
( too much used to gui ...shame on me)
but i will add next time message box frame to see how work.
this code is in qb64 and call .dll   awi32.dll

Code: QB64: [Select]
  1. ' test load awi32.dll into qb64 program and call function
  2.  
  3.   FUNCTION HelloQB64$ (name$  )
  4.  
  5. print  HelloQB64$ ("World")
  6.  

//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Re: Idea for GUI
« Reply #8 on: September 29, 2021, 04:28:16 pm »
if you wish to try ...in attachment is awi32 dll
unzip it into qb64 folder ,in same folder save your testing program
(above qb64 code )
compile your program ..use name for program what ever you want.
run...
//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////