-
2009-05-26
详解VSTS与OFFICE的协同开发:Excel篇
书接上回,在前面两篇文章中,我们结合Office Word和 Office Outlook,分别介绍了如何在Visual Sutton 2010中进行文档级自定义项和应用程序级插件的开发。大家应该都注意到,这两种Office扩展应用几乎都是在宿主程序的某个动作后自动执行,无法跟用 户进行交互。
在第一个文档级自定义项的例子中,如果我们想在文档打开过后,按照需要在合适的位置插入一个请假条,该怎么办呢?同样的在第二个Outlook整理附件的 例子中,如果我们想在收取所有邮件后,手动地进行邮件的分拣处理该如何进行呢?这时,我们就需要用到Office开发的第三种情况:Office Ribbon界面插件。
第一篇:详解VSTS与OFFICE的协同开发:WORD篇
第二篇:详解VSTS与OFFICE的协同开发:Outlook篇通过前面文章的介绍,我们知道在Visual Studio 2010中,Office开发主要有以下三种类型:文档级自定义项,应用程序级插件和Ribbon界面插件。前两种插件应用都是自动加载运行,无法跟用户 进行交互,所以其应用场合有限。在这篇文章中,我们将介绍能够跟用户进行交互,从而能够完成更加复杂的Office任务的Ribbon界面插件。
Ribbon界面插件是在文档级自定义项或者是应用程序级插件的基础上添加Ribbon界面控件而完成的。跟应用程序级插件相类似,Office Ribbon界面插件随着宿主程序的启动而被加载,同时在Office宿主程序的Ribbon界面中添加相应的控件,从而利用这些控件与用户进行交互,实 现相应的功能。在Ribbon界面插件中,你可以自定义Office程序的Ribbon UI,可以在功能区以控件形式的组织相关的命令,完成相应的功能。界面插件通过在Office程序的“Add-ons”Ribbon页面中添加相应的控 件,使它们易于查找,从而与用户进行界面交互,实现相应的功能。

图1 Ribbon界面插件添加的Ribbon界面在本文中,我们以Excel为例,介绍如何利用Ribbon界面插件,获取用户的在界面上的输入输入,然后根据用户的输入对Excel的数据进行计算和处理。在进行具体的开发之前,我们还是先来了解一下Excel对象模型。
-
2009-05-26
步步学ACTIVEX网页控件开发:控件的属性、方法和事件
ActiveX控件和Web页面之间的通信是 通过ActiveX控件的属性,方法和事件来完成的。为了演示这些内容,我们需要创建一个带有输入框的页面。当页面上的“提交”按钮被点击后,输入的文本 将通过一个输入参数自定义属性传递给ActiveX控件。然后,控件的一个函数将被调用,复制这些文本到一个输出参数自定义属性。
第一篇:步步学ACTIVEX网页控件开发:创建控件
第二篇:步步学ACTIVEX网页控件开发:添加对GIF的支持
第三篇:步步学ACTIVEX网页控件开发:为控件创建网页
第四篇:步步学ACTIVEX网页控件开发:创建安全的ActiveX控件接着,将触发一个事件,将这些文本显示到页面上。我们将通过下面这些步骤来实现这一ActiveX控件和Web页面之间的通信过程:
1.首先,我们将为ActiveX控件创建自定义属性,用于发送和接收文本。在类视图中,展开MyActiveXLib,然后选择 _DMyActiveX。右键单击_DMyActiveX,在上下文菜单中选择“Add”->“Add Property”。在”添加属性向导”对话框中,选择BSTR作为属性类型,然后输入“InputParameter”作为属性的名称。至于对话框中的 其它内容,向导将自动为我们生成。最后,点击“Finish”按钮关闭对话框,向导将为我们创建相应的代码。同样地,添加另外一个BSTR类型的属性 OutputParameter。

