SharpStyle Labs

Creativity is coming up with new things. Innovation is doing new things. We make software that helps you do both.

  • Pages

  • a

  • Archives

Archive for March, 2007

Flash OCX control and Visual Studio 2005 issues

Posted by sharpstyle on March 28, 2007

Cross posted here SharpStyle Neutron blog.

As I was preparing for tutorial of using SharpStyle Neutron to develop an ActionScript project and Windows Forms within one solution, I ran into the following issue: while there are a number of references on the web on how to use Flash OCX within Visual Studio 2003, there are only a handful of results related to Visual Studio 2005 and most of them document the problems that people are having.

Following the steps from this article (Macromedia – Developer Center Embedding Macromedia Flash Player in a C# Application) produce the following errors:

  • There is a popup stating that VS ”Failed to import the ActiveX control.  Please ensure it is properly registered
  • If you examine Error List, under Warnings, you will see the following

Could not resolve dependent COM reference “stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.  

Failed to create the wrapper assembly for type library “AxShockwaveFlashObjects”. Exception of type ‘Microsoft.Build.Tasks.ComReferenceResolutionException’ was thrown.

The referenced component ‘AxShockwaveFlashObjects’ could not be found. Failed to create the wrapper assembly for type library “AxShockwaveFlashObjects”. Exception of type ‘Microsoft.Build.Tasks.ComReferenceResolutionException’ was thrown. 

I found the following Unable to add Flash 8 control in VS2005 – Tentative workaround blog post from 2005-12-07, but the instructions there didn’t work. After doing a few more searches I found the following forum page in French (translated page / original page)

Here is what needs to be done:

  • Open Visual Studio 2005 command prompt and execute the following:
    • aximp.exe – source “C:\WINDOWS\system32\Macromed\Flash\Flash9b.ocx”
  • This will generate the following files. Items in bold are the important ones:
    • AxShockwaveFlashObjects.dll
    • AxShockwaveFlashObjects.pdb
    • ShockwaveFlashObjects.dll
    • AxShockwaveFlashObjects.cs

  • In Visual Studio, add the references to the 2 dlls generated by aximp (I copied them from “C:\Program FIles\Microsoft Visual Studio 8\VC” to the root of the project): 

  • Add namespaces to the imports section

using AxShockwaveFlashObjects;
using ShockwaveFlashObjects;

  • And here is some sample code to display SWF
AxShockwaveFlash axShockwaveFlash = new AxShockwaveFlash();
axShockwaveFlash.Location = new System.Drawing.Point(50, 50);

this.Controls.Add (axShockwaveFlash);
//this.Show(); // Avoids InvalidActiveXStateException.

axShockwaveFlash.Movie = "D:\\test.swf";
//* it is important to set Size after specifying Movie property
//* if Size is specified before, it is ignored
axShockwaveFlash.Size = new System.Drawing.Size(20, 20);
axShockwaveFlash.Play();
 
References:

~Mike

Posted in Flash, Flash Player, Visual Studio, Visual Studio 2005, Web Development, Winforms Development | 17 Comments »

Clearing Flash 8 Recent Items list

Posted by sharpstyle on March 25, 2007

This is a follow up on my previous post: Clearing Visual Studio recent projects list

 

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Macromedia\Flash 8\Recent File List]

[HKEY_CURRENT_USER\Software\Macromedia\Flash 8\Recent File List]

Posted in Uncategorized | Leave a Comment »

Clearing Visual Studio recent projects list

Posted by sharpstyle on March 24, 2007

I was in the process of recording a number of tutorials for SharpStyle Neutron and I wanted to make sure that my Visual Studio does not display a list of unrelated projects in the “recent projects list”.

After spending some time on Google, here is the path in the registry that stores that list:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList

visual-studio-mru-list.PNG 

First, I was planning to write a VBS that iterates over entries and deletes them. Then I found that by providing “-” in front of the branch of “.reg” file, it actually deletes that branch.

Here is my “.reg” file that clears Visual Studio recent projects list. Copy into notepad and save as “.reg”. Double-click to update registry.

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList]

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList]

~Mike

Posted in Visual Studio, registry | 9 Comments »

AjaxWorld — "Doing AJAX with the Microsoft AJAX Development Platform" by Joe Stagner

Posted by sharpstyle on March 22, 2007

www.JoeOn.net – Joe’s blog

www.CodePlex.com — a lot of additions that didn’t make it into Ajax.Net

