Thursday, January 7, 2016

Hello World C

1. Get and install C compiler (I used gcc https://gcc.gnu.org/)
2. Create new folder "hw" somewhere
3. In "hw" folder with text editor create a file named hw.c with code

#include <stdio.h>

main () {
   printf("Hello World\n");
}

4. Save the file and from "hw" folder run command below from command line to get compiled program

gcc hw.c -o hw

5. In "hw" folder there is new a new file named "hw". It is the program. With command below from command line, start the program

./hw

6. "Hello World" will be printed on screen.


Friday, March 23, 2012

DataGridView: Disable/Enable Edit of Column For Edititng/Adding Row

Private Sub DataGridView_CellBeginEdit(ByVal sender As Object, _
   ByVal e As System.Windows.Forms.DataGridViewCellCancelEventArgs) _
   Handles DataGridView.CellBeginEdit
   If e.RowIndex <> DataGridView.NewRowIndex _
      And e.ColumnIndex = Column.Index Then e.Cancel = True
End Sub