我打算做一个计算机模拟练习系统,最好是单机版。里面有判断题,Word题,Excel题还有PowerPoint题,做完之后可以马上阅卷出分数,但是没有什么头绪?能否给个设计思路!最好能具体点!或者有没有参考资料!我的Emai:[email protected]

解决方案 »

  1.   

    判断题比较简单,表里面存储题目和答案。
    Word题目和Excel题目就不好搞了。
      

  2.   

    Word题目 主要是判断里面的宏命令
    Excel题目 主要是判断里面的宏命令 和 个别cell的值宏命令可以参考microsoft出的书  具体叫什么忘了  写得挺细的  
    以前做过一部分word的判分
    刚做完VFP的判分   还不知道行不行
      

  3.   

    下面是ppt的一点属性
    var
      //pptappl: OleVariant;
      //pptpres: OleVariant;
      //vbool: Boolean;
      pstr: OleVariant;
      i: integer;
      //src: OleVariant;
    begin
        try
          pptappl:=CreateOleObject('powerpoint.application');
        except
            MessageDlg('没有正确安装Office软件!',mtError,[mbok],0);
            Exit;
        end;
        pptappl.Visible:= true;
        //幻灯片版本
        //ShowMessage(Format('Powerpoint version: %s',[pptappl.Version]));
        pptappl.Presentations.Open('D:\test.ppt', False, False, True);
        //页面大小
        //ShowMessage(Format('大小:%s',[pptappl.ActivePresentation.PageSetup.SlideSize]));
        //ShowMessage(PPTSize);
        //幻灯片起始值
        //ShowMessage(Format('%s',[pptappl.ActivePresentation.PageSetup.FirstSlideNumber]));
        //ShowMessage(PPTFirstSlideNumber);
        //方向
        //ShowMessage(Format('方向:%s',[pptappl.ActivePresentation.PageSetup.SlideOrientation]));
        //ShowMessage(PPTSlideOrientation);
        //时间和日期
        //vbool:= pptappl.ActivePresentation.Slides.Range(1).HeadersFooters.DateAndTime.UseFormat;
        //if not vbool then
        //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.Range(1).HeadersFooters.DateAndTime.text]))
        //else
        //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.Range(1).HeadersFooters.DateAndTime.Format]));
        //幻灯片编号
        //vbool:= pptappl.ActivePresentation.Slides.Range(1).HeadersFooters.SlideNumber.Visible;
        //if vbool then
        //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.Range(1).HeadersFooters.SlideNumber.Visible]));
        //页脚
        //vbool:= pptappl.ActivePresentation.Slides.Range(1).HeadersFooters.Footer.visible;
        //if vbool then
        //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.Range(1).HeadersFooters.Footer.Text]));
        //标题幻灯片中不显示
        //vbool:= pptappl.ActivePresentation.SlideMaster.HeadersFooters.DisplayOnTitleSlide;
        //if vbool then
        //ShowMessage('aaa');
        ///
        //幻灯片数
        //ShowMessage(Format('幻灯片数:%s',[pptappl.ActivePresentation.Slides.Count]));
        //pptappl.activep
        //放映类型(演讲者=1,观众=2,展台=3)
        //showmessage(format('放映类型:%s',[pptappl.ActivePresentation.SlideShowSettings.showtype]));
        //切换效果
        //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.Range(1).SlideShowTransition.EntryEffect]));
        //幻灯片切换速度
        //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.Range(1).SlideShowTransition.speed]));
        //循环是按Esc退出
        //vbool:= pptappl.ActivePresentation.SlideShowSettings.LoopUntilStopped;
        //if vbool then
        //   ShowMessage(format('循环是按Esc退出:%s',[pptappl.ActivePresentation.SlideShowSettings.LoopUntilStopped]));
        //换片方式(人工=1,排列时间=2)
        //ShowMessage(Format('换片方式:%s',[pptappl.ActivePresentation.SlideShowSettings.AdvanceMode]));
       //放映时旁白(有=-1,无=0)
        //vbool:=pptappl.ActivePresentation.SlideShowSettings.ShowWithNarration;
        //if vbool then
        //   ShowMessage(Format('放映时旁白:%s',[pptappl.ActivePresentation.SlideShowSettings.ShowWithNarration]));
       //放映时动画(有=-1,无=0)
       //vbool:= pptappl.ActivePresentation.SlideShowSettings.ShowWithAnimation;
       //if vbool then
       //   ShowMessage(Format('放映时动画:%s',[pptappl.ActivePresentation.SlideShowSettings.ShowWithAnimation]));
       // 放映范围
       //ShowMessage(Format('放映范围:%s',[pptappl.ActivePresentation.SlideShowSettings.RangeType]));
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.SlideShowSettings.StartingSlide]));
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.SlideShowSettings.EndingSlide]));
       //绘图笔颜色
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.SlideShowSettings.PointerColor.SchemeColor]));
       //设计模版
       //pstr:= pptappl.ActivePresentation.TemplateName;
       //ShowMessage(pstr);
       //幻灯片版式
       //pstr:= pptappl.ActivePresentation.slides.range(6).layout;
       //ShowMessage(pstr);
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.Range(2).Layout]));
       //背景预设颜色
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.range(6).Background.Fill.PresetGradientType]));
       //底纹式样
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.range(6).Background.Fill.GradientStyle]));
       //背景纹理
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.range(3).Background.Fill.PresetTexture]));
       //背景图案  Pattern
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.range(3).Background.Fill.Pattern]));
       //背景图片   TextureName                                              //Fill.type.LinkFormat.SourceFullName
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.range(3).Background.fill.fillformat.application]));
       //                                                                                LinkFormat.SourceFullName
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.range(1).shapes.item(4).oleformat.application.name]));
       //第一张幻灯片有多少形状
       //if pptappl.ActivePresentation.Slides.range(1).shapes.count>0 then
       //   ShowMessage(IntToStr(pptappl.ActivePresentation.Slides.range(1).shapes.count));
       for i:=1 to pptappl.ActivePresentation.Slides.range(1).shapes.count do
       begin
           //第一张幻灯片形状是否是文本框
          if pptappl.ActivePresentation.Slides.range(1).shapes.item(i).HasTextFrame then
             begin
              //显示文本框里的文本
              showmessage(pptappl.ActivePresentation.Slides.range(1).shapes.item(i).TextFrame.TextRange.Text);
              //文本字体
              pstr:= pptappl.ActivePresentation.Slides.range(1).shapes.item(i).TextFrame.TextRange.font.NameFarEast;
              ShowMessage(pstr);
              //文本大小
              ShowMessage(IntToStr(pptappl.ActivePresentation.Slides.range(1).shapes.item(i).TextFrame.TextRange.font.size));
              //文本颜色
              ShowMessage(pptappl.ActivePresentation.Slides.range(1).shapes.item(i).TextFrame.TextRange.font.Color.rgb);
              end
           else
              ShowMessage('不是文本框!');
       end;
       //返回指定的 OLE 对象的程序标识符 (ProgID)。
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.range(2).shapes.item(3).oleformat.ProgID]));
       //返回图表类型
       //ShowMessage(format('%s',[pptappl.ActivePresentation.Slides.range(2).shapes.item(3).oleformat.object.ChartType]));
       //返回图表数值轴的标题
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.range(2).shapes.item(3).oleformat.object.Axes(xlValue).AxisTitle.text]));
       //
       //ShowMessage(Format('%s',[pptappl.ActivePresentation.Slides.range(2).shapes.item(3).oleformat.object.Axes(xlValue).AxisTitle.text]));
        Exit;
        pptappl.Quit;
        pptappl := UnAssigned;
    end;
      

  4.   

    word,excel网上的例子特别多,
    就是用宏录制下你的操作,看它的属性,
    在delphi里都是可以用的
      

  5.   

    你有没有用过计算机考试系统?
    用过的话,照着做就行了。
    给点提示,不管什么题目,不是文本就是图片,具体内容评分根据自己的系统来,word题目不是非要使用word的,或者非要有word的机器才能考,如果你的考试系统要求目标机很多软件,那时不是目标机都要安装很多软件,这样反而不是好的考试系统,难道你考word2000,我机器上装了word2003就不能考了?
    提示下我看到的word题目,word界面与菜单全部是图片,如果要求用户点击‘新建’,就在‘新建’菜单上加个image或者什么控件,但是内部不要用图片,然后接受image的click,就表示用户点击了‘新建’,其他的控件也行,关键是不影响显示和能接受事件。
      

  6.   

    word界面完全可以是假的,只要考生看着像真的word就行了。