Tuesday, 16 March 2010

Allow only one instance of any Windows Form, C#

The ability to load forms once, is something essential in many applications. But, this is a simple way to do that:

public Boolean IsFormAlreadyLoaded(string formToLoadName)
    //Allow only one instance of any MDI child form in your MDI application
foreach (Form frmChild in this.MdiChildren)
        if (frmChild.Name == formToLoadName)
return true;
return false;

Monday, 15 March 2010

Printer capabilities

This is an excelent article about printing essentials, and,  here is my own experiments using some different printers:

HP Officejet Pro All-in-One

HP Color LaserJet 3800

Tuesday, 9 March 2010

ClickOnce signing error and its solution :)

This is the error:
error: 0x80880253
The signer's certificate is not valid for signing.
SignTool Error: An error occurred while attempting to sign: bin\Debug\app.publish\\setup.exe

A very good work but not work with me: http://www.may.be/renewcert/

A very good comment that brings me to the road and solve the problem:

This the magic comment:
Are you signing your ClickOnce deployment? If you go to the Signing tab for your project, do you have a certificate selected?

If you are just pushing updates for the same application, you will want to track down the certificate file (pfx) you used to use and sign with it instead of creating a new one, so the deployment does not think you created a new certificate.
If you are just deploying something new, you can create a test certificate and use that.

Sunday, 7 March 2010

Identify yourself with Certificates

What is PFX file?
This file type is an acronym of "Personal Information Exchange" that can be opened with "Microsoft Certificate Manager or Certificate Import Wizard".

This file is an Encrypted security file that stores SSL secure certificates used to authenticate a person or device, such as a computer or Web server; requires a password to be opened; can be installed by right-clicking the file and selecting "Install PFX."

More than one certificate can be stored in a single file in the following formats:

PFX,P12: Personal Information Exchange
P7B: Cryptographic Message Syntax Standard-PKCS#7 Certificate
SST: Microsoft Serialized Certificate Store

What SSL Is and Why You Need It?

Doing business online without SSL is like leaving customer credit card numbers on the counter or offering a dressing room without a door

An SSL certificate is a bit of code on your web server that provides security for online communications. When a web browser contacts your secured web site, the SSL certificate enables an encrypted connection. It’s kind of like sealing a letter in an envelope before sending it through the mail.

SSL certificates also inspire trust because each SSL certificate contains identification information. When you request an SSL certificate, a third party (such as Thawte or VeriSign) verifies your organization’s information and issues a unique certificate to you with that information. This is known as the authentication process.

An SSL certificate, or secure certificate, is a file installed on a secure Web server that identifies a website. This digital certificate establishes the identity and authenticity of the company or merchant so that online shoppers can trust that the website is secure and reliable. In order to verify that these sites are legitimate (they are who they say they are), the companies and their websites are verified by a third party, such as Verisign or Thawte.

Once the verification company establishes the legitimacy of an organization and the associated website, they will issue an SSL certificate (for the small fee of a few hundred dollars). This digital certificate is installed on the Web server and will be viewable when a user enters a secure area of the website. You can tell you are visiting a secure page when the URL starts with "https." To view the certificate, click the lock icon near one of the edges of your browser window.

Because digital certificates verify a company's current status, they do not last forever. SSL certificates typically expire every one to three years. If the certificate is not renewed in time, you may see an alert box pop up that says "This website's certificate has expired." This error has nothing to do with you or your computer, but is displayed because the Web server you connected to has not renewed its SSL certificate. While this does not necessarily mean the site is fraudulent, it does show that the site is less than professional.

What Happens between the Web Browser and Server?

1.A browser attempts to connect to a web site secured with SSL. The browser requests that the web server identify itself.
2.The server sends the browser a copy of its SSL certificate.
3.The browser checks whether it trusts the SSL certificate. If so, it sends a message to the server.
4.The server sends back a digitally signed acknowledgement to start an SSL encrypted session.
5.Encrypted data is shared between the browser and the server.

Continue reading ...

List of comercial certificate authorities

