What if the object hasn't been set?
KCDude
Posts
-
System.NullReferenceException: Check my solution someone, pls -
System.NullReferenceException: Check my solution someone, plsI have combo box that is loaded dynamically. When the user select Misc from the list I want to unhide a text field. I recived the following error. System.NullReferenceException: Object reference not set to an instance of an object. at ACEPackaging.dlgEditSkidWeight.HideCarrerTextBox() etc etc etc Here is my code that is called when the user changes the selection on the combobox.
If CStr(cboCarrier.SelectedValue.ToString) = "99" Then
tbCarrierDesc.Visible = True
Else
tbCarrierDesc.Visible = False
End If
End IfI did a little research and said that this error is caused by the .ToString being Null or Nothing. So here is what I have added to correct the problem so there are no more errors. Please let me knwo if this will work.
If Not cboCarrier.SelectedValue.ToString Is Nothing Then 'added this line If CStr(cboCarrier.SelectedValue.ToString) = "99" Then tbCarrierDesc.Visible = True Else tbCarrierDesc.Visible = False End If End If
-
Multiple USB Barcode ScannersHas anyone here had experiance using multiple barcode scanners with a USB interface? One of our applications currently use USB to COM emulator and we need to get rid this...too many problems configuring them. So I'm goign to remove all the code for that portion and start fresh to implement USB into our application. We'll need up to two barcode scanners each using there own session of our application on the same PC. I read up on the Microsoft.PointOfService assembly and it seem the way to go, but I was wanting all the input I can get. The main issue is to have both sessions going and remember which scanner goes to which session of the application. Thanks for your help.
-
Bar Code Scanner ImplementationThat is why I want to use USB and get rid of the com port configuration in our custom .NET pack&ship appl. I don't think your following my post. I've already came to the conclutions you've suggested. The com port configuration is what is the problem. I would like to implement USB into the application and if you have any suggestions on how then please suggest something :)
-
Bar Code Scanner ImplementationThe problem with that is we have about 35 scanners at $200+ each. I had a simliar idea.
-
Bar Code Scanner ImplementationHoneywell 3820...the emulator is Honeywell also. We have delt with Honeywell support on this and their response is "You cannot connect two scanners to the same PC using the USBSerialEmulator." We've tried, but it's just flaky. And when they switch the scanners around...its messy. We'd like plug and play with the ability to use both sections of the application at the same time on the same PC with two different scanners....that is why I think the original programmer tried the COM port.
-
Bar Code Scanner ImplementationSorry....We have USB scanners and connect them as USB then use the USBSerialEmulator.
-
Bar Code Scanner ImplementationWe have a .NET App that uses USBSerialEmulator so when you plug a USB scanner in you can assign a COM port. The original developer of our application used this idea to be able to use multiple scanners. Well there are several problems with this because the floormen are always swithing out scanners or they break, etc and we have to reconfigure the scanners and our application for COM ports. Plus the scanner manufaturer says it does not support multiple scanners when using the USBSerialEmulator. I was thinking of using the Microsoft.PointOfService assembly for USB. Any thoughts or ideas before I proceed....???? And I'm new here...seems like a great site.