TigerDirect


How to Update .NET Windows Controls at Runtime

Posted by Johan Cyprich on 17 Aug 2011 | Tagged as: Programming

If you change the value of a control on Windows .NET form during runtime, it may not be updated with the changes. The following code should change the Text property of ToolStripStatusLabel, but it doesn’t work while its processing in the middle of its function. When its the last command in the function, it will change the label."

label_Folder.Text = "Converting documents to PDF.";

If additional code follows the label_Folder statement, it may not update the Text property. You can force the property to update with the Refresh method:

label_Folder.Text = "Converting documents to PDF.";
label_Folder.Refresh ();

The label will then be updated with the new content. If your using a ToolStripStatusLabel, you don’t have the option of using Refresh this way, i.e.

toolStripStatusLabel_ProcessingStatus.Text = "Status: 12 of 19 documents processed.";
toolStripStatusLabel_ProcessingStatus.Refresh ();

Instead, use this.Refresh () to force an update:

toolStripStatusLabel_ProcessingStatus.Text = "Status: 12 of 19 documents processed.";
this.Refresh ();


Tweet This Tweet This Post!

Related posts:
Related Posts
    Validating ASP.NET CheckBox Controls
    Don’t Use Java 6
    WordPress 3.0.4 Security Update
    Windows XP is Free with Windows 7

Share this post:

del.icio.us:How to Update .NET Windows Controls at Runtime digg:How to Update .NET Windows Controls at Runtime spurl:How to Update .NET Windows Controls at Runtime wists:How to Update .NET Windows Controls at Runtime simpy:How to Update .NET Windows Controls at Runtime newsvine:How to Update .NET Windows Controls at Runtime blinklist:How to Update .NET Windows Controls at Runtime furl:How to Update .NET Windows Controls at Runtime reddit:How to Update .NET Windows Controls at Runtime fark:How to Update .NET Windows Controls at Runtime blogmarks:How to Update .NET Windows Controls at Runtime Y!:How to Update .NET Windows Controls at Runtime smarking:How to Update .NET Windows Controls at Runtime magnolia:How to Update .NET Windows Controls at Runtime segnalo:How to Update .NET Windows Controls at Runtime gifttagging:How to Update .NET Windows Controls at Runtime

 

Hello World Example in iText

Posted by Johan Cyprich on 16 Aug 2011 | Tagged as: Programming

iText is a .NET library for creating and manipulating PDF’s. It was originally written in Java but it was also ported to .NET. The book, “iText in Action”, has examples in Java only which will only be useful if a .NET developer knows this language.  C# examples can be found at iText.NET site. The code needs to be slightly modified for it to compile with Visual Studio 2010.

The first thing that need to change is the library references. It uses a Java style code which may have been used in an older version of iText for .NET.

using com.lowagie.text;
using com.lowagie.text.pdf;

should be written as:

using iTextSharp.text;
using iTextSharp.text.pdf;

If you cut and paste the code from the examples to VS, you will see multiple errors. Change getInstance to GetInstance, open to Open, add to Add, close to Close. If your not sure about the function being used, delete it (include the period), type a period and the available functions will be listed.

The code will then compile correction in VS 2010. I recommend purchasing iText in Action because it will save you time in learning how to use iText. A knowledge of Java is beneficial, but not necessary to port the examples to .NET.

The following is a simple example of using iText with C#.

 

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

using iTextSharp.text;
using iTextSharp.text.pdf;

namespace Chap0101
{
  class Program
  {
    static void Main (string [] args)
    {
      Console.WriteLine ("Chapter 1 example 1: Hello World");

      // step 1: creation of a document-object
      Document document = new Document ();

      // step 2:
      // we create a writer that listens to the document
      // and directs a PDF-stream to a file 

      PdfWriter.GetInstance (document, new FileStream ("Chap0101.pdf", FileMode.Create));

      // step 3: we open the document
      document.Open ();

      // step 4: we add a paragraph to the document
      document.Add (new Paragraph ("Hello World"));

      // step 5: we close the document
      document.Close ();
    }
  }
}


Tweet This Tweet This Post!

Related posts:
Related Posts
    Download Firefox 3 on June 17, 2008
    Firefox 3 and the World Record Challenge
    Children Surfing Porn with OLPC
    8,002,530 Downloads and a World Record

Share this post:

del.icio.us:Hello World Example in iText digg:Hello World Example in iText spurl:Hello World Example in iText wists:Hello World Example in iText simpy:Hello World Example in iText newsvine:Hello World Example in iText blinklist:Hello World Example in iText furl:Hello World Example in iText reddit:Hello World Example in iText fark:Hello World Example in iText blogmarks:Hello World Example in iText Y!:Hello World Example in iText smarking:Hello World Example in iText magnolia:Hello World Example in iText segnalo:Hello World Example in iText gifttagging:Hello World Example in iText

 

How to Bypass Activation on Palm Pre 2

Posted by Johan Cyprich on 11 Aug 2011 | Tagged as: How To

HP send me a Palm Pre 2 through a developer promotion they had not too long ago, and I had a very difficult time trying to get started using it. The problem occurs when the phone starts for the first time and you need to create an account on it with HP. I couldn’t connect to the internet with this unlocked phone. I contacted Fido (my cell phone provider) and also Rogers (they own Fido) and neither was able to get the phone connected to their network. This cost me $35 at Best Buy in purchasing a SIM card for Rogers.

I gave up for a while and then resumed my search for a solution later. This is one very effective method of solving problems: put it aside for some time and come back to it again with a fresh perspective. I’ve solved many IT related issues this way.

