




已阅读5页,还剩7页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
多媒体软件设计技术多媒体软件设计技术 课程设计报告书课程设计报告书 课程名称课程名称 多媒体软件设计技术 指导教师 指导教师 杨岚老师 二 一二 年 六 月 一 一 引言引言 本次课程设计是为了考察我们对 Visual Basic 的综合运用能力 着 重于多媒体方面的设计 在程序设计的过程中曾参考过有关的资料 并借鉴了一些内容 要求 1 用 Visual Basic 6 0 编写程序 设计并实现一个多媒体应用程序 2 程序必须带注释必须带注释 分为 注释到过程 函数 和 注释到单条语句 两种 注释方式 其中 注释到单条语句 评分较高 注释到过程 函数 评分 较低 无注释或少注释将酌情扣分 3 所有相关文件保存在文件名 学号学号 姓名姓名 文件夹内 4 选题说明 选题说明 学号最后一位数字表示所选题号 如 201004134112 选题为 2 号题 201004134130 选题为 10 号题 5 严禁抄袭 一旦发现有雷同设计 同时取消成绩 严禁抄袭 一旦发现有雷同设计 同时取消成绩 二 二 设计课题设计课题 设计图像多种切换效果 要求 1 必须有淡入 淡出 翻转 滑入 旋转引入等效果 2 设计菜单 三 三 程序设计内容程序设计内容 程序运行情况程序运行情况 设计界面 程序界面 图片的切换效果 滑入 程序源代码程序源代码 Public StopProgram As Boolean 定义开始按钮的能否开始 Public SwapPics As Boolean Private Enum SideSelecting Off 0 HV 1 LRDU 2 All 3 End Enum Dim A As Integer A 进入速度变量 Dim B As Integer B 单步刷新变量 Dim C As Integer C 条宽度 Private Sub cmdStart Click Static StartMode As Boolean 设置开始按钮的 caption 属性 If Not StartMode Then If Not IsReady Then Exit Sub cmdStart Caption 停止 StartMode True RunEffect Picture1 Refresh StartMode False If StopProgram Then Exit Sub If SwapPics Then BitBlt Picture2 hdc 0 0 640 480 Picture3 hdc 0 0 SRCCOPY BitBlt Picture3 hdc 0 0 640 480 Picture1 hdc 0 0 SRCCOPY SwapPictures Picture1 Picture2 Picture3 End If Picture2 Refresh Picture3 Refresh cmdStart Caption 开始 Else mblnRunning False cmdStart Caption 开始 StartMode False End If End Sub Private Sub Form Load With List1 list 的选项 AddItem 滑入 AddItem 从外向内滑入 AddItem 从内向外滑入 AddItem 缩放推入 AddItem 从内缩放推入 AddItem 淡入 AddItem 融入 AddItem 百叶窗 AddItem 旋转引入 AddItem 圆形切出 AddItem 扇形切入 AddItem 双面斜切入 AddItem 斜切入 AddItem 斜切出 End With StopProgram False lngSpeed 1 List1 ListIndex 0 Set Picture1 Picture LoadPicture App Path Effect x1 jpg Set Picture2 Picture LoadPicture App Path Effect2 x1 jpg Set Picture3 Picture LoadPicture App Path Effect x1 jpg End Sub Private Sub Form QueryUnload Cancel As Integer UnloadMode As Integer mblnRunning False StopProgram True Unload Me End Sub Private Sub Frame6 DragDrop Source As Control x As Single y As Single End Sub Private Sub List1 Click A 1 滑入速度设为 1 Select Case List1 ListIndex 选择 list 的内容风别为 0 到 13 Case 0 滑入 B 5 B 单步刷新变量设为 5 Case 1 从外向内滑入 B 4 B 单步刷新变量设为 4 Case 2 从内向外滑入 B 4 B 单步刷新变量设为 4 Case 3 缩放推入 B 5 Case 4 从外向内推入 B 5 B 单步刷新变量 Case 5 淡入 B 2 B 单步刷新变量 Case 6 融入 B 5 C 1 设置条大小为 1 Case 7 百叶窗 A 50 B 1 C 20 Select Case List1 ListIndex Case 8 B 5 Case 9 B 5 Case 10 B 5 Case 11 To 13 B 10 End Select Case Else End Select End Sub Private Function GetSideLRDU As Long GetSideLRDU 4 End Function Private Function GetSideHV As Long GetSideHV 1 End Function Private Function GetPushMode As Long GetPushMode 1 End Function Private Sub RunEffect SwapPics True Select Case List1 ListIndex Case 0 Wipe Picture1 Picture2 GetSideLRDU CLng B 执行滑入函数 Case 1 Wipe In Picture1 Picture2 GetSideHV CLng B 执行从外向内滑入 Case 2 Wipe Out Picture1 Picture2 GetSideHV CLng B 执行从内向外滑入 Case 3 Dim i As Long i 1 Stretching Picture1 Picture3 Picture2 i CLng B GetPushMode 执行缩 放推入 Case 4 Stretching Wipe In Picture1 Picture3 Picture2 GetSideHV CLng B GetPushMode 执行从外向内推入 Case 5 RandomLines Picture1 Picture2 GetSideHV CLng B 执行淡入 Case 6 Bars Draw Picture1 Picture2 GetSideHV CLng B CLng C 执行融入 Case 7 Bars Wipe Picture1 Picture2 GetSideLRDU CLng B CLng C 执行百叶 窗 Case 8 MaskEffect Picture1 Picture2 1 Me hdc CLng B 执行旋转引入 Case 9 MaskEffect Picture1 Picture2 2 Me hdc CLng B 执行圆形切出 Case 10 MaskEffect Picture1 Picture2 3 Me hdc CLng B 执行扇形切入 Case 11 MaskEffect Picture1 Picture2 4 Me hdc CLng B 执行双面斜 切入 Case 12 MaskEffect Picture1 Picture2 5 Me hdc CLng B 执行斜 切入 Case 13 MaskEffect Picture1 Picture2 6 Me hdc CLng B 执行斜切 出 End Select End Sub Private Sub quit Click End End Sub 部分模块 Public Sub Alpha Wipe DestPic As PictureBox PrevPic As PictureBox NewPic As PictureBox Flag As Long Optional BarSize As Long 50 Optional Steps As Long 5 Dim r1 As Long g1 As Long b1 As Long Dim r2 As Long g2 As Long b2 As Long Dim rm As Long gm As Long bm As Long Dim y As Long If IsReady Then Ended False Dim pxWidth As Long pxHeight As Long Dim ScreenTX As Long ScreenTY As Long Dim Xleng As Long Cntr As Long Dim t1 As Long t2 As Long ScreenTX Screen TwipsPerPixelX ScreenTY Screen TwipsPerPixelY pxWidth DestPic ScaleWidth ScreenTX pxHeight DestPic ScaleHeight ScreenTY Select Case Flag Case 1 擦除 Xleng pxWidth BarSize Case 2 过渡 Xleng 255 Case 3 Cntr 1 Xleng Sqr pxWidth pxWidth pxHeight pxHeight 2 Xleng Xleng BarSize End Select Dim UB As Long UB2 As Long GetObjectAPI DestPic Picture Len Bmp1 Bmp1 GetObjectAPI PrevPic Picture Len Bmp3 Bmp3 GetObjectAPI NewPic Picture Len Bmp2 Bmp2 With SA1 cbElements 1 cDims 2 Bounds 0 lLbound 0 Bounds 0 cElements Bmp1 bmHeight Bounds 1 lLbound 0 Bounds 1 cElements Bmp1 bmWidthBytes pvData Bmp1 bmBits End With With SA2 cbElements 1 cDims 2 Bounds 0 lLbound 0 Bounds 0 cElements Bmp2 bmHeight Bounds 1 lLbound 0 Bounds 1 cElements Bmp2 bmWidthBytes pvData Bmp2 bmBits End With With SA3 cbElements 1 cDims 2 Bounds 0 lLbound 0 Bounds 0 cElements Bmp3 bmHeight Bounds 1 lLbound 0 Bounds 1 cElements Bmp3 bmWidthBytes pvData Bmp3 bmBits End With CopyMemory ByVal VarPtrArray Pic1 VarPtr SA1 4 CopyMemory ByVal VarPtrArray Pic2 VarPtr SA2 4 CopyMemory ByVal VarPtrArray Pic3 VarPtr SA3 4 mblnRunning True 开始循环 Do While mblnRunning If mlngTimer lngSpeed Xleng Then Set DestPic Picture DestPic Picture UB UBound Pic1 1 1 UB2 UBound Pic1 2 1 CopyMemory Pic1 0 0 Pic2 0 0 UB UB2 CopyMemory Pic2 0 0 Pic3 0 0 UB UB2 CopyMemory Pic3 0 0 Pic1 0 0 UB UB CopyMemory ByVal VarPtrArray Pic1 0 4 CopyMemory ByVal VarPtrArray Pic2 0 4 CopyMemory ByVal VarPtrArray Pic3 0 4 停止 mblnRunning False 新图片可以使用更多的 bitblt Exit Sub End If Select Case Flag Case 1 擦除 t2 UBound Pic1 1 3 t1 UBound Pic1 2 For int i 0 To t2 Step 3 For int j 0 To t1 GetRGB r1 g1 b1 3 GetRGB r2 g2 b2 2 y int i 3 If y Cntr BarSize Then r1 r2 b1 b2 g1 g2 ElseIf y Cntr BarSize Then rm 255 Cntr y BarSize 255 CheckRGB rm 0 0 r1 r1 rm r2 255 rm 255 g1 g1 rm g2 255 rm 255 b1 b1 rm b2 255 rm 255 End If CheckRGB r1 g1 b1 Pic1 int i int j b1 Pic1 int i 1 int j g1 Pic1 int i 2 int j r1 Next int j Next int i Cntr Cntr Steps Case 2 过渡 For int i 0 To UBound Pic1 1 3 Step 3 For int j 0 To UBound Pic1 2 GetRGB r1 g1 b1 3 GetRGB r2 g2 b2 2 rm 255 Cntr CheckRGB rm 0 0 r1 r1 rm r2 255 rm 255 g1 g1 rm g2 255 rm 255 b1 b1 rm b2 255 rm 255 CheckRGB r1 g1 b1 Pic1 int i int j b1 Pic1 int i 1 int j g1 Pic1 int i 2 int j r1 Next int j Next int i Cntr Cntr Steps Case 3 透明圆型擦除 Dim pxCenterWidth As Long pxCenterHeight pxCenterWidth pxWidth 2 pxCenterHeight pxHeight 2 For int i 0 To UBound Pic1 1 3 Step 3 For int j 0 To UBound Pic1 2 GetRGB r1 g1 b1 3 GetRGB r2 g2 b2 2 y int i 3 rm Sqr pxCenterWidth y pxCenterWidth y pxCenterHeight int j pxCenterHeight int j If rm Cntr Then rm 255 ElseIf rm Cntr BarSize Then rm 0 Else rm 255 Cntr rm BarSize 255 End If CheckRGB rm 0 0 r1 r1 rm r2 255 rm 255 g1 g1 rm g2 255 rm 255 b1 b1 rm b2 255 r
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 旅游景区物业合同终止及旅游服务质量提升协议
- 矿区地质环境修复与矿山资源循环利用合作协议
- 夫妻离婚财产分割与子女抚养、赡养协议范本
- 环保监测监控系统设备维保及数据分析合同
- 离婚诉讼子女抚养权及财产分割与债务清偿协议
- 离婚男方财产分割及子女教育抚养及赡养协议范本
- 离婚后财产分配变更协议书重新签订流程指引
- 《离婚协议书:离婚后共同债务清偿及信用修复协议》
- 民族文化背景下的离婚协议书起草与子女抚养合同
- 离婚协议范本定制与签署程序法律监督合同
- 2024年连云港东海县招聘社区工作者真题
- (零模)南昌市2025年高三年级九月测试语文试卷(含标准答案)
- 燃料电池催化剂研究报告
- 湖北省华大新高考联盟2026届高三上学期9月教学质量测评语文试题(含答案)
- 人工智能应用技术-教学大纲
- 虚拟货币挖矿管理办法
- 2025重庆市涪陵区马武镇人民政府选聘本土人才1人考试参考试题及答案解析
- 2025-2026学年地质版(2024)小学体育与健康三年级(全一册)教学设计(附目录P123)
- DB3302T1135-2022新建小区室内公共体育设施配置和管理规范
- 2025年装载机行业当前竞争格局与未来发展趋势分析报告
- 2025年飞行服务站无人机培训行业现状分析报告
评论
0/150
提交评论