| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 778 人关注过本帖
标题:[求助]C#中怎么创建一个浮动广告?
只看楼主 加入收藏
qingxi
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2006-2-16
收藏
 问题点数:0 回复次数:3 
[求助]C#中怎么创建一个浮动广告?
问题如题
搜索更多相关主题的帖子: 广告 
2006-06-14 08:48
蓝色sky
Rank: 1
等 级:新手上路
帖 子:79
专家分:0
注 册:2006-6-3
收藏
得分:0 
楼主:

你知道后,不要忘了告诉我!
邮箱是kangle0925@126.com

我是一个普通人 但,我比普通人更加努力!
2006-06-21 16:28
leisky
Rank: 1
等 级:新手上路
帖 子:253
专家分:0
注 册:2006-5-22
收藏
得分:0 

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace floatingForm
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Timer timer1;
private System.ComponentModel.IContainer components;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 10;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
this.label1.Font = new System.Drawing.Font("华文彩云", 47.99999F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.ForeColor = System.Drawing.Color.SandyBrown;
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(360, 101);
this.label1.TabIndex = 0;
this.label1.Text = "圣诞快乐!";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(360, 101);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label1});
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Form1";
this.Text = "漂浮的窗口";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form2());
}

private void timer1_Tick(object sender, System.EventArgs e)
{
Point p = new Point(this.DesktopLocation.X + 1, this.DesktopLocation.Y);
this.DesktopLocation = p;
if (p.X == this.DesktopBounds.Width)
{
Point p2 = new Point(0,370);
this.DesktopLocation = p2;
}
}

private void Form1_Load(object sender, System.EventArgs e)
{
Point p = new Point(0,370);
this.DesktopLocation = p ;
}
}
}


2006-07-08 09:17
hl0071
Rank: 1
等 级:新手上路
帖 子:125
专家分:0
注 册:2005-11-11
收藏
得分:0 
又学到一点新知识

一切都是快乐的
2006-07-09 13:22
快速回复:[求助]C#中怎么创建一个浮动广告?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014135 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved