Welcome to W3Courses
 Like Us on Facebook

Programming

VBA Code to Call Windows API File Open Dialog Box in Microsoft Access

The code below calls the windows API File Open dialog box and when a user selects a file the function returns the file path.

Option Compare Database
Option Explicit

Share

String Replace Function in C#

The following code will replace a character or a word with some other character or a word. This is accomplished by the replace function in C#.

using System;
using System.Text.RegularExpressions;

string strReplace;
strReplace = "This is a test string.";
strReplace = Regex.Replace(strReplace, " is", " was");

Share

Rename a File on the Disk or Local File System using C#

The following code will rename a file called temp.txt to tempnew.txt

using System.IO;

Share

Prevent Framing of your Website using Html

The following parameters when added to the body tag of your webpage will not let any other website display your website in a frame.

<body onLoad="if (self != top) top.location = self.location">
 

Share

How to Fix the Background Image on a Webpage using Html

The following parameters when added to the body tag will fix the background image of the html document. That means, when you scroll down the page, the background will remain in its place and will not change or scroll.

<body background="images/background.jpg" bgproperties=fixed>

Share