Mac – How to speed up or slow down a video in iMovie
by Tom Gee on Apr.23, 2012, under iMovie, Uncategorized
This tutorial was done in iMovie ’11, but the same is true in iMovie ’09.
Chef Boy-R-Gee’s Mac & Cheese
by Tom Gee on Dec.23, 2011, under Entree
- 1 1/2 pounds (or so) of cooked elbow macaroni
- 8-10 ounces (total) of Sharp Cheese and Extra Sharp Cheese
- 4 Eggs beaten in 1.5 cups milk
Cooking:
- Mix all ingredients in a large casserole dish and cover almost all the noodles with the egg/milk mixture
- Add salt and pepper
- Bake at 350 for 45 minutes (give or take)
Topping (optional):
- 2 tablespoons unsalted butter
- 2 cups Panko bread crumbs
- 1 cups extra sharp cheese
Melt butter and stir together with bread crumbs and cheese until combined well.
Enable/Disable Integrated Windows Authentication (VBScript)
by Tom Gee on Dec.16, 2011, under Scripts
Option Explicit
'-----------------------------------------------------------------------
' Enable/Disable Windows Integrated Authentication setting in IE8
' Developer: Tom Gee
' Date: 12.16.2011
'-----------------------------------------------------------------------
Dim WSHShell, RegKey
Dim strInput, strCurrValue, strEnabled, strDisabled, strNewValue
strEnabled = "enabled"
strDisabled = "disabled"
set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\EnableNegotiate"
ReadRegistry
strInput = MsgBox("Integrated Windows Authentication is currently " & strCurrValue & "." & vbcrlf & vbcrlf & "Do you want to change this value?",vbYesNo,"Change Current Value?")
If strInput = vbYes Then
If strCurrValue = strEnabled Then
strNewValue = "0"
Else
strNewValue = "1"
End If
WSHShell.RegWrite RegKey, strNewValue, "REG_DWORD"
ReadRegistry
strInput = MsgBox("Integrated Windows Authentication has now been set to " & strCurrValue & ".")
End If
Sub ReadRegistry()
strCurrValue = WSHShell.RegRead(RegKey)
If strCurrValue = "1" Then
strCurrValue = strEnabled
Else
strCurrValue = strDisabled
End If
End Sub
Increase/Decrease Textbox Font Size Programatically (VB.NET)
by Tom Gee on Oct.28, 2011, under VB.NET
Private Sub frm_Main_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
' Ctrl + + = increase the SQL size
If e.Control And e.KeyCode = Keys.Add Then
Using f As Font = TextBox1.Font
TextBox1.Font = New Font(f.FontFamily, f.Size + 1, f.Style)
End Using
Exit Sub
End If
' Ctrl + - = decrease the SQL size
If e.Control And e.KeyCode = Keys.Subtract Then
Using f As Font = TextBox1.Font
TextBox1.Font = New Font(f.FontFamily, f.Size - 1, f.Style)
End Using
Exit Sub
End If
End Sub
Capture when Ctrl+Enter keys are pressed at the same time (VB.NET)
by Tom Gee on Oct.25, 2011, under VB.NET
Make sure your Form’s KeyPreview property is set to True.
Private Sub frm_Main_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.Control And e.KeyCode = Keys.Enter Then
' Do something
End If
End Sub
You can also capture when the Alt+Enter keys are pressed at the same time with the following:
Private Sub frm_Main_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.Alt And e.KeyCode = Keys.Enter Then
' Do something
End If
End Sub
Populate a DataGridView with SqlDataReader
by Tom Gee on Oct.21, 2011, under C#
In order to display the data in a SqlDataReader object in a DataGridView control, you first need to load the data into a DataTable object. The code below is in C# and the Connection String is for a SQL Server database connection.
using System.Data.SqlClient; SqlConnection con = new SqlConnection(); SqlCommand cmd = new SqlCommand(); SqlDataReader dr; // set the connection string con.ConnectionString = "Data Source=SqlServerName;Initial Catalog=DbName;Integrated Security=True" con.Open(); string SQL = "SELECT * FROM tbl_Users"; // create the SQL command cmd = new SqlCommand(SQL, con); // execute the SQL dr = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection); DataTable table = new DataTable(); table.Load(dr); reader.Close(); reader.Dispose(); con.Close(); con.Dispose(); cmd.Dispose(); cmd = null; // Display the data in the DataGridView control... DataGridView1.DataSource = table;
Ian McKellen Impression–Fresh Prince Of Bel-Air
by Tom Gee on Sep.21, 2011, under Comedy, Uncategorized
Leave a Comment :air, bel, bel-air, belair, Comedy, fpoba, fresh, gandalf, ian, immitate, impersonation, lord, lotr, mckellen, of, prince, rings, the more...Create a File Picker That Defaults to The Desktop (C#)
by Tom Gee on Sep.09, 2011, under C#
OpenFileDialog fd = new OpenFileDialog(); fd.InitialDirectory = Path.GetFullPath(Environment.GetFolderPath(Environment.SpecialFolder.Desktop)); fd.ShowDialog(); MessageBox.Show(fd.FileName); // show the selected File path