I found a post from unwiredben on the Palm developer forum who gave instructions on how to bypass the activation screen. On the first use of the phone, press the “make emergency call” button and erase the 911 number already there. Then type the keys that correspond to #*DEVMODE# (for GSM networks like Fido/Rogers) or ##DEVMODE# (for CDMA networks).

The phone will then function normally on your network.



Tweet This Tweet This Post!

Related posts:
Related Posts
    Windows Vista in Your Pocket
    Upgrade to WordPress 2.12 Immediately
    Stopping Spam on phpBB
    Smart Phone Market Share

Share this post:

del.icio.us:How to Bypass Activation on Palm Pre 2 digg:How to Bypass Activation on Palm Pre 2 spurl:How to Bypass Activation on Palm Pre 2 wists:How to Bypass Activation on Palm Pre 2 simpy:How to Bypass Activation on Palm Pre 2 newsvine:How to Bypass Activation on Palm Pre 2 blinklist:How to Bypass Activation on Palm Pre 2 furl:How to Bypass Activation on Palm Pre 2 reddit:How to Bypass Activation on Palm Pre 2 fark:How to Bypass Activation on Palm Pre 2 blogmarks:How to Bypass Activation on Palm Pre 2 Y!:How to Bypass Activation on Palm Pre 2 smarking:How to Bypass Activation on Palm Pre 2 magnolia:How to Bypass Activation on Palm Pre 2 segnalo:How to Bypass Activation on Palm Pre 2 gifttagging:How to Bypass Activation on Palm Pre 2

 

3 Important Tools for Developing in JavaScript

Posted by Johan Cyprich on 09 Aug 2011 | Tagged as: Programming

JavaScript has become a language that every web developer must be deeply familiar with to build web applications, and it will even be heavily used in creating client applications for the upcoming Windows 8 operating system from Microsoft. The following sites will help you produce better, error-free JavaScript which is important if you want to maintain customer confidence over your products.

  1. JSFIDDLE (http://jsfiddle.net/)
    This site can be considered a sandbox for JavaScript. You can write code in HTML, CSS, and of course, JavaScript and run, test, and tidy up the code with automated tools.
  2. JSHINT (http://jshint.org/)
    Debugging tool for JavaScript and enforcing coding conventions. More powerful that JSLINT.
  3. JSONLint (http://www.jslint.com/)
    Specialized tool for validating JSON.


Tweet This Tweet This Post!

Related posts:
Related Posts
    Free JavaScript and jQuery Video Tutorials
    Eclipse 3.5 Galileo
    How to Redirect Web Pages (Part 1)
    Visual Studio 2005 Express Now Free

Share this post:

del.icio.us:3 Important Tools for Developing in JavaScript digg:3 Important Tools for Developing in JavaScript spurl:3 Important Tools for Developing in JavaScript wists:3 Important Tools for Developing in JavaScript simpy:3 Important Tools for Developing in JavaScript newsvine:3 Important Tools for Developing in JavaScript blinklist:3 Important Tools for Developing in JavaScript furl:3 Important Tools for Developing in JavaScript reddit:3 Important Tools for Developing in JavaScript fark:3 Important Tools for Developing in JavaScript blogmarks:3 Important Tools for Developing in JavaScript Y!:3 Important Tools for Developing in JavaScript smarking:3 Important Tools for Developing in JavaScript magnolia:3 Important Tools for Developing in JavaScript segnalo:3 Important Tools for Developing in JavaScript gifttagging:3 Important Tools for Developing in JavaScript

 

August 2011 Smart Phone Market Share

Posted by Johan Cyprich on 08 Aug 2011 | Tagged as: Technology

The following are the latest smart phone market share statistics from Nielsen. Android is well ahead of Apple, which isn’t unexpected since more companies have Android phones for sale than Apple. The WebOS market share is low due to a slow start, but I expect that they will have significant gains in the future due to the size and marketing potential of HP. Windows Phone 7 is widely believed to attain the #2 status (followed by iOS) by 2015 due to Microsoft’s partnership with Nokia and they have advantage of a vibrant developer community and great development tools (i.e. Visual Studio 2010).

Its interesting times ahead with smart phones. The competition from these major brands will only produce better products in the end for the consumer.

 

Android 39%
Apple iOS 28%
RIM Blackberry 20%
Windows Phone 7 9%
HP WebOS 2%
Symbian 2%

 

August 2011 Smart Phone Market Share



Tweet This Tweet This Post!

Related posts:
Related Posts
    Smart Phone Market Share
    Desktop Operating System Market Share in October 2011
    Bing’s Growing Market Share
    Is There Gold in Them There Cell Phone Hills?

Share this post:

del.icio.us:August 2011 Smart Phone Market Share digg:August 2011 Smart Phone Market Share spurl:August 2011 Smart Phone Market Share wists:August 2011 Smart Phone Market Share simpy:August 2011 Smart Phone Market Share newsvine:August 2011 Smart Phone Market Share blinklist:August 2011 Smart Phone Market Share furl:August 2011 Smart Phone Market Share reddit:August 2011 Smart Phone Market Share fark:August 2011 Smart Phone Market Share blogmarks:August 2011 Smart Phone Market Share Y!:August 2011 Smart Phone Market Share smarking:August 2011 Smart Phone Market Share magnolia:August 2011 Smart Phone Market Share segnalo:August 2011 Smart Phone Market Share gifttagging:August 2011 Smart Phone Market Share

 

« Newer Entries - Older Entries »