最近发现观察者模式在很多应用领域确实很有作用,想探讨一下在VB中,如何利用组件技术实现观察者模式。

解决方案 »

  1.   

    呵呵
    看了一下
    模型就是类似ms graph图表对象,当改变表格的信息时,图的信息自动改变,同样,反过来也可以
    这种交互也称为发布-订阅模式在组件中采用COM+的发布-订阅来解决
    在文档中心搜COM+既可以找到
      

  2.   

    http://dev.csdn.net/develop/article/14/14343.shtm
      

  3.   

    给你推荐一本书:<<Microsoft Visual Basic Design Patterns>>
    以下是图书的基本信息:
    PUBLISHED BY
    Microsoft Press
    A Division of Microsoft Corporation
    One Microsoft Way
    Redmond, Washington 98052-6399Copyright &copy; 2000 by William StamatakisAll rights reserved. No part of the contents of this book may be reproduced or transmitted in
    any form or by any means without the written permission of the publisher.Library of Congress Cataloging-in-Publication Data
    Stamatakis, William.
      Microsoft Visual Basic Design Patterns / William Stamatakis.
              p.     cm.
          Includes index.
          ISBN 1-57231-957-7
          1. Microsoft Visual BASIC.     2. BASIC (Computer program language)   I. Title.