| |
|
|
 Heinz Bernhard | Hello, Sebastian ! first once : i'm happy your SKControl.Dll benefit To can, she's suuuper. me gefällt The simple manner the disengaged Farbauswahl what about me would like this too in mei-NEN Progrämmchen on whom User transmit, dh. it should The colour the Buttons and the Textes self to determine can. an additional Spielerei even. I thought therefore on it, The of User chosen colour in a Ini-File To Save (for 18 Buttons) and at Programmaufruf reading To let.
Button create : Declare BF1$, BF1% BF1% = RGB(0,255,0) Buttonfarbe
so functions everything fine :
string string#,0 = Test 1& = SKCtrl_CreateColorButton(%Hwnd,string#, RGB(0,0,255), BF1%, 14,15,250,30, %hInstance)
now read from the Ini : BF1$ = Readini$(C rogrammeProfanAuswahl.Ini, Buttonfarbe, 1) Button-colour 1 reading
here the trouble : I can in the ColorButton Yes no $, separate only % bring into action. what kansst You me guess ? If possible same a couple command indicate.
cordial Thanks beforehand, freundl. Regards Heinz Bernhard |
|
|
| XProfan-Version 10+11 Betriebssystem Win7 | 04/30/08 ▲ |
|
|
|
|
 RGH | you mußt whom String one Integer transfiguring. moreover there The function Val():
BF1% = Val(Readini$(C rogrammeProfanAuswahl.Ini, Buttonfarbe, 1)) Button-colour 1 reading
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 04/30/08 ▲ |
|
|
|
|
 | Einfache Backslashes - there are you again. 
@Heinz: st$ val  |
|
|
| |
|
|
|
 RGH | iF
Einfache Backslashes - there are you again. 
Vielleiht building I Set(Escape, 2) still in XProfan 11one ...
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 04/30/08 ▲ |
|
|
|
|
 Heinz Bernhard | Vielen Thanks Roland and IF ! Bisherige try unfortunately erfolglos. in the Ini should RGB(0,255,0) read go. with Print BF1% there only a 0
commands can BF1% = Str$ Val( ) or BF1% = Val( ) lauten, Result is always same : 0
Freundl. Greeting Heinz Bernhard |
|
|
| XProfan-Version 10+11 Betriebssystem Win7 | 04/30/08 ▲ |
|
|
|
|
 | |
|
| |
|
|
|
 Sebastian König | Hello Heinz,
yet short to further explanation: RGB() is a function, from whom three Farbanteilen ruddy, green and blue a LongInt-worth with the gemischten colour zusammensetzt. Diesen worth can you as String The INI write and at reading with Val() again in a number zurückverwandeln (very this power iFs example). The String RGB(0,255,0) can of Val() against not as number interprets go (its Yes a XProfan-function), so You in the drop simply a 0 sustain.
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...]  Alte Profan²-Seite: [...]  | 05/01/08 ▲ |
|
|
|
|
 | @Heinz Perhaps helps you the moreover: CompileMarkSeparationSo sieht bei mir ein Farbeintrag in eine INI-Datei aus:
-------------------------------------------------------
[Oberflächen-Farben]
Hintergrund-Rot=230
Hintergrund-Grün=240
Hintergrund-Blau=250
Schrift-Rot=0
Schrift-Grün=0
Schrift-Blau=150
-------------------------------------------------------
So schreibe ich in die INI-Datei:
WRITEINI config_datei$,Oberflächen-Farben,Hintergrund-Rot = r$
WRITEINI config_datei$,Oberflächen-Farben,Hintergrund-Grün = g$
WRITEINI config_datei$,Oberflächen-Farben,Hintergrund-Blau = b$
WRITEINI config_datei$,Oberflächen-Farben,Schrift-Rot = r1$
WRITEINI config_datei$,Oberflächen-Farben,Schrift-Grün = g1$
WRITEINI config_datei$,Oberflächen-Farben,Schrift-Blau = b1$
-----------------------------------------------------
So wird die INI-Datei gelesen:
r$=READINI$(config_datei$,Oberflächen-Farben,Hintergrund-Rot)
g$=READINI$(config_datei$,Oberflächen-Farben,Hintergrund-Grün)
b$=READINI$(config_datei$,Oberflächen-Farben,Hintergrund-Blau)
r1$=READINI$(config_datei$,Oberflächen-Farben,Schrift-Rot)
g1$=READINI$(config_datei$,Oberflächen-Farben,Schrift-Grün)
b1$=READINI$(config_datei$,Oberflächen-Farben,Schrift-Blau)
---------------------------------------------------
Wichtig ist diese Zeile zum Schluss:
r%=VAL(r$):g%=VAL(g$):b%=VAL(b$):r1%=VAL(r1$):g1%=VAL(g1$):b1%=VAL(b1$)
Damit wird der Hintergrund bestimmt:
RGB(r%,g%,b%)
und die Schriftfarbe:
RGB(r1%,g1%,b1%)
Damit kannst Du Deine Buttons auch farblich to determine.
|
|
|
| |
|
|
|
 Heinz Bernhard | Hello, I thanks you all ! ! !
The for me crucial Info was The Typwandlung to the Ini-Speicherung - now works it. thanks too for Notes to tollen DLL and The detailed Speicherung the Farbeinträge in your Ini. too on the Schluss again The Typwandlung ! OK, now have ichs gefressen. have Yes similar Problems, the Einlesens a Ini, already time in Pixxos [...] program. These Language is very quick because tappt im dunkeln no Waitinput oä. knows and therefore whom processor constantly with 100 % schuften can. this was too one reason to that Umstieg on XProfan. now must only yet learnt go - so far Time is. nevertheless, it power gigant joke. and these, our, Community is simply pointed - thanks all Macher and hilfbereite Members !
Heinz Bernhard |
|
|
| XProfan-Version 10+11 Betriebssystem Win7 | 05/01/08 ▲ |
|
|
|