图9 添加属性向导 -
来自Coding Horror上的一组漫画,很有意思,深刻的说明了如何激发一个程序员?
老张,医生说你可以听见我说话,虽然你看起来面带菜色。我来只是想告诉你,小陈干把一切事情都搞定了,请放心休息。他甚至发现了你的代码中的一个性能瓶颈,并且说现在性能至少能够提高两倍。
那不可能,走,现在去办公室!
呵呵,激发程序员的基本原则就是:
Don't try to race sheep,
Don't try to herd race horsesIf you have neophyte developers, herd them with maxims, guidelines and static rules. If you have experienced developers, rules are less useful. Instead, encourage them to race: engage in a little friendly competition and show off how good they are to their peers.
-
2009-05-22
Visual Studio 2010安装流水账
自从Visual Studio 2010 CTP发布之后,等了许久,微软终于在周三发布了Visual Studio 2010的beta1。很快地从MSDN把这个大家伙下载下来后,在Windows 7 RC上进行了安装体验,看看下一代Visual Studio配合下一代Windows操作系统,到底啥样。(安装过程都是在VPC中进行的)
首先,塞入安装光盘,出来安装界面:

在beta1的安装程序中,微软没有只提供了Visual Studio的安装,大约是文档还没有准备好,并没有随着光盘提供MSDN的安装。
点击安装Visual Studio 2010进入其安装程序:

废话两句,整个安装界面以蓝色为基调,显得非常清新自然,个人比较喜欢。在收集完系统信息后,安装程序引导进入许可证页面,我们当然是选择“已经阅读了。。”,实际上根本没有看-_-!

选中“已经阅读。。。”进入下一步安装组件的选择。到此为止,整个安装程序跟之前的Visual Studio 2008并没有太大不同,最大的改变是下面这个安装组件选择界面:

在这里,安装程序给我们提供了两个简便选项:.Net开发和C++开发。这也可以看出Visual Studio支持两种类型的开发:所有基于.NET Framework的开发,包括C#,F#, VB10,ASP等等,另外一个方面就是还保持着旺盛生命力的传统C++开发,虽然.NET Framework也试图吃掉C++,但是Visual Studio还是将其单独列出,也体现了C++的重要性。当然,我们也可以对安装组件进行自定义的选择:

F#赫然在目啊!
另外一个重要的,大家发现Visual Studio 2010的磁盘需求居然达到了5.1G!真是太夸张了,一个软件的体积几乎达到了一个操作系统的体积。
这里,我们就全选安装所有组件了,单击下一步,进入具体的安装进程:

这里我们可以看到所有的安装组件。在整个安装过程中,当完成.NET Framework的安装后,操作系统会重新启动一次:

另外,可能因为是Windows 7 RC的缘故,安装SQL Server的时候,会出现两个关于兼容性的报告,直接忽略继续进行就可以了。

总体而言,整个安装程序在Windows 7上的安装速度还算可以,不一会就按照完成了。
跟Visual Studio 2008一样,第一次启动Visual Studio 2010会出现开发环境喜好的选择:

完成开发环境的设置后,Visual Studio第一次启动:Wow!新的基于WPF的界面真是漂亮!

