how to make windows form application design looks like windows 7 – Enable Visual Styles

If you see any control visual looks is not just what it was looking on interface design mode (or windows style looks) like below 2 images

looks of interface design mode
Without Enable Visual Styles or Windows Classic Looks

Then It means you are skipping a method call from System.Windows.Forms Namespaces, that is EnableVisualStyles

To Enables visual styles or operating system like controls color, fonts and other visual elements for your application just use below code before application run on Main method.

Application.EnableVisualStyles();

as below

[STAThread]
static void Main()
{
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new Form1());
}

Returning a value to parent form from sub or popup form with C Sharp .net

It is a common features you may need it several times when you are on the way of a professional C# application development.

Suppose you have a Parent form which has a Textbox control and a Button control. Now you want to click on the button Control then it will open a Sub form or a PopUp form. In which there will be another button or any other control for example DatagridView and you want to click on it and it will return a value to it’s Parent form and that value will display on Parent forms TextBox control as text property.

You can do it by below listed steps.

Step 1 (Parent Form Code):
On parent form button control click event you can call your sub form like below code to open it and get it’s returning values from it’s predefined properties and use it for your textBox control as below.

private void button1_Click(object sender, EventArgs e)
        {
            frmSubForm objSForm = new frmSbFOrm();
            if (objSForm.ShowDialog() == DialogResult.OK) 
            {
                this.txtParent.Text = objSForm.StringProperty;
            }
        }

Step 2 (Sub Form Code):
On the sub form which one is opening after the click on button control of Parent form you can write below code for any events to return the value and exit sub form.

private void button1_Click(object sender, EventArgs e)
        {
             this.StringProperty= "Sample String";
             this.DialogResult = DialogResult.OK;
        }

Basics of a complete professional software in development

When you are on the way of a professional software development with any programming language, there are some primary things you need to keep in touch while development.

Basically,

  1. When or why a software is needed in a factory or company?
  2. Why any factory level company or a general company will agree to use your software instead of maintaining their company by the current procedure?
  3. What is the security of your software?
  4. What is the extra benefit to use a computer software?
There are a lot of question will come from a client end when you propose to use a computer software, you know.
 
To keep some perfect answer against above listed questions and upcoming question from the client, there are a lot of solution or features should have to be available in a professional software included.

Replacing post content attachment url for wordpress new setup

When working with wordpress sometime we need to copy full site content with new wordpress site setup. If you use wordpress default inport / export then all content and resource source url works fine but all image or attachment source url in content is keeping it’s old values.

To replace those old source url to new site url you can add a wordpress filter like my below given one.

Note: You need to copy uploads folder to your new server.

function replace_phpfarmer_url($content){
    $content = str_replace('http://olddomain.com/', 'http://newdomain.com/', $content);
    return $content;
}
add_filter('the_content', 'replace_phpfarmer_url');

A complete professional software development with C Sharp .net

If I start from the beginning when I was in University and working hard for a Complete professional software development with VB.Net on Visual Studio 2005.

I was too much curious to know what is the actual look or coding system for a professional software? How can I develop a software with professional look and coding? What will be the features listing of a complete software? etc etc

It’s after 5 years from here! Now I can develop those all things with quite nice features, coding standard and looks with some different languages!

Ok, come to the point, With C Sharp .net I will write a complete series of article to show the step by step development of a complete professional software. It should be from the step zero, that is selecting what I want to develop and what function can be done with that project that is features listing. Then the step by step development.

So the basic flow of that series of articles will be

Hopefully all those articles will be easy to read and easy to understand for those who have basics on computer programming in C Sharp language. I am not sure how much it is true yet, to see what is coming next keep in touch!

Note: In the meantime you can do some basic study on C Sharp with Visual Studio 2010 as well!

Thanks

Creloaded can not add items on Cart – Your Shopping Cart is empty! – Solved!

I know you can not add products on your creloaded Cart! It is always trying to keep itself neat and clean that is EMPTY! 🙂

Solution!
The Empty Cart error on Creloaded is all about COOKIE save path or COOKIE storage domain!
So, The Empty Cart error on Creloaded Solution can be Some settings on configure.php file

For localhost setup:

define('HTTP_COOKIE_DOMAIN', 'localhost');

or

define('HTTP_COOKIE_DOMAIN', '');

with

define('STORE_SESSIONS', 'mysql'); 

For server setup:

define('HTTP_COOKIE_DOMAIN', 'yourdomain.com');

with

define('STORE_SESSIONS', 'mysql'); 

How to close a form when pressing the escape key in C Sharp .net

On visual studio C Sharp .net windows form application if you have a form which you want to close on escape key press, you need to have a button (Cancel Button) on the form. If you click on the button the form will close. So that is Close Button with any of below listed code…

this.Hide();
or
Application.Exit();
or
this.Close();
private void btnCancel_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

Then on form properties you need to Set the value for CancelButton with the above mentioned button name selected.

Check the below attached graphical example to do it….

developing cakephp multilingual website (language management)

On my previous “developing cakephp multilingual website” article I as advising you to do a management for languages db table for site administrator, It seems a lot of readers do not understand what will be the management I am asking to write. Sorry for that, Now I am attaching a zip file to show what to do with “do a management for languages db table for site administrator”, It has 2 screenshot, 1 controller, 1 model of language table and view files for a sample.

There are a lot of extra codes on view files which is required for my projects, You just advised to follow the steps or structures.

Merry Christmas to all

Download Attachment

dd simple photo gallery version 1.1 has been released

Finally the dd simple photo gallery version 1.1 has been released. I tried to make it more easy to use that’s why I have removed the timthumb image resizing on the fly which required some server manual settings.

dd simple photo gallery version 1.1 features:

1. added around 40 different effects on photo sliding
2. above 15 settings you can choose when the plugins call
3. timthumb on the fly photo resize has been removed
4. support for multiple photo gallery on a single page or post

the complete list of different effect and settings is not configurable on gallery settings page yet, very soon it will be added on gallery settings page.

for more discussion please visit http://www.dropndot.com/blog/development/ddspg-version-1-1-has-been-released/

thanks

my ongoing project dropncms.com

I know how to code a website using wordpress, joomla, phpfox, dzoic handshakes, oscommerce, zencart, creloaded, magento and also some other cms. Hopefully very soon I am going to add another one dropncake. May be you are ready to ask what it is? Just wait for a few days, I will let you know what is dropncake. For a brief definition up to now, I can say, “dropncake is a cakephp php framework based Content Management System, which will be released under dropncms!”

Yes, we are going to release it’s version 1.0.0 beta under dropncms very soon. At dropndot we are working hard to finish the project as soon as possible. Hopefully by December 2011 first week we can release it. So, Keep in touch for a cool and yummy cake!