Search found 262 matches

by vuott
Tuesday 26th March 2024 10:34pm
Forum: General
Topic: using Manufactor snippets (Convert C programs to Gambas)
Replies: 2
Views: 65

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...
by vuott
Wednesday 28th February 2024 6:30pm
Forum: Beginners
Topic: Receiving serial data - gb.net
Replies: 3
Views: 476

Re: Receiving serial data - gb.net

PeteMarsh wrote: Wednesday 28th February 2024 2:01amI’m used to the oncomm event in vb which is triggered when a serial port receives data
Uhmmmm...that is, are you looking for an Event that will be raised only when the serial port receives data ?
by vuott
Monday 12th February 2024 6:51pm
Forum: General
Topic: MQTT Library for Gambas3
Replies: 2
Views: 411

Re: MQTT Library for Gambas3

...he could use the :? external C functions of a MQTT library.
by vuott
Sunday 11th February 2024 2:51pm
Forum: Beginners
Topic: New to Gambas.. seek some help
Replies: 13
Views: 1792

Re: New to Gambas.. seek some help

Mudassir wrote: Saturday 10th February 2024 7:56pm that's just a trick. It's about numeric input not formatted text.
No... I didn't understand.
by vuott
Wednesday 7th February 2024 8:23am
Forum: General
Topic: getting bits from an integer (Mouse.State)
Replies: 3
Views: 525

Re: getting bits from an integer (Mouse.State)

...by using Bin() function:
Public Sub Form_MouseDown()

  Print Bin(Mouse.State, 8)
  
End

https://gambaswiki.org/wiki/lang/bin
by vuott
Tuesday 6th February 2024 10:22am
Forum: Beginners
Topic: New to Gambas.. seek some help
Replies: 13
Views: 1792

Re: New to Gambas.. seek some help

Mudassir wrote: Monday 5th February 2024 11:18pm 4. How to set fixed (0, 2 or 3) decimal places in those controls?
...:?...probably by using Format() function:
https://gambaswiki.org/wiki/lang/format
https://gambaswiki.org/wiki/cat/userformat
by vuott
Thursday 25th January 2024 7:52pm
Forum: General
Topic: Problem with pdf file view
Replies: 2
Views: 738

Re: Problem with pdf file view

Try:
hImage = hPDF[0].Render(0, 0, hPDF[0].Render().W, hPDF[0].Render().H, 0, hPDF.Resolution
by vuott
Friday 19th January 2024 12:10pm
Forum: General
Topic: Convert image to byte array - what am I doing wrong.
Replies: 10
Views: 1953

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...
by vuott
Friday 19th January 2024 12:58am
Forum: General
Topic: Convert image to byte array - what am I doing wrong.
Replies: 10
Views: 1953

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...
by vuott
Friday 19th January 2024 12:25am
Forum: General
Topic: Convert image to byte array - what am I doing wrong.
Replies: 10
Views: 1953

Re: Convert image to byte array - what am I doing wrong.

:? Perhaps you can find some other suggestions here:

https://forum.gambas.one/viewtopic.php?t=574