Home Page

 

Developer

 

 

Some Visual Studio .Net related tips:

 

 


In order to deploy VS .Net applications the client needs to install:


Cryptography

Symmetric Algorithms: DES, RC2, Rijndael, TripleDES

Asymmetric Algorithms: RSA, DSA


XML:

In item:
            <LicenseValidTo date="31.12.2002" />
date is attribute.


Data grid contains styles that can be accomodated to each of the data tables. MappingName matches the TableName


Data binding on a form: if no Id passed in entry function, create new row and add it to the table. Binding will automatically move to the first record.

 Bind controls in the following way:

Date/Time Picker binding: bind property Text to the data field,

CheckBox: bind property Checked to a data field,


Combo box binding:

Set the following properties for lookup table (data that will be displayed to the user):
Data Source = lookup table
Display Member = column to display
Value Member = column for value

Data table is connected via Data Binding. Set the following property to bind to the data that will be stored.
Data Binding:
Selected Value = column in a data source.

When combo box binds to the data source, items() collection contains DataRowView. That means that combo items can be accessed through form binding for the data source of the combo.


Crystal Reports

I've had the following error trying to run Crystal Reports within a C# application:

CrystalDecisions.CrystalReports.Engine.InternalException: Cannot find KeycodeV2.dll, or invalid keycode.

The solution can be found here: http://support.crystaldecisions.com/library/kbase/articles/c2010777.asp and the fix can be downloaded here: http://support.crystaldecisions.com/communityCS/FilesAndUpdates/crnet_keycodefix.zip.asp

Also read http://support.crystaldecisions.com/communityCS/TechnicalPapers/crnet_deployment.pdf.asp

There are many texts at Crystal Decisions regarding this problem.

 

Deployment.

To deploy Crystal Reports with your application, add the following modules to the setup project:

• Managed.MSM
• Database_Access.MSM
• Database_Access_enu.MSM
• REGWIZ.MSM

Add license number (long one) to RegWiz.msm property. If using ADO.NET, add

Add the System Folder to the File System section of your setup project.
Set target directory property for the last two modules to System Folder.


Immediate Window:

Without compiling, you can open the Immediate Window by pressing (Ctrl-Alt-I)


Macros:

To open the Macro Explorer in VS.Net 2005 press Alt+F8.


Quick Copy & Smart Paste:

You can do a quick copy of a selection by holding control and dragging the selection where you'd like it.

Also, I hope everyone take some time to play with vertical selections (hold alt and drag a selection). This is incredibly useful if you have to do the same thing to multiple variables/properties, because if you copy a vertical selection, it will paste how you would want it to. ex:

do a vertical selection on (then copy it)
b
b
b
b

and paste it in between a and c on the first line
ac
ac
ac
ac

will yield
abc
abc
abc
abc

Also, you can bring up intellisense with just ctrl+space (no shift needed)