Notes:

  • Very quickly went through “marketing material” and jumped into actually code.
  • Demos were pretty simple, but a few items were interesting.
    • Be careful where you put your ajax updates: Page_Load causes full postback and page lifecycle
    • Joe demonstrated 2 ways to “ajax” your app:
      • “codeless approach” — using updatepannel and letting framework take care of partial page updates
      • approach favored by Joe: expose web service, mark it as accessible by Ajax which will tell framework to output needed JavaScript and then call that JavaScript from your own JavaScript code.

~Mike

Posted in AjaxWorld, Microsoft, ajax | 1 Comment »

AjaxWorld — "JavaScript Puzzlers" by Mike Aizatsky

Posted by sharpstyle on March 21, 2007

Presentation & Demo by JetBrains: JavaScript Puzzlers – Is An IDE the Fifth Wheel or the Sixth Sense?

Mike works for IntelliJ and showed some of the IntelliJ Idea features that help deal with JavaScript development.

I learned a few things about JavaScript:

  • (“0″ == 0) ==> true
    • at the same time “switch” will not return true b/c internally it uses “===” for comparison

var a = “0″;
switch (a)
{
case 0: return “AAAA”; break;
default: return “BBBB”;
}

  • (“Infinity” == 1/0) ==> true. “Infinity” is evaluated by JS. There is also “-Infinity” and lower case (“infinity” != 1/0)
  • using triple equal sign resolves most of the these issues.

~Mike

Posted in AjaxWorld, JavaScript | 1 Comment »

AjaxWorld — "Maximize Your Revenue From Your Web 2.0 Venture" by Troy Angrignon

Posted by sharpstyle on March 21, 2007

Not a technical session, but one of the most useful that I attended. Keep in mind that I was looking at the conference from the point of www.reviewbasics.com co-founder.

Troy works for BussinessObjects and has experience with angel-funded startups. You can find his blog here.

Session description is here.

Six timeless business principles

  1. To maximize our revenue (more customers, more things, more often for more years, for more money)
  2. Find the sweet spot (intersection of the following: something you want, something the market wants, somewhere people want to work)
    1. Something you want — follow your passion so that you don’t get bored
    2. Joining or disrupting a Market is the fastest (and cheapest) route to success
      1. Create a market – very expensive
      2. Join a market — make sure it is a “need”, not “nicety”.
      3. Disrupt a Market
    3. Find a market large enough for your aspirations but small enough to dominate
    4. Do not go after 1% of the market even if market is huge (all PC owners) – automatic fail, look for 30-40% goal
  3. It’s much easier to launch a business by riding a wave (or two)
  4. Find your “blue ocean”, Zag when others Zig, and be Distinct
  5. We need to LOVE our customers
  6. Chase TWO rabbits, catch NONE — do not spread yourself too thin

Nine Web 2.0 business principles

  1. There are five business models
    1. Ads
      1. Real money is here: Premium Sponsor, Premium Advertisement, Affiliate Networks
      2. But many of us are focused here: Ad Networks, Google Adsense
      3. “page views” start loosing importance b/c of Ajax
      4. “Circle of Trust” — make sure that advertising/advertisers are aligned with your customers so that they are a part of community instead of disruption
      5. Sales people going after advertisers should be in house with Ad background (including paper/print)
    2. Transactions
    3. Subscriptions
    4. Commissions — examples: Ebay, etc
    5. Gamey — not sure who will buy (Ebay, Google, yahoo, etc), need to have backing to wait it out. Do not count on it. out of 10, 000 Web 2.0 companies only ~60 companies were acquired
  2. Warning: Making applications fast, pretty or functional may DECREASE revenue
    1. Deploying Ajax on Ad support site will cause a drop of 30-40%
  3. Our customers will help us design, build. maintain and run our company.. if we let them
  4. A hard-to-recreate data source can be valuable
    1. Example: Amazon bought incomplete ISBN catalog and their customers filled in all the missing pieces
    2. Advanced Economic Research – company has all the Ebay transactions and does data mining
  5. The mashup ecosystem is exploding, but revenue opportunities are still “in progress”
  6. Design our applications to run across multiple devices
  7. Deliver software on demand
    1. SaaS hits the hockey stick” article on ZDNET – in the last year we went from 20% to 50% of companies are considering to run mission-critical applications in SaaS
    2. Allows software company to see how their software is used
  8. A niche market is not the same thing as a long tail business
  9. We need to get to critical mass in quantum leaps as fast as we can
    1. Do whatever is needed to grow fast, not organically
    2. If growing organically, somebody will pass you
    3. Partnerships, accusations, etc

