This Stupid Little Red Ball...
-
Maybe the pointlessness can cancel out, creating a point
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)Ian Shlasko wrote:
creating a point
Or a mini black hole and we'd all go woosh.
-
Something tells me that wouldn't go over very well at the office... Nah, I just used four lines of XAML to make a red ball... Well... A circle with a gradient fill... But pretend it's a ball. And it's still bouncing... bouncing... bouncing...
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)Call the support and told him some frickin’ red ball is jumping in your monitors, probably a virus?
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
...has been bouncing back and forth across my three monitors for hours now... It's vaguely hypnotic... Bounce... bounce... bounce... bounce... I'm not sure why I wasted five minutes coding it... But it just keeps... bouncing... bounce... bounce... bounce... It's almost exactly as pointless as this thread. :)
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)I have the same problem, but my balls are black.
Somebody in an online forum wrote:
INTJs never really joke. They make a point. The joke is just a gift wrapper.
-
Ian Shlasko wrote:
creating a point
Or a mini black hole and we'd all go woosh.
Hmm... If we accidentally destroyed the solar system... I wouldn't have to go to work anymore... Where do we begin?
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
Call the support and told him some frickin’ red ball is jumping in your monitors, probably a virus?
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
But... it's so... bouncy... must... watch... ball... bounce... I think I'm going to keep this... Maybe I'll add a couple lines of code and make it change colors too.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
I have the same problem, but my balls are black.
Somebody in an online forum wrote:
INTJs never really joke. They make a point. The joke is just a gift wrapper.
:thumbsup: Looks cool, but I think that would obstruct too much of the screen. This is just a little 50x50 circle... Ok, technically, it's a borderless window with a transparent background, set to topmost.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
But... it's so... bouncy... must... watch... ball... bounce... I think I'm going to keep this... Maybe I'll add a couple lines of code and make it change colors too.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)WPF, SL, or WinRT?
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
-
...has been bouncing back and forth across my three monitors for hours now... It's vaguely hypnotic... Bounce... bounce... bounce... bounce... I'm not sure why I wasted five minutes coding it... But it just keeps... bouncing... bounce... bounce... bounce... It's almost exactly as pointless as this thread. :)
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)Send. Code. Now!
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
-
Send. Code. Now!
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
Indeed. We can haz tip/trick plz?
Somebody in an online forum wrote:
INTJs never really joke. They make a point. The joke is just a gift wrapper.
-
Hmm... If we accidentally destroyed the solar system... I wouldn't have to go to work anymore... Where do we begin?
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)Ian Shlasko wrote:
Where do we begin?
That's uncertain.
-
WPF, SL, or WinRT?
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
You programmers are so boring in moments! :-D
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
You programmers are so boring in moments! :-D
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
:laugh:
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
-
WPF, SL, or WinRT?
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
WPF :)
<Ellipse Stroke="Black" StrokeThickness="1" >
<Ellipse.Fill>
<RadialGradientBrush GradientOrigin="0.5,0.5">
<GradientStop Offset="0" Color="Red"/>
<GradientStop Offset="1" Color="DarkRed"/>
</RadialGradientBrush>
</Ellipse.Fill>
</Ellipse>Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
WPF :)
<Ellipse Stroke="Black" StrokeThickness="1" >
<Ellipse.Fill>
<RadialGradientBrush GradientOrigin="0.5,0.5">
<GradientStop Offset="0" Color="Red"/>
<GradientStop Offset="1" Color="DarkRed"/>
</RadialGradientBrush>
</Ellipse.Fill>
</Ellipse>Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)Ah ok.
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
-
Indeed. We can haz tip/trick plz?
Somebody in an online forum wrote:
INTJs never really joke. They make a point. The joke is just a gift wrapper.
I'm far too lazy to format out a Tip/Trick... Besides, I did it the lazy way, so it's not well-designed or anything... XAML:
<Window x:Class="BlahBlah.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
IsHitTestVisible="False" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Topmost="True" Width="50" Height="50" Left="{Binding X}" Top="{Binding Y}">
<Ellipse Stroke="Black" StrokeThickness="1" >
<Ellipse.Fill>
<RadialGradientBrush GradientOrigin="0.5,0.5">
<GradientStop Offset="0" Color="Red"/>
<GradientStop Offset="1" Color="DarkRed"/>
</RadialGradientBrush>
</Ellipse.Fill>
</Ellipse>
</Window>Then just make a couple properties for X and Y, wire 'em up, set the DataContext, and make a 10ms DispatcherTimer:
private Vector Heading = new Vector(8, 0);
private Size ObjectSize;void tmr_Tick(object sender, EventArgs e)
{
if (ObjectSize.Width == 0 && RenderSize.Width > 0)
ObjectSize = RenderSize;double x = X += Heading.X; double y = Y += Heading.Y; Heading.Y += 1; Heading.Y = Math.Max(-40, Math.Min(40, Heading.Y)); if (y + ObjectSize.Height > SystemParameters.VirtualScreenHeight) Heading.Y = -Math.Abs(Heading.Y); else if (y < 0) Heading.Y = Math.Abs(Heading.Y); if (x + ObjectSize.Width > SystemParameters.VirtualScreenWidth) Heading.X = -Math.Abs(Heading.X); else if (x < 0) Heading.X = Math.Abs(Heading.X);
}
Kiddie stuff... Took five minutes, but then I spent another five tweaking it to make it look a bit better.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
Ian Shlasko wrote:
Where do we begin?
That's uncertain.
Well then how are we going to accidentally destroy the universe? Seriously, you need to think these things through :-D
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)