Monday, July 22, 2013

Tic Tac Toe Game In Visual Studio C# GUI Based

Hello,

I have developed this Tic Tac Toe in Visual Studio C#

Tic Tac Toe C#

You will need framework v4.0 to run this Application

Download this Application from HERE
(file is password protected, password is taqi)

Thanks

The World Wide Web Publishing Service (W3SVC) is stopped

Hi There,
              If you are facing problem in starting your web site under IIS like

The World Wide Web Publishing Service (W3SVC) is stopped. Web Sites cannot be started unless the World Wide Web Publishing Service (W3SVC is running).


This error indicate that the World Wide Web Publishing Service which is a required service for IIS is not enabled.

To fix this error follow the steps below.

1. Open up services.msc

2. Now find the service name as World Wide Web Publishing Service

3. Right click on the service and than click on Start


Or you can go to properties of this service and set it's start-up type to Automatic, this way you will not have to repeat this procedure again and again.

I hope this was informative for you and I would like to thank you for reading

Saturday, July 20, 2013

How To Fix Cross Threading Operation not Valid C#

While working on Windows Application in C#, you might have come to a situation where you need to use threading. and you might encounter a error as Cross Threading not valid



Cross-thread operation not valid: Control label2 accessed from a thready other than the thread it was created on
 
Basically I was trying to access a control which was created in other thread, and I'm on other thread, so that's why I got this error

To fix this error is quite simple

There is a property called CheckForIllegalCrossThreadCalls

This is a boolean property i.e. It can only support either true or false

You just need to set this value to false, and place it in your form load method 



   1:      private void button1_Click(object sender, EventArgs e)
   2:          {
   3:              Thread objthread = new Thread(new ThreadStart(myfunc));
   4:              objthread.Start();
   5:              CheckForIllegalCrossThreadCalls = false;
   6:          }
   7:   
   8:          void myfunc()
   9:          {
  10:              label2.Text = "Text Changed";
  11:          } 

Thanks

Monday, April 1, 2013

Prevent saving changes that require table-re-creation Solution


Hello folks,

While updating database table definition in Visual Studio Express you might have encounter a error like:

Saving changes is not permitted. The changes that you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.


This problem usually occurs when "Prevent saving changes that require table-re-creation" option is checked/enabled, and in order to overcome this error we would need to disable this option.

Follow these simple steps to workaround this error

  1. Click on Tool from the menu bar
  2. Click on Options
       3. Now from left side select Table and Database Designer    
       4. Now from right side un-check Prevent saving changes that require table-re-creation
       5.Click on OK 
Now you update/save your changes, and you will not encounter this error again

If you have any further queries please post a comment

I hope it was informative for you and I would like to thank you for reading