Determine IP Address of Router (Win 7)

Determine IP Address of Router (Win 7)

  1. Click your network connection icon in the system tray (bottom-right corner of your screen next to the clock)
  2. Click Open Network & Sharing Center
  3. Click the Network Connection name
  4. Click the Details button
  5. Your Router’s IP Address will be listed as the Default Gateway

Xbox 360 Port Forwarding – Fix NAT Issue

This video quickly shows you how to setup your Xbox 360 to always have the same IP address on your local network as well as forwarding 4 ports on your Router to the Xbox.  This will help your Xbox connectivity and will resolve the issue if your NAT Type was listed as “Moderate” or “Strict.”

1. Open your Internet browser
2. Sign-in to your Router by entering your Router’s IP Address and clicking Enter.  If you don’t know how to determine your Router’s IP Address watch one of these videos to find out:

Mac OS X – http://www.youtube.com/watch?v=wVDFmFYZPhQ&hd=1
Windows 7 – http://www.youtube.com/watch?v=lMbW1qHI55w&hd=1
Windows XP – http://www.youtube.com/watch?v=igcDT3VSGoU&hd=1

3. Sign-in to your Router (if applicable) with your Router’s Administrator username and password
4. Click the DHCP Reservation button
5. Select the Xbox from the list of DHCP Clients; the Xbox will typically be the entry with no name
6. Click the Add Clients button
7. Provide a descriptive name for the Xbox
8. Change the IP Address reserved for the Xbox to something easy to remember; I used 192.168.1.160 in this example.  If you don’t change the IP Address, take note of what the address is before continuing
9. Click the Save Settings button
10. Click the Applications & Gaming tab
11. Enter the following 4 Ports and forward them to the Xbox’s IP Address that we just defined in step 8
Port 88 – UDP
Port 3074 – Both
Port 53 – Both
Port 80 – TCP
12. Make sure that all of the Port Forwarding rules have pointed to the Xbox and have all been enabled
13. Scroll to the bottom of your window
14. Click the Save Settings button
15. Click the Continue button

Microsoft Link with more information:
http://support.xbox.com/en-US/xbox-live/troubleshoot/connection-issues/nat-type-strict

How To Redeem iTunes Gift Card in iTunes

How To Redeem iTunes Gift Card in iTunes

  1. Open iTunes
  2. Click the iTunes Store icon on the left menu
  3. Click the Sign-In button in the top right (if you have not signed-in to the Apple Store on this Mac before)
  4. Enter your Apple ID and Password
  5. After you see your email address in the top right (where the Sign-In button was), click the Redeem option in the Quick Links section on the right
  6. Enter your iTunes Gift Card code
  7. Press the Redeem button

Export Data Grid (datagridview) to Excel in VB.NET

Create the following method and pass it the DataGridView that you want to export.  This will export all grid contents (including column headers) to Excel and “freeze” the top row.

Note: The “prog_Progress” object is a ProgressBar I added to the application to display the progress of the export to the user.

[csharp]

private void ExportDataGridViewToExcel(DataGridView dgv)
{
// exit method if there are no records to export
if (dgv.RowCount == 0)
{
MessageBox.Show(“No data to export.”, “No Data”, MessageBoxButtons.OK, MessageBoxIcon.Stop);
return;
}

SaveFileDialog fd = new SaveFileDialog();

fd.OverwritePrompt = false;
fd.FileName = “Export-” + DateTime.Now.ToString(“yyyyMMdd.hhmm”) + “.xls”; // default file name
fd.Filter = “Excel (*.xls) |*.xls;*.xlsx”;

if (fd.ShowDialog() == DialogResult.OK) // only continue if user specified/selected a file
{
UpdateStatus(“Exporting data to Excel…”);

// create the Excel app
Microsoft.Office.Interop.Excel._Application xlApp = new Microsoft.Office.Interop.Excel.Application();

// create the Workbook
Microsoft.Office.Interop.Excel._Workbook xlWB = xlApp.Workbooks.Add();

// create the Worksheet
Microsoft.Office.Interop.Excel._Worksheet xlWS = (Microsoft.Office.Interop.Excel._Worksheet)xlWB.Worksheets[1];

try
{
// show the progress bar
prog_Progress.Visible = true;
prog_Progress.Style = ProgressBarStyle.Blocks;
prog_Progress.Maximum = dgv.RowCount – 1;

// export the column headers
for (int c = 0; c < dgv.ColumnCount; c++)
{
xlWS.Cells[1, c + 1] = dgv.Columns[c].HeaderText;
}

// bold and underline the first row
Microsoft.Office.Interop.Excel.Range rng = (Microsoft.Office.Interop.Excel.Range)xlWS.Rows[1];
rng.EntireRow.Font.Bold = true;
rng.EntireRow.Font.Underline = true;

// freeze the top row
xlApp.ActiveWindow.SplitRow = 1;
xlApp.ActiveWindow.FreezePanes = true;

// export the data in the DataGridView
for (int r = 0; r <= dgv.RowCount – 1; r++)
{
Application.DoEvents(); // prevent the app from “Not Responding”…
prog_Progress.Value = r; // update the Progress Bar

for (int c = 0; c <= dgv.ColumnCount – 1; c++)
{
xlWS.Cells[r + 2, c + 1] = dgv[c, r].Value;
}
}

xlWS.Columns.AutoFit(); // autofit the columns

xlWB.SaveAs(fd.FileName); // save the file

prog_Shares.Visible = false;

xlWB.Close();
xlWS = null;
xlWB = null;
xlApp.Quit();
fd = null;

MessageBox.Show(“Excel Workbook Created Successfully”, “Export Complete”, MessageBoxButtons.OK, MessageBoxIcon.Information);
UpdateStatus(“Export to Excel complete!”);
}
catch (Exception ex)
{
xlWB.SaveAs(fd.FileName); // save the file
xlApp.Quit(); // quit Excel
prog_Progress.Value = prog_Shares.Maximum;
MessageBox.Show(“Error exporting data to Excel.” + Environment.NewLine + ex.Message, “Export error”, MessageBoxButtons.OK, MessageBoxIcon.Error);
prog_Shares.Visible = false;
}
}
}

[/csharp]