AOL (http://www.aol.com)
A-Trust (http://www.a-trust.at)
Arge Daten (http://www.signatur.rtr.at/de/providers/providers/argedaten.html)
AS Sertifitseerimiskeskuse (http://www.sk.ee)
Asociacion Nacional del Notariado Mexicano (http://www.notariadomexicano.org.mx)
Austria Telekom-Control Commission (http://www.signatur.rtr.at)
Autoridade Certificadora Raiz Brasileira (http://www.icpbrasil.gov.br)
Autoridad de Certificacion Firmaprofesional
Baltimore (http://www.baltimore.com)
Belgacom E-Trust (http://www.e-trust.be)
CC Signet (http://www.signet.pl)
CAMERFIRMA (http://www.camerfirma.com)
Certic?mara S.A. (http://www.certicamara.com/)
Certisign (http://www.certisign.com.br/)
CertPlus (http://www.certplus.com)
Colegio de Registradores
Comodo Group (http://www.comodogroup.com/)
ComSign (http://www.ComSign.co.il)
Deutsche Telekom (http://www.telekom.de)
DST (http://www.digsigtrust.com/)
Entrust (http://www.entrust.com/certificate_services/index.htm)
eSign (http://www.esign.com.au/)
EUnet International (http://www.eunet.fi/)
FESTE (http://www.feste.org/)
First Data Digital Certificates (http://www.firstdata.com/index.jsp)
FNMT (http://www.ceres.fnmt.es/)
Gatekeeper Root CA (http://www.agimo.gov.au/infrastructure/gatekeeper)
GeoTrust (http://www.geotrust.com)
GlobalSign (http://www.globalsign.com/)
GoDaddy (http://www.godaddy.com)
Hongkong Post (http://www.hongkongpost.gov.hk/product/cps/ecert/index.html))
IPS SERVIDORES (http://www.ips.es/)
KMD (http://www.kmd-ca.dk)
NetLock (http://www.netlock.hu/)
Post.Trust (http://www.post.trust.ie/)
PTT Post (http://www.ptt-post.nl)
Quovadis (http://www.quovadis.bm/)
RSA (http://www.rsasecurity.com/)
Saunalahden Serveri (http://www.saunalahti.fi/)
SECOM Trust.net (http://www.secomtrust.net)
SecureNet (http://www.securenetasia.com/)
SecureSign (http://www2.jcsinc.co.jp)
Serasa (http://www.serasa.com/)
SIA (https://ca.sia.it/)
Sonera (http://www.sonera.com/)
Spanish Property & Commerce Registry (https://www.registradores.org))
TC TrustCenter (http://www.trustcenter.de/)
TDC (http://www.tdc.dk)
Thawte (http://www.thawte.com/)
Trustis Limited (http://www.trustis.com)
TW Government Root Certification Authority
Unizeto Certum (http://www.certum.pl)
UserTRUST (http://www.usertrust.com/)
ValiCert (http://www.valicert.com/)
Verisign (http://www.verisign.com/)
Wells Fargo Root Certificate Authority (http://www.wellsfargo.com/certpolicy)
XRamp (http://www.xramp.com)

Thursday, 4 March 2010

Some Internet culture around Flash

Adob, Learn Flash Professional CS4:
Learn how to use Flash Professional CS4 with tutorials selected by experts at Adobe.There's everything from Getting Started for beginners, to New Features, Workflows, and Overviews.


PixlToLife: learning made simple
Contians free flash tutorials: http://www.pixel2life.com/tutorials/adobe_flash/
Also, includes these good tutorials:
1- Making a Photoshoot Effect With jQuery & CSS: http://www.pixel2life.com/viewtutorial/76739/making_a_photoshoot_effect_with_jquery_css/
Which depends on the following tutorial:
    jQuery PhotoShoot Plugin 1.0: http://tutorialzine.com/2010/02/jquery-photoshoot-plugin/
      Where the author uses images from Flicker.
Flicker: is huge store of shared images, http://www.flickr.com/

2- Creating Ripples in the Medici Fountain: http://www.pixel2life.com/viewtutorial/76115/creating_ripples_in_the_medici_fountain/

Monday, 1 March 2010

Simplified jQuery Poll-down menu, only an anchor and a div elements

This code is adopted from another original article:

It is a simple poll down menu construct from <a> alement and <div> element, just like that:
1.<a id="anchor" onclick="return false;" href="">Menu title</a>
2.<div id="div" style="display:none;position:absolute; z-index:1000;">
3.    <a href="">element1 title</a>
4.    <a href="">element2 title</a>


MakeADIVMenu(anchor,div) {    var timeoutID = -1;
'a#' + anchor)
function() {
'#' + div).css('position', 'absolute');
'#' + div).css('top', $('a#' + anchor).position().top);
'#' + div).css('left', $('a#' + anchor).position().left - ($('#' + div).width()/2));
'#' + div).css({zIndex:20}).show();
function() { timeoutID = setTimeout(function() { $('#' + div).hide(); }, 2000); }
'#' + div)
function() {
function() {
this).css('position', 'absolute');
this).css('top', $('a#' + anchor).position().top);
this).css('left', $('a#' + anchor).position().left - ($(this).width()/2));
this).css({ zIndex: 20 }).show();});
function() { $(this).hide(); }
//1.<a id="anchor" onclick="return false;" href="">
    //2.<div id="div" style="display:none">
    //3. <a href="">element1</a>
    //4. <a href="">element2</a>