![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I grabbed a coding example from the forum that includes the line
brush1.New1(cBlue) But whatever I do with the parameter (using a varable or RGB()) I get a pop-up saying that the "parameter is not valid". What could be causing this, please? (I am a complete newbie with Basic4PPC trial edition, hoping to make enough progress to justify a purchase. But I have decades of programming experience in multiple languages.) Mike. |
|
||||
|
After having installed the library and added a brush object, you must initialize the object with:
brush1.New1(cBlue) or brush1.New1(RGB (100,124,55)) Afterwards you can modify it's color whenever you want with: brush1.Color = cRed or brush1.Color = RGB (100,100,100) Best regards.
__________________
Klaus Switzerland |
|
|||
|
Thanks for your prompt replies.
The code isn't "mine"; as I said I just got it from a tutorial so I had to work out how to create the matching objects. Sub Button1_ClickIf I try retyping the offending line, the hint I get does not include any NewX() with a color parameter. Example: New2(width, height) instead. If I change the code then I get past the problematic line to the next one (which also fails). I cannot believe that you-all would publish sample code that does not work, so what is happening? Cheers, Mike. |
|
|||
|
Thank you Erel, I have tried your ImageLib.zip and it works just as you say. Also when I alter the "brush1.New1()" line the hint says that the parameter is just "color", which fits the code. I shall just have to go back and try to repeat what I was doing before more carefully!
Cheers, Mike. |
|
|||
|
Yes, I eventually verified that I had created my brush1 as the wrong type of object. In the desktop that could easily be seen but I don't know how to see it on the device. I just checked the hint list of methods which didn't match Brush. Could the object type be displayed somehow, perhaps in the Delete-object list?
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sms.New1(Number,Text) not working after compilation | Graley | Bug Reports | 2 | 05-19-2008 01:50 PM |
| Table trouble | Lasse | Questions & Help Needed | 1 | 01-15-2008 09:37 PM |
| Table Trouble | RandomCoder | Questions & Help Needed | 2 | 07-15-2007 09:07 AM |
| Table trouble | RandomCoder | Questions & Help Needed | 5 | 05-09-2007 06:31 AM |
| addimage trouble | Cableguy | Questions & Help Needed | 5 | 05-08-2007 08:29 PM |