开发工具与关键技术:WPF
先用Visual Studio新建一个WPF窗口,随便命名,在解决方案资源管理器里新建一个images文件夹存放时钟图片;图片自己去百度找;
双击创建的xaml窗口,编辑设计器,
Xaml代码如下:
<Window x:Class="WpfApplication.Window6"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Margin="2" Height="327" Width="311"
AllowsTransparency="True"
WindowStyle="None" Background="Transparent"
WindowStartupLocation="CenterScreen"
Icon="ICO/Icon013.ico"
ResizeMode="NoResize" Topmost="False" Opacity="1">
<Grid Width="300" Height="300" MouseLeftButtonDown="Grid_MouseLeftButtonDown">
<Image Source="images/3.png"></Image>
<Label Name="icon" Foreground="White" Margin="0,0,0,211" HorizontalAlignment="Center" VerticalAlignment="Bottom" Height="Auto" Width="Auto" FontSize="13" >clock</Label>
<Label Name="year" Foreground="White" Margin="0,91,0,0" HorizontalAlignment="Center" VerticalAlignment="Top" Height="Auto" Width="Auto"></