Tech Off Thread

25 posts

Discussion around the Coding4Fun Some Assembly Required Articles

Back to Forum: Tech Off
  • User profile image
    ksharkey

    Some Assembly Required is the article series by Scott Hanselman on the Coding4Fun Developer Center aimed at people adding a bit of code to hardware to make it all worthwhile.

    Current Article list:

    • It's Hot in here

      In the second installment of "Some Assembly Required" column, Scott Hanselman explains how to use Visual 2005 Express Edition and the .NET Framework 2.0 to retrieve weather information not only from a Web Service, but also from a local "Phidget" analog thermometer. He'll discuss interfaces, dynamic assembly loading, as well as some simple graphing and painting with WinForms.   

    • What's Playing? Interfacing Your Media with an External LCD Panel using Visual Studio 2005 Express

      To kick off his new "Some Assembly Required" column, Scott Hanselman explains how to use Visual C# 2005 Express Edition and the .NET Framework 2.0 to control an LCD Panel and interface it with Windows Media Player or iTunes to show "What's Playing?"   

  • User profile image
    plugh

    Your code probably works great when you have a gps device connected to the serial port. Smiley

    I haven't got mine connected yet and was playing with the code.  Even though you're using a timer to trigger the port.Read it seems that the Read blocks and causes the UI to become unresponsive when no bytes are available to read.

    Could be a 2.0 beta problem with SerialPort or just the way it's designed.  In any case I rewrote the port io to use the DataReceived event on the SerialPort and got rid of the timer.

    This fixes the ui responsivensess but like I said I haven't gotten around to hooking up a GPS receiver yet.

    If you're interested let me know and I can send you the code.

    --Gregg

  • User profile image
    rayjwhite

    Hmmm...  Maybe writing a little code to block all internet traffic while you are not at your desk might benefit about 99.99% of people who have broadband. Should I start there or should I concentrate finishing my proof of concept making sure those rediculous worms stop propagating Mad. Maybe I will do both.  That is if someone else hasn't been itching to do so.  Of course, I will have to wait until devices arrive.


    By the way, if there are any Microsoft architects that would like to entertain my ideas of making Windows more secure, please contact me.  Or maybe there are already plans to impliment everything that I may have to offer (I don't need a job!). Don't worry, the ideas are simple to even impliment on your existing OSs.  However, having these concepts "baked" into the next OS so users who don't know better, don't have to.  Funny how the OSs make IT professional's job's easier by locking down servers by default, but what about the end users who barely have enough skill to install the OS?

  • User profile image
    em21701

    The USB lock works great! I modified the code to stop showing the message balloons and instead created a red icon to display when the Key Fob was no longer detected. Additionally I made me own plugin to start the screensaver after the fob has not been detected for 30 seconds.

  • User profile image
    LOGIKonline

    plugh wrote:


    If you're interested let me know and I can send you the code.

    --Gregg


    Gregg can you send it to me please.  I have ordered my device but it is still in the mail Wink  nospam[at]logikonline.com

    Can you send it to my email?

    thanks in advance,
    Dave

  • User profile image
    MarkMc​Cormack

    Can you share the code to flip on the screen saver?

  • User profile image
    hackman_3vil​Guy

    In the Webcam issue you use the registry to find the GUID for JPEG format.

    Microsoft.Win32.RegistryKey jpegKey = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(@"CLSID\{D2923B86-15F1-46FF-A19A-DE825F919576}\SupportedExtension\.jpg");
                jpegGuid = jpegKey.GetValue("FormatGUID") as string;

    This is unnecessary as you can use a built in part of the framework:

    private string jpegGuid = "{" + System.Drawing.Imaging.ImageFormat.Jpeg.Guid.ToString().ToUpper() + "}";

  • User profile image
    edcarden

    I just installed this and I can't get it to recognize my fob.  I know the fob is working because the software that comes with the Wireless PC Lock is working meaning it will recognize the fob and load up the screensaver.  When I right-click on the USB Wireless security icon in the tray and select 'Restore' I do not see any fobs listed in the window. 

    I looked and looked to see if there were any basic instructions for this software and did not see anything so I'm wondering if I' missing something that might be obvious to others.  For example do I need to unload the orginal manufactures software to get this one to work?

    ANy hepl is greatly appreciated as I want to switch over to this .Net program and off the manufacturers original whihc is the most pathetic excuse for software I have ever seen. 

    Thanks
    Ed

  • User profile image
    wolfe_nv

    Did you ever solve this problem?  I am having the same issue. 

  • User profile image
    dm1608

    Hi, all.

    Can somone please direct me to where I can buy the wireless USB receiver and the push button fob?  I believe I've found the USB receiver, but not the push button.

    The link on the site for newegg.com appear not to show any products matching this description.

  • User profile image
    dctrvenkman

    I thought you could access HID devices using DirectInput and if so wouldnt that have been much easier?

    Anyway my real question is how do you access devices that arn't HID?  I'm trying to use the code as a base for an app using a different device without a HID driver so when it enums the devices the one I want isnt listed.

  • User profile image
    raswirsky

    My io2 pen (which I love) software started to crash on machines with .NET 2.0 installed. I found a fix here:

    Logitech Io2 Unhandled Exception Problem

    Smiley

    I use my io2 pen all day long...I take a lot of handwritten notes in my work, I wish they'd come out with smaller ones....

  • User profile image
    osaboy

    whenever I run the code for the "BlogWebcam" I get a NotImplementedException, can any 1 help me out with this?

  • User profile image
    baracuda

    I tryed to test the BlogWebCam program, but somehow i only get images that are completly black. My Logitec QucikCam Chat is recognized correctly and it does make picture with the proper software.
    I copied the wiaaut.dll to the system32 directory and regostered it.
    I just dont find the reason why it won't work.


  • User profile image
    cosminb

    I am also having problems with the WIA WebCam source code. It does compile, but whenever I want to configure it (select the device), immediately after clicking on configure I get an exception:

    Exception from HRESULT: 0x80210015
    Source: Interop.WIA
    at WIA.CommonDialogClass.ShowSelectDevice(...)

    Anyone encountered this error? I use a Chicony TwinkleCam Pro DC2120 webcam. Also, it is listed in the "Scanners and Cameras" section of the Control Panel.

    Does anyone know what the problem is? Sad

  • User profile image
    MSellars

    Hi all from DownUnder!

    Its been a while since I had my coding boots on in anger but a recent MS VLive event in Sydney stirred my passion for code cutting again and the article on the Workstation lock was too interesting to pass by.

    I got the fob & receiver from my local ALDI supermarket (www.aldi.com.au - Yes, a supermarket of all places!) for AUD$9.99 It installed and the standard app worked as per expectation with the described USB device ID.

    I downloaded the 2.01 exe from sourceforge. All seems OK and the workstation locks upon loss of the fob signal. The only question I have is even though the event log traps the return of the fob and registers an unlock event the workstation (XP Pro SP2) doesnt unlock automatically - I have to input the user pwd manually. Is this the programmed intention or is it supposed to recognise the fob and then actually do an auto unlock?

    Mark

  • User profile image
    case23_69

    Hi,
    I've seen a similar article for WIA that uses version 1.0 of the library
    http://www.codeproject.com/dotnet/wiascriptingdotnet.asp
    and calls are wrapped with

    Marshal.CreateWrapperOfType

    Is this a good idea for 2.0? Or can I use as is like in the article?

  • User profile image
    ks2k

    I have the same proble with the webcam project.  Did anyone give you any hints as to why your pictures were comming thru completely black?  I really liked the article though...

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.