Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Sep 19, 2017 10:18 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: quick question re: picture property on a command button
PostPosted: Tue May 08, 2012 6:01 pm 
Offline

Joined: Tue Feb 14, 2012 12:41 pm
Posts: 9
Thanks for the information. I'll certainly keep an eye out, transparency on the background is essential for my odd shaped programs.


Top
 Profile  
Reply with quote  
 Post subject: Re: quick question re: picture property on a command button
PostPosted: Wed May 09, 2012 3:47 am 
Offline

Joined: Thu Apr 10, 2008 6:03 am
Posts: 303
Location: Paris-La Défense, France
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.

_________________
Check my Website for high quality custom controls and classes (no plugins) for Windows, Mac OS and Linux
REALBasic 2012 R2 on Win 7 & Mac OS X


Top
 Profile  
Reply with quote  
 Post subject: Re: quick question re: picture property on a command button
PostPosted: Wed May 09, 2012 5:29 am 
Offline

Joined: Fri Jan 08, 2010 9:59 am
Posts: 315
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 :)


Top
 Profile  
Reply with quote  
 Post subject: Re: quick question re: picture property on a command button
PostPosted: Wed May 09, 2012 6:47 am 
Offline

Joined: Thu Apr 10, 2008 6:03 am
Posts: 303
Location: Paris-La Défense, France
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.

_________________
Check my Website for high quality custom controls and classes (no plugins) for Windows, Mac OS and Linux
REALBasic 2012 R2 on Win 7 & Mac OS X


Top
 Profile  
Reply with quote  
 Post subject: Re: quick question re: picture property on a command button
PostPosted: Mon Feb 11, 2013 9:09 pm 
Offline

Joined: Tue Feb 14, 2012 12:41 pm
Posts: 9
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group