Search found 15 matches

by ak2766
Wednesday 24th April 2024 2:52am
Forum: Beginners
Topic: Draw randomly colored dots in DrawingArea - how?
Replies: 9
Views: 298

Re: Draw randomly colored dots in DrawingArea - how?

@brucesteers If I wanted to clear the DrawingArea, what's the process? Some reading [1] led me to believe that the .Clear method would be the answer but it doesn't do what I expected: Public Sub btnClear_Click() clearform = True DrawingArea1.Clear DrawingArea1.Refresh End I even tried setting the .C...
by ak2766
Monday 22nd April 2024 4:03am
Forum: Beginners
Topic: Draw randomly colored dots in DrawingArea - how?
Replies: 9
Views: 298

Re: Draw randomly colored dots in DrawingArea - how?

Haha. I think your main problem was thinking the Draw() event and refresh do little bits. But no , the refresh triggers the Draw event for a complete draw. Exactly! I initially only had the redraw in the inner loop but thought maybe I needed more - ;). Thanks for your help. Really appreciated. Chee...
by ak2766
Sunday 21st April 2024 10:48pm
Forum: Beginners
Topic: Draw randomly colored dots in DrawingArea - how?
Replies: 9
Views: 298

Re: Draw randomly colored dots in DrawingArea - how?

BruceSteers wrote: Sunday 21st April 2024 9:49pm ...
or make your dots an array that the Draw event paints the same array each time.
Ouch! That was like a wake up slap - duh - :mrgreen: !
by ak2766
Sunday 21st April 2024 9:14pm
Forum: Beginners
Topic: Draw randomly colored dots in DrawingArea - how?
Replies: 9
Views: 298

Re: Draw randomly colored dots in DrawingArea - how?

Hey Bruce, I've modified my code as you had it above and noticed that the DrawingArea refresh several times when loses or gains focus and on form resize. Is this something that can be overcome? As it currently stands, it's not ideal for what I'm planning to do with it. The PictureBox is already gain...
by ak2766
Sunday 21st April 2024 9:04pm
Forum: Beginners
Topic: Draw randomly colored dots in DrawingArea - how?
Replies: 9
Views: 298

Re: Draw randomly colored dots in DrawingArea - how?

Depending on the application it can be better to use a simple PictureBox and use paint functions to paint the picture. Like I say it depends on the application, sometimes a DrawingArea is prefered , sometimes a Picture A PictureBox can be easily manipulated and things added to it, PictureBox1.Pictu...
by ak2766
Sunday 21st April 2024 1:24pm
Forum: Beginners
Topic: Draw randomly colored dots in DrawingArea - how?
Replies: 9
Views: 298

Draw randomly colored dots in DrawingArea - how?

I've got this simple program that I'm trying to create randomly colored dots in the drawing area but all I get is the first dot (when program loads) and the last dot (after clicking the button). How do I make is to that I get to see randomly colored dots across the entire DrawingArea? To make the do...
by ak2766
Tuesday 16th April 2024 5:49am
Forum: Lounge
Topic: ChatGPT: something to play with over Christmas
Replies: 11
Views: 22948

Re: ChatGPT: something to play with over Christmas

cogier wrote: Friday 3rd March 2023 3:14pm I now have access to the Bing AI. Here is my first question and the answer. The code works without modification!
I bet we are all wondering what the question was...
by ak2766
Tuesday 16th April 2024 5:48am
Forum: Lounge
Topic: ChatGPT: something to play with over Christmas
Replies: 11
Views: 22948

Re: ChatGPT: something to play with over Christmas

stevedee wrote: Friday 23rd December 2022 7:23pm I assume that if anyone asks the exact question that I asked at the start of this chat, they should get a code example with these problems corrected if the AI bot is really learning from experience.
Interestingly, ChatGPT doesn't learn from past interactions with others:
Selection_02616.png
Selection_02616.png (77.51 KiB) Viewed 2496 times
by ak2766
Friday 1st December 2023 10:38am
Forum: Project showcase
Topic: Eight-Queen Puzzle Simulator on GAMBAS
Replies: 1
Views: 5517

Eight-Queen Puzzle Simulator on GAMBAS

I taught myself GAMBAS over a weekend (previous VB 6 fan here and most likely showing my age - :oops: ). Having never heard of the eight-queen puzzle, I was intrigued by the recursive method I spotted in the book Programming in Lua which is replicated on StackOverflow - https://stackoverflow.com/que...
by ak2766
Friday 1st December 2023 10:20am
Forum: Project showcase
Topic: Bed Leveller (3D Printer Assistant)
Replies: 34
Views: 32756

Re: Bed Leveller (3D Printer Assistant)

Re: bed warping; if the bed is not substantially flat, the only option is to 'map' the surface and to correct the g-code Z values to compensate. I guess this could be done manually, but the best approach is with something like a BLTouch sensor mounted on the extruder. (I've got one, still in its bo...