Real Software Forums
http://forums.realsoftware.com/

quick question re: picture property on a command button
http://forums.realsoftware.com/viewtopic.php?f=13&t=42682
Page 2 of 2

Author:  yerverluvinunclebert [ Tue May 08, 2012 6:01 pm ]
Post subject:  Re: quick question re: picture property on a command button

Thanks for the information. I'll certainly keep an eye out, transparency on the background is essential for my odd shaped programs.

Author:  JeremK [ Wed May 09, 2012 3:47 am ]
Post subject:  Re: quick question re: picture property on a command button

I have just discovered this interesting topic.

Two years ago I created a complete custom design to use in both Windows and Mac OS apps:
http://www.jeremieleroy.com/wpg/images/JBCustomUI.png

You can do anything using a Canvas sub-classed control. It does take some time to get the graphics right for each element but it looks great when finished.

For custom-shaped windows I recommend MBS Overlay.

@seanclancy:
I am sorry to say but I was able to achieve 0 flickering in my custom skin using in-class double-buffering.

Author:  seanclancy [ Wed May 09, 2012 5:29 am ]
Post subject:  Re: quick question re: picture property on a command button

Me too - it took a lot of understanding how the flickering occurs and why.

The biggest problem I had was invalidation canvases without flickering the background.
However,
canvas1.invalidate(false) achieves this.

Previous to the latest version of RS, I used a black transparent picture to draw into the canvases to erase the graphic.
However, for some reason this doesn't work so I've had o use
canvas1.refresh(true)
Which produces a horrible flicker in Windows.

If anybody knows a better way of erases the graphics in a canvas, please post in this thread :)

Author:  JeremK [ Wed May 09, 2012 6:47 am ]
Post subject:  Re: quick question re: picture property on a command button

In the Canvas.Paint event I use code like this:

Dim buffer As Picture = New Picture(Width, Height, 32)
Dim gg As Graphics = Buffer.Graphics

//Do the drawing
gg.drawline(0, 0, 100, 100)

//Draw the buffer to the canvas
g.DrawPicture(Buffer, 0, 0)


And then to refresh the canvas I use:
Canvas1.refresh(false)


In some cases where the refresh can happen very often I use a timer for the refresh to prevent multiple refreshes in less than 100 milliseconds, and I use multiple advanced drawing techniques that only refreshes one part of the Buffer. But basically, using the above code, there is absolutely no flickering.

Author:  yerverluvinunclebert [ Mon Feb 11, 2013 9:09 pm ]
Post subject:  Re: quick question re: picture property on a command button

Thanks for that information, sorry for the delayed reply, it would be rather good if that were the case, I will contact support. I am still looking for that 'perfect' vb6 replacement, similar IDE, minimal conversion, multi-platform support and of course the transparency.

To show you I am still producing in a RAD fashion here is my latest transparent item, a yahoo widget built using javascript and XML requiring the yahoo widget engine on Macs or Windows.

Image

Next, possibly converting to a rainmeter skin but still would prefer to create these things using my more solid VB6 skills.

Page 2 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/