Search found 362 matches

by AndyGable
Friday 5th April 2024 12:31pm
Forum: General
Topic: [Sloved] Help with getting a image to fit onto a button
Replies: 12
Views: 2143

Re: Help with getting a image to fit onto a button

You're welcome Use Paint.Font to change the text attributes :) Paint.Begin(p) Paint.DrawPicture(hIcon, (Obj.W - hIcon.W) / 2, 4, hIcon.Width, hIcon.Height) Paint.Font.Size = 8 Paint.DrawText(Text, 0, hIcon.Height + 3, Obj.Width, Obj.Font.Height, Align.Center) Paint.End So simple I though it was goi...
by AndyGable
Thursday 4th April 2024 11:43pm
Forum: General
Topic: [Sloved] Help with getting a image to fit onto a button
Replies: 12
Views: 2143

Re: Help with getting a image to fit onto a button

Public Sub Form_Open() ' make Button1.Picture a picture with text below it. MakePictureText(Button1, Picture["icon:/32/alarm"], "Alarm call") End '' Make a picture with text below it. can be used on any object that has a .Text and a .Picture property. Public Sub MakePictureText(...
by AndyGable
Thursday 4th April 2024 11:33pm
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1725

Re: [Solved - sort of] Get the Previous Sunday from a Date

I read the original post as wanting the sunday of the last full week to print the last week activity report. as I need to get the Sunday to Monday dates for a report that run for the previous week (no matter what day the report would be run this week it would always report back the previous Monday ...
by AndyGable
Thursday 28th March 2024 12:48am
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1725

Re: [Solved - sort of] Get the Previous Sunday from a Date

No more clues from me. If you want us to writ your damn pos system, send money. :x I am sorry If I upset anyone I was in a lot of pain last night with my head and I was not understanding anything I was planning on having the date range selection anyway so all i did was implemented that as it was a ...
by AndyGable
Wednesday 27th March 2024 4:37am
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1725

Re: Get the Previous Sunday from a Date

Ive gone another route now I am using 2 date pickers so the user can select what ever dates they want

I will come back to this once my head is not pounding any more
by AndyGable
Wednesday 27th March 2024 2:43am
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1725

Re: Get the Previous Sunday from a Date

That cannot be true you make D a string object not a Date object. Then you make the string and return it... D = "01/" & Format(MonthName, "00") & "/" & Year Return D D will begin with 01/ . just like you made it Unless somewhere else along the line you are ...
by AndyGable
Wednesday 27th March 2024 1:44am
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1725

Re: Get the Previous Sunday from a Date

So i spent a whole minute writing this. (thanks to the clues given by the other Bruce :) ) Public Sub Button1_Click() Debug GetLastMonthDay(Now) Debug Format(GetLastMonthDay(Now), "dddd dd mmm") End Public Sub GetLastMonthDay(hDate As Date) As Date Dim d As Date d = DateAdd(hDate, gb.Day,...
by AndyGable
Wednesday 27th March 2024 1:18am
Forum: General
Topic: using Manufactor snippets (Convert C programs to Gambas)
Replies: 2
Views: 245

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 prin...
by AndyGable
Tuesday 26th March 2024 8:06pm
Forum: General
Topic: using Manufactor snippets (Convert C programs to Gambas)
Replies: 2
Views: 245

using Manufactor snippets (Convert C programs to Gambas)

Hi Everyone I was wondering if someone could advise me a Supplier of my PoS Terminal has given me a few programs they have made in C to get the status of the cash drawer port as well as Open the drawer I also have libptcash.so and libptcash.a files and the read me is telling me to use that from my u...
by AndyGable
Monday 25th March 2024 10:10pm
Forum: General
Topic: [Solved] Get the Previous Sunday from a Date
Replies: 25
Views: 1725

Re: Get the Previous Sunday from a Date

The last day of the month is the 1st day of the next month minus one day. yea I know but does that take into account leaps years? in VB.net I can do something like Date = Month.firstday and it will retun 01/01 or 01/02 etc and then I could do Month.lastday and it would return for March 31.03 I need...