Things to look into: 

  • www.turn.com — manage ad networks
  • www.plentyoffish.com — number 3 dating site that runs on 5 servers in the living room
  • Game theory — users are not addicted to a very easy game. bring the same concept into website development. make it hard enough to cause addiction. rather counter-intuitive
  • Consider not making social website very good looking/polished — people seem to trust more websites that are “ugly”: google.com, craigslist.com, plentyofpage.com
  • Book from Oriely about customer helping build your software – ask for name
  • Book: Zag: The Number One Strategy of High-Performance Brands
  • SaaS hits the hockey stick” article on ZDNET – in the last year we went from 20% to 50% of companies are considering to run mission-critical applications in SaaS
  • Demand Media – bought off most of the domain squatters and now deliver “custom dynamic websites” in reaction to users’ errors when typing URLs.

~Mike

Posted in AjaxWorld, Business, Web 2.0 | 3 Comments »

AjaxWorld — "Not Just Perfect, Pixel Perfect: Establishing your Design to Development Workflow" by Aaron Adams & Karl Johnson

Posted by sharpstyle on March 20, 2007

Presentation by Cynergy Systems (Flex partner). Session description is here.

Mostly develop Flex applications. Aaron Adams is graphic designer and Karl Johnson is a developer and they both did a good job presenting the challenges and their current solution.

Main message: make sure that your graphic designer understands the capability of the technology he/she is designing it for and what it is capable of. This will ensure that developers do not spend too much time designing extravagant designs. In case of Cynergy Systems, technology is Flex.

They went through the following evolution steps:

  • Just throwing designs over to developers
  • Designer learning MXML/Flex capabilities and actually coding
  • Current state: designer understands what technology can offer (in case of Flex: stylesheets, dynamic filters, etc) and designs taking these features into consideration

A few other notes:

  • Graphic Designer is not enough anymore, you need User Experience Designer/Specialist
  • On Cynergy projects, “design” part of the project is from 10% to 20% of the whole project.

 

~Mike

Posted in AjaxWorld, Web 2.0 | Leave a Comment »

AjaxWorld — "Presentation & Demo by Laszlo Systems: The Browser, the Portal, and the Desktop" by David Temkin

Posted by sharpstyle on March 20, 2007

Good presentation covering the movement from Desktop to Webtop

You can find description of the session here.

Overall message: there is a move from installed application to “web applications” that do not require installation and enable using any PC to get to your data. Web applications make it easy to access your data — no need to worry about moving files from one PC to another PC.

~Mike

Posted in AjaxWorld, Laszlo, Web 2.0 | Leave a Comment »

AjaxWorld — "The User Experience of Social Applications" by Greg Narain

Posted by sharpstyle on March 20, 2007

Good presentation covering all the common elements across Ajax/Web 2.0 social applications. Here are a few examples:

  • Commenting
  • Ranking
  • Auto-suggest
  • Edit-in-place
  • hover menus
  • a lot of well used white space that utilizes above mechanisms
  • Hide main navigation for repeat visitors

An interesting concept came up during the discussion: Introduce new features, but don’t force them onto users as users get used to existing interface.

A few websites were mentioned:

Social design is a subset of design that focuses on the social lives of users. It deals with the activities, behaviors, and motivations of people who work and play together through software interfaces. In the early days of the Web, most sites were read-only, focused on providing information to a single person at a time. Then the Web became read/write, allowing people to save information but still mostly for them acting alone. Now, we’re seeing a tremendous amount of social software that allows many people to collaborate and share what they’re doing with others. Designing for this social world is social design, and that’s what we’re talking about here at Bokardo.

A global community of friends and strangers answering one simple question: What are you doing? Answer on your phone, IM, or right here on the web!

Greg Narain works for www.bluewhalelabs.com (Strategic consulting, design & development for innovative social applications)

~Mike

Posted in AjaxWorld, Web 2.0 | 1 Comment »

AjaxWorld

Posted by sharpstyle on March 20, 2007

We are attending AjaxWorld 2007 conference: http://www.ajaxworld.com in NY and will provide feedback on a select number of sessions

We also attended Flex Bootcamp and met good guys (Yakov Fain and Viktor Rasputnis) who specialize in Flex/Java Consulting. Their website(s) and Flex blog are below:

~Mike

Posted in AjaxWorld, ajax | Leave a Comment »