You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Size differs because .ico files can contain same picture with several sizes, like 32, 64 and 128, etc. pixels big in same file. Should not matter as long as the file is correctly saved - I have used such such files without problem. If you attach the ico file to a message here (Upload attachments), we can help testing better.
You just upload a png file to the web site and select the size of your icon file to make and then the website will make
it for you and you can download this icon file
complet against format, but thanks for spark litle bit hope !
128 x 128 : 32 with 97.5 Kbytes ---- it must be have 32 x32 : 31 with nearly 766 bytes, like the Hello.ico
Perhaps we need a verry old icongeneratot program.
test.ico This .ico file contains 3 icons at 256 color; one 48 x 48, one 32 x 32, and a 16 x 16. It is 8KB on disk size.
97K is not an icon.
In my experiments with test.ico I found that 16 x 16 is used on the caption (top of console or dialog), 32 x 32 on the task bar, and 48 x 48 if you make a desktop shortcut. If only one size in .ico file, it will be stretched to fit.
If you want to create icon from scratch and have multi-size icons, The freeware Greenfish Icon Editor is a lot more powerful than the ancient PCMag IcondEdit32 and is rated very highly http://greenfishsoftware.org/gfie.php
GLOBAL n,f,crack AS STRING
GLOBAL NV,PV,LV,RV,BV,HH AS LONG
GLOBAL PixW,PixH,x1,y1,x2,y2,hwin,bkgr,CarW,CarH,MaxCol,MaxRow AS LONG
GLOBAL fn,cp,fnt,z,n,fr0,fr4,fr5 AS STRING
GLOBAL pt,o,a,ca,cr,pkt,art AS INTEGER
OPEN "COLOR.DAT" FOR INPUT AS #3
INPUT #3,NV
INPUT #3,PV
INPUT #3,LV
INPUT #3,RV
INPUT #3,BV
INPUT #3,HH
INPUT #3,fnt ' Schrifttype / Font
INPUT #3,pkt ' Punkt / Point
INPUT #3,art ' Verifizierung /
CLOSE #3
' Monitor 1920 x 1050 pix
DESKTOP GET CLIENT TO PixW,PixH: x1=0: y1=0: x2=PixW-10: y2=PixH-34
cp="BK_2010 --- Die Betriebskostenabrechnung!"
o=0
GRAPHIC WINDOW cp,x1,y1,x2,y2 TO hwin
GRAPHIC ATTACH hwin,0
GRAPHIC CLEAR RGB(HH),RGB(NV)
GRAPHIC COLOR RGB(NV),RGB(HH) ' Black background with Green text like old time
GRAPHIC GET PIXEL (2,2) TO bkgr ' Find Background color if other colors used instead of black
GRAPHIC FONT fnt,pkt,art ' Select font
GRAPHIC CHR SIZE TO CarW,CarH ' Find pixel width and height of chosen graphic font
MaxCol=PixW/CarW
MaxRow=PixH/CarH
GOTO start
Hilfetext:
GRAPHIC COLOR RGB(RV),RGB(HH)
GRAPHIC SET POS (1*CarW,(1+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(2+o)*CarH) : GRAPHIC PRINT "| 00 Hilfetext: |"
GRAPHIC SET POS (1*CarW,(3+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(4+o)*CarH) : GRAPHIC PRINT "| Verwenden Sie den Zweizifferncode für die Ansteuerung der Menüpunkte! |"
GRAPHIC SET POS (1*CarW,(5+o)*CarH) : GRAPHIC PRINT "| |"
GRAPHIC SET POS (1*CarW,(6+o)*CarH) : GRAPHIC PRINT "| |"
GRAPHIC SET POS (1*CarW,(7+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(8+o)*CarH) : GRAPHIC PRINT "| ENDE = [RETURN] |"
GRAPHIC SET POS (1*CarW,(9+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC REDRAW
ff:
GRAPHIC INKEY$ TO fr0
IF fr0<>CHR$(13) THEN ff
menue:
'
'
start:
GRAPHIC COLOR RGB(NV),RGB(HH)
GRAPHIC SET POS (1*CarW,(1+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(2+o)*CarH) : GRAPHIC PRINT "| (c) 24.12.2020 Betriebskostenabrechnung 2020 |"
GRAPHIC SET POS (1*CarW,(3+o)*CarH) : GRAPHIC PRINT "| Detlev Wulff Wählen Sie das entsprechende Programm über den |"
GRAPHIC SET POS (1*CarW,(4+o)*CarH) : GRAPHIC PRINT "| Zwei-Ziffen-Code an (Ziffernblock): |"
GRAPHIC SET POS (1*CarW,(5+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(6+o)*CarH) : GRAPHIC PRINT "| |"
GRAPHIC SET POS (1*CarW,(7+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(8+o)*CarH) : GRAPHIC PRINT "| 01 : Vermieterabsender 09 : HZ Zahlerliste drucken |"
GRAPHIC SET POS (1*CarW,(9+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(10+o)*CarH) : GRAPHIC PRINT "| 02 : Rotationsdatenerbearbeitung 10 : HZ Abrechnung drucken |"
GRAPHIC SET POS (1*CarW,(11+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(12+o)*CarH) : GRAPHIC PRINT "|*03 : Drucken BK/HK 11 : Heizkosten-Zusammenführung |"
GRAPHIC SET POS (1*CarW,(13+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(14+o)*CarH) : GRAPHIC PRINT "| 04 : Kostenerfassung + Deckblatt drucken 12 : Ausdruck-Zusammenfuhrung |"
GRAPHIC SET POS (1*CarW,(15+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(16+o)*CarH) : GRAPHIC PRINT "| 05 : BK Abschlags- u. Zeitverknüpfung 13 : Mietsicherheit ausschütten |"
GRAPHIC SET POS (1*CarW,(17+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(18+o)*CarH) : GRAPHIC PRINT "| 06 : BK Zahlerliste drucken 14 : Datumsdifferenz |"
GRAPHIC SET POS (1*CarW,(19+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(20+o)*CarH) : GRAPHIC PRINT "| 07 : BK Abrechnung drucken 15 : Farb- u. Gestaltungswahl |"
GRAPHIC SET POS (1*CarW,(21+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC SET POS (1*CarW,(22+o)*CarH) : GRAPHIC PRINT "|*08 : Betriebskostenabr. modifizieren 16 : E N D E |"
GRAPHIC SET POS (1*CarW,(23+o)*CarH) : GRAPHIC PRINT "-------------------------------------------------------------------------------------"
GRAPHIC REDRAW
GOTO slf
'
sage:
n=""
GRAPHIC COLOR RGB(RV),RGB(HH)
GRAPHIC SET POS (5*CarW,6*CarH) : GRAPHIC PRINT "Zugriff nicht möglich! "
GRAPHIC REDRAW
SLEEP 1000
GRAPHIC SET POS (5*CarW,6*CarH) : GRAPHIC PRINT SPACE$(60)
GRAPHIC REDRAW
'
slf:
FOR a=1 TO 2
fr1:
GRAPHIC INKEY$ TO f
LOCAL PID AS DWORD
SLEEP 1
GRAPHIC GET DC TO hwin
IF hwin = 0 THEN ex ' Abbruch des Programms über Windows-Close-Symbol
IF f="" THEN fr1
IF ASC(f)<48 OR ASC(f)>57 THEN fr1
n=n+f
NEXT a
IF VAL(n)<=-1 OR VAL(n)>16 THEN sage:
'
ca=VAL(n)
'
SELECT CASE ca
CASE 0
GOTO Hilfetext
'
CASE 1
'
' Vermieterdaten erfassen
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (3*CarW,8*CarH) : GRAPHIC PRINT "01" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("BK_ABS_2020")
GRAPHIC WINDOW END
CASE 2
'
' Mieterdatenerfassung
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (3*CarW,(10+o)*CarH) : GRAPHIC PRINT "02" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("BK_GDA_2020")
GRAPHIC WINDOW END
CASE 3
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (3*CarW,(12+o)*CarH) : GRAPHIC PRINT "03" : GRAPHIC REDRAW
SLEEP 1000
GRAPHIC COLOR RGB(RV),RGB(HH)
GRAPHIC SET POS (3*CarW,(12+o)*CarH) : GRAPHIC PRINT "03 : Zahlerliste [1] / Statusliste = [2] [ESC] "
f4:
GRAPHIC INKEY$ TO fr4
IF fr4<>"1" AND fr4<>"2" AND fr4<>CHR$(27) THEN f4
SELECT CASE fr4
CASE "1"
SLEEP 2000
PID=SHELL("BK_PRN_2020")
GRAPHIC WINDOW END
CASE "2"
SLEEP 2000
PID=SHELL("BK_STATUS_2020")
GRAPHIC WINDOW END
CASE CHR$(27)
GOTO start
END SELECT
CASE 4
'
' Kostenerfassung
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (3*CarW,(14+o)*CarH) : GRAPHIC PRINT "04" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("P27A3BV2_2020")
GRAPHIC WINDOW END
CASE 5
'
' Zeitverknüpfung
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (3*CarW,(16+o)*CarH) : GRAPHIC PRINT "05" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("BK_STF_2020")
GRAPHIC WINDOW END
CASE 6
'
' BK Zahleriste drucken
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (3*CarW,(18+o)*CarH) : GRAPHIC PRINT "06" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("BK_MO1_2020")
GRAPHIC WINDOW END
CASE 7
'
' BK Abrechnung drucken
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (3*CarW,(20+o)*CarH) : GRAPHIC PRINT "07" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("BK_MO2_2020")
GRAPHIC WINDOW END
CASE 8
'
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (3*CarW,(22+o)*CarH) : GRAPHIC PRINT "08" : GRAPHIC REDRAW
SLEEP 1000
GRAPHIC COLOR RGB(RV),RGB(HH)
GRAPHIC SET POS (3*CarW,(22+o)*CarH) : GRAPHIC PRINT "08 : modifiziere BK = [1] / HK = [2] [ESC] "
f5:
GRAPHIC INKEY$ TO fr5
IF fr5<>"1" AND fr5<>"2" AND fr5<>CHR$(27) THEN f5
SELECT CASE fr5
CASE "1"
SLEEP 2000
PID=SHELL("BK_STX_2020")
GRAPHIC WINDOW END
CASE "2"
SLEEP 2000
PID=SHELL("HK_STY_2020")
GRAPHIC WINDOW END
CASE CHR$(27)
GOTO start
END SELECT
CASE 9
'
' HK Zahlerliste drucken
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (46*CarW,(8+o)*CarH) : GRAPHIC PRINT "09" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("HK_MO3_2020")
GRAPHIC WINDOW END
CASE 10
'
' HK Abrechnung drucken
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (46*CarW,(10+o)*CarH) : GRAPHIC PRINT "10" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("HK_MO4_2020")
GRAPHIC WINDOW END
CASE 11
'
' --
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (46*CarW,(12+o)*CarH) : GRAPHIC PRINT "11" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("BK_ZUS_2020")
GRAPHIC WINDOW END
CASE 12
'
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (46*CarW,(14+o)*CarH) : GRAPHIC PRINT "12" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("BK_ZUP_2020")
GRAPHIC WINDOW END
CASE 13
'
' Mietsicherheit berechnen
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (46*CarW,(16+o)*CarH) : GRAPHIC PRINT "13" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("BK_MSH")
GRAPHIC WINDOW END
CASE 14
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (46*CarW,(18+o)*CarH) : GRAPHIC PRINT "14" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("BK_DIF_2020")
GRAPHIC WINDOW END
CASE 15
'
' NebenKosten_COLor
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (46*CarW,(20+o)*CarH) : GRAPHIC PRINT "15" : GRAPHIC REDRAW
SLEEP 2000
PID=SHELL("BK_COL_2020")
GRAPHIC WINDOW END
CASE 16
GRAPHIC COLOR RGB(BV),RGB(HH)
GRAPHIC SET POS (46*CarW,(22+o)*CarH) : GRAPHIC PRINT "16" : GRAPHIC REDRAW
'
GRAPHIC COLOR RGB(PV),RGB(HH)
FOR cr = 1 TO 80
crack = STRING$(cr,32)+"E N D E"
GRAPHIC SET POS (5*CarW,6*CarH) : GRAPHIC PRINT USING$("\ ",crack) : GRAPHIC REDRAW
SLEEP 130
NEXT cr
GRAPHIC WINDOW END
END SELECT
ex:
PLAY WAVE "#1"
END
END FUNCTION
' ohne Funktion
' GRAPHIC COLOR RGB(LV),RGB(HH)
' GRAPHIC SET POS (46*CarW,(16+o)*CarH) : GRAPHIC PRINT "13" : GRAPHIC REDRAW
' GRAPHIC COLOR RGB(RV),RGB(HH)
' GRAPHIC SET POS (5*CarW,(6+o)*CarH) : GRAPHIC PRINT "Zugriff nicht möglich! "
' GRAPHIC REDRAW
' SLEEP 2000
' GRAPHIC SET POS (5*CarW,(6+o)*CarH) : GRAPHIC PRINT SPACE$(60)
' GRAPHIC REDRAW
' GOTO start
Don't know how you could do it in PBCC, but in PBWin, you'd need
DIALOG SET ICON hwin,"#100"
to get the icon on the Graphic Window
I note from your screenshot above that you have PBWin10 as well, so why not use that instead of PBCC. All you need to do is comment out "#COMPILER PBCC 6.04 " and "#CONSOLE OFF" and add the above line after GRAPHIC WINDOW cp,x1,y1,x2,y2 TO hwin
In PBCC an icon present as a resource is used on the console automatically, but not on any created graphics window(s). ((maybe an API function and graphic window's handle could do it)) (((not considering the console as "main window" was confusing till post 18 where some source code finally appeared)))
DIALOG SET ICON works on graphic window in PBWin, as Stuart said.
'
Code:
'for PBWin
#compile exe
#dim all
#resource icon, 101, "test.ico"
function pbmain () as long
local hGWin as dword
graphic window new "G Win", 100, 90, 200, 150 to hGWin
dialog set icon hGWin, "#101"
sleep 10000
graphic window end hGWin
end function '
Cheers,
Last edited by Dale Yarker; 21 Aug 2020, 09:02 AM.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment