Search found 262 matches
- Tuesday 26th March 2024 10:34pm
- Forum: General
- Topic: using Manufactor snippets (Convert C programs to Gambas)
- Replies: 2
- Views: 359
Re: using Manufactor snippets (Convert C programs to Gambas)
Uhmmmm.... C CODE: #include <stdio.h> #include "cashdrawer.h" int main(int argc,char *argv[]) { int machine_type; int ret; machine_type = atoi(argv[1]); ret=Open_Cash(machine_type); printf("open cash return = %d\n",ret); if(ret == 0) printf("open success\n"); else print...
- Wednesday 28th February 2024 6:30pm
- Forum: Beginners
- Topic: Receiving serial data - gb.net
- Replies: 3
- Views: 831
- Monday 12th February 2024 6:51pm
- Forum: General
- Topic: MQTT Library for Gambas3
- Replies: 2
- Views: 597
Re: MQTT Library for Gambas3
...he could use the external C functions of a MQTT library.
- Sunday 11th February 2024 2:51pm
- Forum: Beginners
- Topic: New to Gambas.. seek some help
- Replies: 14
- Views: 2905
- Wednesday 7th February 2024 8:23am
- Forum: General
- Topic: getting bits from an integer (Mouse.State)
- Replies: 3
- Views: 746
Re: getting bits from an integer (Mouse.State)
...by using Bin() function:
https://gambaswiki.org/wiki/lang/bin
Public Sub Form_MouseDown()
Print Bin(Mouse.State, 8)
End
https://gambaswiki.org/wiki/lang/bin
- Tuesday 6th February 2024 10:22am
- Forum: Beginners
- Topic: New to Gambas.. seek some help
- Replies: 14
- Views: 2905
Re: New to Gambas.. seek some help
......probably by using Format() function:
https://gambaswiki.org/wiki/lang/format
https://gambaswiki.org/wiki/cat/userformat
- Thursday 25th January 2024 7:52pm
- Forum: General
- Topic: Problem with pdf file view
- Replies: 2
- Views: 860
Re: Problem with pdf file view
Try:
hImage = hPDF[0].Render(0, 0, hPDF[0].Render().W, hPDF[0].Render().H, 0, hPDF.Resolution
- Friday 19th January 2024 12:10pm
- Forum: General
- Topic: Convert image to byte array - what am I doing wrong.
- Replies: 10
- Views: 2348
Re: Convert image to byte array - what am I doing wrong.
...having the " BMP " format image file, if you need to send to your printer the individual byte-data constituting the bitmap's pixel map structure, here is how to simply extract them from the file: Public Sub Form_Open() Dim s As String Dim w, h As Integer Dim bit, saltus As Short s = Fil...
- Friday 19th January 2024 12:58am
- Forum: General
- Topic: Convert image to byte array - what am I doing wrong.
- Replies: 10
- Views: 2348
Re: Convert image to byte array - what am I doing wrong.
But if you are loading from file name no need to use Image.class i guess you can just load the file directly? Maybe like this... Public Sub Form_Open() Dim path As String Dim bb As Byte[] path = "/path/of/image/file" ' ...I get the coveted byte array: bb = Byte[].FromString(File.Load(path...
- Friday 19th January 2024 12:25am
- Forum: General
- Topic: Convert image to byte array - what am I doing wrong.
- Replies: 10
- Views: 2348