Click here to Skip to main content
15,900,258 members
Home / Discussions / C#
   

C#

 
AnswerRe: Launch command as administrator Pin
deanjott11-Nov-11 5:53
deanjott11-Nov-11 5:53 
QuestionRe: Launch command as administrator Pin
Mark Salsbery11-Nov-11 8:00
Mark Salsbery11-Nov-11 8:00 
QuestionLooking for help with an api hook that catches a messagebox from a 3rd party dll Pin
turbosupramk310-Nov-11 7:46
turbosupramk310-Nov-11 7:46 
QuestionWord Interop Supress / Handle Errors Pin
ezazazel10-Nov-11 3:54
ezazazel10-Nov-11 3:54 
QuestionHow to turn a Windows Form application into a library Pin
biop.codeproject10-Nov-11 0:20
biop.codeproject10-Nov-11 0:20 
AnswerRe: How to turn a Windows Form application into a library Pin
BobJanova10-Nov-11 1:24
BobJanova10-Nov-11 1:24 
AnswerRe: How to turn a Windows Form application into a library Pin
BillWoodruff10-Nov-11 5:24
professionalBillWoodruff10-Nov-11 5:24 
GeneralRe: How to turn a Windows Form application into a library Pin
biop.codeproject10-Nov-11 15:30
biop.codeproject10-Nov-11 15:30 
Bill,

I think the rule for posting here is to keep it simple. And I think I have done it in my original post. As all I want is to ask how to turn a WinForm application into library.

OK. Here is all the glory detail if you don't mind bored.

I have a Motorola bar-code scanning device. I have two programs. One is to read RFID. Another is to use the camera. Both programs are in dot net.

My task is to turn these two programs into one library. My client will use my library to intergrate into their existing application. That application, I assume, is to be loaded into various mobile devices.

I am connecting to the Motorola device via USB.




1) RFID

The original program is a WinForm application. The real logic to read the RFID consists of several library calls. It is nothing more than just:
if (!RFID.Connected())
{
   if (RFID.Open(sError)) 
   {
      if (RFID.ReadTagID(sTagID, sError))
      {
  
         MessageBox.Show("Tag ID: " + sTagID)
      }
      else
      {
         MessageBox.Show("Read error: " + sError)
      }
   else
      MessageBox.Show("Open error: " + sError)
   }
}


I am able to extract the above code into a class library. The class does not inherit anything.
using Motorola_Lib;

namespace Moto_RFID
{
   public class myReadRFID
   {
      public bool Read(ref String sTagID, ref String sError)
      {
          // Put the above code here...
      }
   }
}


Then I create a WinForm program. In there just one button to call the Read() function above.




2) Camera

I have the camera program already. Unlike the RFID logic, which is just to use some function calls from a library, this camera program uses some Windows controls.

Now anyone has any idea on how to turn this camera in WinForm aplication to a library?

And how to test?
AnswerRe: How to turn a Windows Form application into a library Pin
Luc Pattyn10-Nov-11 16:08
sitebuilderLuc Pattyn10-Nov-11 16:08 
GeneralRe: How to turn a Windows Form application into a library Pin
biop.codeproject10-Nov-11 17:52
biop.codeproject10-Nov-11 17:52 
AnswerRe: How to turn a Windows Form application into a library Pin
Luc Pattyn10-Nov-11 18:26
sitebuilderLuc Pattyn10-Nov-11 18:26 
GeneralRe: How to turn a Windows Form application into a library Pin
BillWoodruff10-Nov-11 19:27
professionalBillWoodruff10-Nov-11 19:27 
AnswerRe: How to turn a Windows Form application into a library Pin
Ennis Ray Lynch, Jr.10-Nov-11 8:40
Ennis Ray Lynch, Jr.10-Nov-11 8:40 
GeneralRe: How to turn a Windows Form application into a library Pin
BobJanova10-Nov-11 23:23
BobJanova10-Nov-11 23:23 
QuestionUninstall a none Microsoft program on a remote machine via WMI Pin
AndieDu9-Nov-11 23:03
AndieDu9-Nov-11 23:03 
AnswerRe: Uninstall a none Microsoft program on a remote machine via WMI Pin
AndieDu10-Nov-11 11:15
AndieDu10-Nov-11 11:15 
QuestionHow can I use Word in C3.Net Not COM Componet Pin
yousefshokati9-Nov-11 20:03
yousefshokati9-Nov-11 20:03 
AnswerRe: How can I use Word in C3.Net Not COM Componet Pin
Wayne Gaylard9-Nov-11 21:19
professionalWayne Gaylard9-Nov-11 21:19 
QuestionRestore database with stored procedure Pin
nhanlaptrinh9-Nov-11 12:17
nhanlaptrinh9-Nov-11 12:17 
AnswerRe: Restore database with stored procedure Pin
Abhinav S9-Nov-11 16:54
Abhinav S9-Nov-11 16:54 
GeneralRe: Restore database with stored procedure Pin
nhanlaptrinh16-Nov-11 14:02
nhanlaptrinh16-Nov-11 14:02 
QuestionExport to Excel and Navigating to other Page Pin
pravin_mun9-Nov-11 6:51
pravin_mun9-Nov-11 6:51 
AnswerRe: Export to Excel and Navigating to other Page Pin
Dave Kreskowiak9-Nov-11 13:33
mveDave Kreskowiak9-Nov-11 13:33 
SuggestionRe: Export to Excel and Navigating to other Page Pin
RaviRanjanKr13-Nov-11 4:39
professionalRaviRanjanKr13-Nov-11 4:39 
Questionwhere to save my error.log? Pin
Jassim Rahma9-Nov-11 5:34
Jassim Rahma9-Nov-11 5:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.