到此整个安装就完成了,因为是全新安装,除了几个兼容性问题外,一切都还算顺利。不知道从Visual Studio 2008升级的时候,会不会越到各种各样的麻烦,只好到时再说了。整体而言,Visual Studio 2010让人眼前一亮,给人惊艳的感觉。还没有实际使用其开发东西,不知道使用起来如何,希望不会辜负其“10 is new 6”的口号。期待。
更多使用体验会继续报道。
-
2009-05-20
个人品牌: 8 Tips That Will Help You Stand Out
Personal Branding:
8 Tips That Will Help You Stand Out
– Catherine Kaputa, CIO
May 18, 2009
To be successful in business today, you need to have a distinct personal brand so that you can stand out from the crowd. Personal branding involves articulating a simple, clear statement of who you are, doing it consistently, and delivering on it again and again, so that when people think of, say, business turnarounds, they think of you. Or when people think of you, they think of a leader who gets companies back on track. Your brand should represent something different, relevant and valuable.
Barack Obama used personal branding to great effect during the presidential campaign. He built his brand around the idea of change, which turned out to be a very compelling concept, and he packaged his brand idea with a strong visual identity and a phenomenal verbal identity-—an eloquent message that he delivered superbly. Obama's clear, compelling brand (not to mention his grass-roots organizing and ability to raise money) allowed him to defeat more well-known, experienced competitors.
Personal branding is just as important to business and technology professionals as it is to politicians, especially in a down economy. Whether you're a recent victim of a layoff or you're employed but worried about job loss, personal branding can make all the difference in your future job security and career success. By making yourself known for something special-—whether it be a unique skill, attitude or problem-solving approach-—you can make a stronger impression on prospective employers and/or demonstrate to your existing employer that you're indispensible.
Most of us need to devote attention to our personal brands. The following questions will help you determine what aspects of personal branding you need to focus your attention on:
- Your message: Can you explain your big idea clearly in a couple of sentences, so that people know what's different, relevant and special about you?
- Your scope: If people were to Google your name, would they discover high-quality information about you and your accomplishments?
- Your market: Can you clearly define your key target markets and the best way to market yourself to them?
- Your appearance: Do you have a visual identity that appeals to your target markets, is consistent with your personal brand and is different from others?
- Your style: Do your personality and your leadership style engage others?
If you answered No to any of the above questions, you have work to do. Here are eight tips for creating a strong personal brand.
Stay focused. A brand maven once said to me, "There is no "and' in brand." The maven's point: The more specifically you define who you are and what you do, the better chance you'll have of selling yourself. It's counter-intuitive because so many people think that if they define themselves broadly, they'll have more options. In fact, the opposite occurs. If you come across as a Jack or Jill of All Trades, you will confuse people. People will wonder how good you are at any one thing if you say you are good at so many.
Differentiate your brand. Being like everyone else will stunt your success. Ask yourself, "What's different, relevant and special about me?" Find the "white space"—a brand position that you can own, that's not associated with anyone else. When communicating your uniqueness to others, use analogies, such as, "I'm a cross between X and Y," or "I'm X on steroids."
When others zig, you should zag. Develop your own game plan for success: your own career path, visibility strategy and credentials. For example, during the presidential campaign, the politicians Obama competed against took a traditional fundraising approach with dinners and letter appeals. They zigged while Obama zagged. He built the largest campaign war chest ever by using the internet and encouraging small donations from individual contributors.
Use words wisely. One of the hottest ideas in business today is using a story to bring a company mission, project or accomplishment to life. Stories have been powerful for centuries because they are a memorable way to convey complex ideas. Work on your communication skills so that you are known for your adroit business stories and interesting presentations that people remember long after the PowerPoint ends. Also, master the elevator speech, a thirty-second personal "commercial" you can use when networking and when pitching yourself for new jobs or stretch assignments with your existing employer.
Make a visual statement. Like it or not, you are a package, just like a product on a shelf. Spend time thinking about how to make your image more powerful and distinct, whether it's by working on your posture or by updating your clothes. Women may have an advantage over men here, as they have many more "imaging tools" to work with, including their hairstyles, makeup, clothes, shoes and accessories. Of course, men can distinguish themselves with tailored clothes and shoes, too. Men also have the advantage of their physical size, which, studies show, gives them a more authoritative image.
Establish powerful alliances. The people, projects, causes and organizations with which you are affiliated help define who you are. For example, working for a Fortune 500 company or having graduated from an Ivy League school has caché, which helps your brand. If you don't have a Fortune 500 or Ivy League on your résumé, you can cultivate brand alliances. Get involved with alumni, community, professional, and/or philanthropic organizations that align with your personal brand and that will help you network.
Define and prioritize your target markets. Brand managers think in terms of markets. If you work in a company, your boss is your key target market, followed by other senior executives. Your secondary target market will likely include colleagues, clients, your network and your staff. All of these markets play an important role in your success; their perception of your abilities and accomplishments can make or break you.
Take charge of your brand. Just as every brand manager assesses his brand against competitors every year to make sure that his brand is relevant and up-to-date, your personal brand needs periodic upkeep, too. What worked for your positioning last year may not work this year. The world is dynamic, and you want to stay abreast of new opportunities and threats. Complacency is the death knell for any brand. If your capabilities or accomplishments seem out of step with the current marketplace and with your competitors, it may be time to revisit, reinvent or update your brand.
In today's over-communicated society, the brands that stand for something relevant and that build positive perceptions are the ones that succeed. Follow these tips, and your brand will work wonders for you.
Catherine Kaputa is a brand strategist, speaker and the founder of SelfBrand LLC, a NYC-based personal branding firm. Her newest book is The Female Brand: Using the Female Mindset to Succeed in Business (Davies-Black, 2009, www.femalebrand.com). She is also the author of U R a Brand: How Smart People Brand Themselves for Business Success, winner of the Ben Franklin award for Best Career Book in 2007.












