delphi XE5下 andriod 广告图片的demo
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了delphi XE5下 andriod 广告图片的demo,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3559字,纯文字阅读大概需要6分钟。
内容图文
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>
1、TTabControl外观
TTabControl的外观由属性TabPosition控制,可选项包括:
tpTop 选项tab在控件上方
tpBottom 选项tab在控件下方
tpNone 以原点形式显示选项tab,在控件下方,如下图:
tpDots 以方格形式显示选项tab,在控件下方,如下图:
以下是源代码:
//每五秒滚动一次<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>Procedure TForm1.FormActivate(Sender: TObject);
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>Begin
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> Timer1.Interval := 5000;
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>End;
//自动滚动;
Procedure TForm1.Timer1Timer(Sender: TObject);
Begin
If TabControl1.ActiveTab <> TabControl1.Tabs[TabControl1.TabCount-1] Then
TabControl1.ActiveTab := TabControl1.Tabs[TabControl1.TabIndex+1]
Else
TabControl1.ActiveTab := TabControl1.Tabs[0];
End;
//手势编程,也可以不需要;
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>Procedure TForm1.TabControl1Gesture(Sender: TObject; const EventInfo: TGestureEventInfo; var Handled: Boolean);
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>Begin
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> Case EventInfo.GestureID Of //识别事件的手势
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> sgiLeft: //由右向左滑动手指
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> Begin
//如果不是最后一个tab,则选择下一个tab;如果是,则选择第一个。
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> If TabControl1.ActiveTab <> TabControl1.Tabs[TabControl1.TabCount-1] Then
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> TabControl1.ActiveTab := TabControl1.Tabs[TabControl1.TabIndex+1]
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> Else
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> TabControl1.ActiveTab := TabControl1.Tabs[0];
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> Handled := True; //已完成代码处理
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> End;
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> sgiRight://由左向右滑动手指
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> Begin
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> //如果不是第一个tab,则选取前一个tab;如果是,则选择最后一个。
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> If TabControl1.ActiveTab <> TabControl1.Tabs[0] Then
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> TabControl1.ActiveTab := TabControl1.Tabs[TabControl1.TabIndex-1]
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> Else
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> TabControl1.ActiveTab := TabControl1.Tabs[TabControl1.TabCount-1];
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> Handled := True;//已代码处理
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> End;
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘> End;
<SPAN style=‘font-family: "宋体"; font-size: 10.5pt; mso-spacerun: "yes";‘>End;
原文:http://www.cnblogs.com/lingzhiwen/p/3560919.html
内容总结
以上是互联网集市为您收集整理的delphi XE5下 andriod 广告图片的demo全部内容,希望文章能够帮你解决delphi XE5下 andriod 广告图片的demo所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。