`

SSD04 Practical Quiz 4 个人解答

阅读更多


Scrolling a Map

Description

Exercise 8, requires that you learn to scroll the world map from the Date /Time Control Panel of Windows/Windows NT. In the current quiz, Quiz 4, you must scroll a map, starting with only a map in jpg format. The map used is a digitized version of a hand-colored engraving, originally published in 1856. It depicts the Roman Empire at its greatest extent.

Since this is the Roman Empire, center the map on Roma and choose three more points. The executable uses Gaul, Palestine, and India. When a location is selected, the map should scroll to that approximate position.

Note: the scrolling map will look odd to the modern eye since, in all settings but Roma, the tip of the Iberian Peninsula will reach to the west, wrapping around and touching India!

Map courtesy of Baldwin's Old Maps & Prints, PO Box 3515 Norfolk, Virginia 23514 (757) 625-1888.

Resources

  • An executable like the application you are asked to create: click QPr4.exe . (From Internet Explorer, select the "Run this program" option of the "File download" dialog box that appears—from Netscape, save and double-click the file QPr4.exe.)
  • The JPEG image of the map of the Roman Empire

Submission

Submit the following files:

  • QPr4.resx
  • QPr4.vb
  • QPr4.vbproj
  • Any image files your project uses directly

--------------------------------------------------------------------------------------------------------------------------------

我认为这个题目的难度在于如何将事件放置好,我在刚开始的时候将redraw放在了selectchanged里面,导致每次在redraw时被一些控件覆盖了。

Public Class MainForm


    Private Sub redrawImage(ByVal sender As System.Object, ByVal e As Windows.Forms.PaintEventArgs) Handles MainPB.Paint

        Dim l As Integer
        Select Case Me.LocationCB.SelectedIndex
            Case 0
                l = (160)
            Case 1
                l = (0)
            Case 2
                l = (220)
            Case 3
                l = (80)
        End Select

        Dim r As Rectangle
        r.Y = 0
        r.X = l
        r.Width = My.Resources.RomanEmpire.Width
        r.Height = My.Resources.RomanEmpire.Height
        e.Graphics.DrawImage(My.Resources.RomanEmpire, r)
        r.X = -r.Width + l
        e.Graphics.DrawImage(My.Resources.RomanEmpire, r)

    End Sub

    Private Sub LocationCB_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LocationCB.SelectedIndexChanged
        Me.MainPB.Refresh()
    End Sub

End Class

 关键点:

  1. MainPB是picture box 控件
  2. 每次不是直接redraw而是调用refresh 方法
  3. 让redraw在paint even 中被调用
  • 大小: 18 KB
分享到:
评论
2 楼 conejita 2009-05-07  
Thank you very much! You saved my life here!
1 楼 qianjigui 2009-02-08  
Feedback for Quiz Practical 4 (v2.0)
Total Score: 88/100

    * Elements
      Score: 45/50

          o Map Image
            Score: 20/25
            A minor flaw or error exists in the map Image. -5

          o ComboBox
            Score: 25/25

    * Functions
      Score: 95/100

          o Functions
            Score: 35/40
            A minor flaw or error exists. -5

    * GeneralIssues
      Score: 8/10

          o Good Programming Practices
            Score: 2/3
            The code is not properly indented. -1

          o Good Usability Practices
            Score: 3/4
            The form does not display in the center of the monitor screen when it is first loaded. -1

          o Submission Completeness
            Score: 3/3

相关推荐

    ssd3 practical quiz 6

    ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5

    ssd3 practical quiz 3

    ssd3 practical quiz 3ssd3 practical quiz 3ssd3 practical quiz 3ssd3 practical quiz 3ssd3 practical quiz 3ssd3 practical quiz 3ssd3 practical quiz 3

    SSD4 Practical Quiz4 答案

    SSD4 Practical Quiz4 是一个针对固态存储技术(Solid State Drives)的实践测试,主要涵盖了关于SSD的工作原理、性能优化、故障诊断和维护等方面的知识。在这个测试中,参与者可能面临的问题可能涉及以下几个关键...

    ssd3 practical quiz 8

    ssd3 practical quiz 8ssd3 practical quiz 8ssd3 practical quiz 8ssd3 practical quiz 8ssd3 practical quiz 8ssd3 practical quiz 8

    ssd3 Practical Quiz 7 答案

    SSD3,全称为“Solid State Drives 3”,通常是指...以上就是关于SSD3的一些关键知识点,对于解答"Practical Quiz 7"会有很大帮助。了解并掌握这些内容,不仅能够应对考试,还能在实际工作中更好地理解和应用SSD3技术。

    SSD04 Practical Quiz 1 个人解答

    标题"SSD04 Practical Quiz 1 个人解答"指的是一个实践测试,可能来自某个课程或培训计划,编号为SSD04的第1个实践环节。这个测试旨在检验参与者对于特定技术或概念的理解和应用能力。 描述中提到的“我的解答”...

    SSD06 Practical Quiz 1 个人解答

    我的解答,没做测试 博文链接:https://qianjigui.iteye.com/blog/269525

    ssd3 practical quiz4

    【标题】"ssd3 practical quiz4" 是一个与软件工程相关的实践测验,很可能源自2007年卡耐基梅隆大学的课程。这个测验可能旨在检验学生对软件开发过程、软件设计原则、编程技能以及项目管理的理解。 【描述】提及的...

    SSD06 Practical Quiz 2 个人解答

    【SSD06 实践小测 2 个人解答】主要涵盖了两个关键知识点:源码分析和工具使用。在这个实践小测中,作者通过撰写博客(博文链接:https://qianjigui.iteye.com/blog/282718)分享了解答过程,这些内容可能涉及编程...

    SSD04 Practical Quiz 2 个人解答

    【标题】"SSD04 实践测试2 个人解答" 在本次实践测试中,我们主要探讨了与SSD(Solid State Drive)相关的技术问题,这包括但不限于存储原理、性能优化以及工具应用。SSD是一种非易失性存储设备,使用固态电子存储...

    ssd3 practical quiz 2

    ssd3 practical quiz 2ssd3 practical quiz 2ssd3 practical quiz 2ssd3 practical quiz 2ssd3 practical quiz 2ssd3 practical quiz 2ssd3 practical quiz 2ssd3 practical quiz 2

    ssd3 practical quiz2

    【标题】"ssd3 practical quiz2"是一个与软件工程相关的实践测验,可能是课程"Software System Development 3"(SSD3)的一部分。这个测验可能涉及了软件开发过程中的实际操作和问题解决,旨在检验学生在项目管理和...

    ssd3 practical quiz 5

    ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5ssd3 practical quiz 5

    SSD3 Practical Quiz8

    SSD3 Practical Quiz8 2009 StudentArrayList.java

    ssd3 practical quiz 1

    ssd3 practical quiz 1ssd3 practical quiz 1ssd3 practical quiz 1ssd3 practical quiz 1ssd3 practical quiz 1 ssd3 practical quiz 1

    ssd3 practical quiz6

    "ssd3 practical quiz6"很可能是某个教育课程或培训项目的一部分,旨在测试或提升学员对SSD技术及其应用的理解。 在这个2007年的卡耐基软件工程网络教材中,"ssd3"可能指的是课程的序列号或者级别,暗示这已经是...

Global site tag (gtag.js) - Google Analytics