Aug 14

If you’re in Vista and trying to access a project on your network you may get an errorfrom Visual Studio stating the “project location is not trusted.”

I trust it I do I do you say? Let’s tell Windows….

Open a command prompt.
CD to x:\windows\Microsoft.NET\Framework\v2.0.50727

Now let’s say you’ve mounted your network share as drive S:\. You will want torun the following command…

caspol -q -machine -addgroup 1 -url file://s:/*FullTrust -name “Development Share”

For good measure run: gpupdate /force and thenclose and relaunch Visual Studio and you should be ready to go.

Sep 14

In an application I was working on yesterday and today for a Symbol barcode scannerMC3090-G I needed to pass data back and forth between some of my windows forms.

In searching I found the following sites very useful:

http://www.codeproject.com/useritems/pass_data_between_forms.asp

http://www.c-sharpcorner.com/Code/2002/Aug/PassingDataInForms.asp

http://www.c-sharpcorner.com/UploadFile/thiagu304/passdata05172006234318PM/passdata.aspx?ArticleID=9d12229f-db06-4687-8c6f-28ab1c57e6e1

Sep 14

Many times in .NET applications it becomes necessary to always show the last itemadded in a list box. I was using the listbox to keep a running list of items scannedby a barcode scanner. In order to keep the last item scanned within the view I foundthat settting the TopIndex of the listbox when assigning a new item works great.

MyListBox.TopIndex = MyListBox.Items.Add(”SOME ITEM”);

For those of you using VB.NET the translation would be:

MyListBox.TopIndex = MyListBox.Items.Add(”SOME ITEM”)