Feb 1, 2011

WindowsMediaPlayer.fullScreen Property

Property Value

A System.Boolean value that indicates whether content is played in full-screen mode. The default value is false.

Remarks

For full-screen mode to work properly when embedding the Windows Media Player control, the video display area must have a height and width of at least one pixel. If uiMode is set to "mini" or "full", the height of the control itself must be 65 or greater to accommodate the video display area in addition to the user interface.
If uiMode is set to "invisible", then setting this property to true raises an error and does not affect the behavior of the control.
During full-screen playback, Windows Media Player hides the mouse cursor when enableContextMenu equals false and uiMode equals "none".
If uiMode is set to "full" or "mini", Windows Media Player displays transport controls in full-screen mode when the mouse cursor moves. After a brief interval of no mouse movement, the transport controls are hidden. If uiMode is set to "none", no controls are displayed in full-screen mode.
Note  Displaying transport controls in full-screen mode requires the Windows XP operating system.
If transport controls are not displayed in full-screen mode, then Windows Media Player automatically exits full-screen mode when playback stops.

Examples

The following example creates a button that uses the fullScreen property to switch an embedded player object to full-screen mode. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.



private void fullScreen_Click(object sender, System.EventArgs e)
{
    // If the player is playing, switch to full screen. 
    if (player.playState == WMPLib.WMPPlayState.wmppsPlaying)
    {
        player.fullScreen = true;
    }
}

Jan 31, 2011

Some Sample Validation Script in Java script

<SCRIPT LANGUAGE="JavaScript">
function DoValidation()
{
    var str ;
    if(document.form1.PRType.value == "")
    {
        alert("Please specify Performance rating description");
        document.form1.PRType.focus();
        return false;
    }
    str = new String(document.form1.PRType.value);
    var at1
    at1  = str.indexOf("'")
    if (at1 > -1)
    {
        alert("Single quote not allowed.");
        document.form1.PRType.select();
        return false;
    }
     if(str.length > 60)
    {
        alert("Rating description is too long");
        document.form1.PRType.focus();
        return false;
    }
    if(document.form1.details.value == "")
    {
        alert("Please specify Performance rating details");
        document.form1.details.focus();
        return false;
    }
    str = new String(document.form1.details.value);
     if(str.length > 150)
    {
        alert("Rating details is too long");
        document.form1.details.focus();
        return false;
    }
     at1  = str.indexOf("'")
    if (at1 > -1)
    {
        alert("Single quote not allowed.");
        document.form1.details.select();
        return false;
    }
    if(document.form1.orderno.value == "")
    {
        alert("Please specify order number");
        document.form1.orderno.focus();
        return false;
    }
    if(isNaN(document.form1.orderno.value) == true)
    {
        alert("Please enter a number");
        document.form1.orderno.focus();
        return false;
    }
    return true;
}
</SCRIPT>
<SCRIPT>
    function Check()
        {
            if(document.form1.id3.checked==true)
                {
                    document.form1.id1.checked =true;                   
                }
        }
</SCRIPT>
<BODY leftmargin = 0 topmargin = 0 marginwidth = 0 marginheight = 0>


<SCRIPT LANGUAGE=javascript>
<!--
    //Open Help Window
    var ofile
    function HelpWin(ofile)
    {
        //alert("Help under construction")
        window.open(ofile,'HRD',"height=400,width=600,left=90,top=20,scrollbars");

    }
//-->
</SCRIPT>

Jan 6, 2011

How to press enter key


<script type="text/javascript">
function onclickbtn(buttonName,e)
{
//the purpose of this function is to allow the enter key to
//point to the correct button to click.
var key;
if(window.event)
key = window.event.keyCode; //IE
else
key = e.which; //Firefox
if (key == 13)
{
var btn = document.getElementById(buttonName); //Get the button the user wants to have clicked
if (btn != null)
{ //If we find the button click it
btn.click();
event.keyCode = 0
}
}
}
</script>

---------------------------------------------------------------------

In Html
<input name="ctl00$ContentPlaceHolder1$pwd" type="password" id="ctl00_ContentPlaceHolder1_pwd" onKeyPress="onclickbtn('ctl00_ContentPlaceHolder1_LoginBtn1',event)" style="width:75%;" /></td>

Sample java script

<script type="text/javascript">
String.prototype.trim = function() { a = this.replace(/^\s+/, ''); return a.replace(/\s+$/, ''); };
function ascii_value (c)
{
// restrict input to a single character
c = c . charAt (0);
// loop through all possible ASCII values
var i;
for (i = 0; i < 256; ++ i)
{
// convert i into a 2-digit hex string
var h = i . toString (16);
if (h . length == 1)
h = "0" + h;
// insert a % character into the string
h = "%" + h;
// determine the character represented by the escape code
h = unescape (h);
// if the characters match, we've found the ASCII value
if (h == c)
break;
}
return i;
}
function isNameKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (!((charCode >= 97 && charCode <= 122)|| (charCode >= 65 && charCode <= 90) ||(charCode==32)||(charCode==39)||(charCode==08) ||(charCode==09)) )
{
alert("Please Enter Valid Character")
return false;
}
return true;
}
function fnlogin()
{
var email=new String();
var textname=new String();
txtname=document.getElementById("ctl00_ContentPlaceHolder1_textname").value
email=document.getElementById('ctl00_ContentPlaceHolder1_textemail').value;
if (txtname.trim()=="")
{
alert("Please Enter the name ")
document.getElementById("ctl00_ContentPlaceHolder1_textname").focus();
return false
}
else
{
var t_len2;
var str3=document.getElementById("ctl00_ContentPlaceHolder1_textname").value;
t_len2= str3.length;
for (var iCount = 0; iCount < t_len2; iCount++)
{
str4 = str3.substring(iCount, iCount+1);
var charCode = ascii_value(str4);
if (!((charCode >= 97 && charCode <= 122) || (charCode >= 65 && charCode <= 90) || (charCode == 32) || (charCode == 39)))
{
document.getElementById("ctl00_ContentPlaceHolder1_textname").focus();
alert("Please Enter Valid Name");
return false;
break;
}
}
}
if(email.trim()=="")
{
alert("Please enter email id");
document.getElementById('ctl00_ContentPlaceHolder1_textemail').focus();
return false;
}
else
{
if (!((/^[a-zA-Z0-9_-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}$/.test(email))||(/^[a-zA-Z0-9_-]+[.]+[a-zA-Z0-9_-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}$/.test(email))||(/^[a-zA-Z0-9_-]+[.]+[a-zA-Z0-9_-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}$/.test(email))||(/^[a-zA-Z0-9_-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}$/.test(email))||(/^[a-zA-Z0-9_-]+[.]+[a-zA-Z0-9_-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}$/.test(email))))
{
alert("Please Enter a Valid Email ID.");
document.getElementById('ctl00_ContentPlaceHolder1_textemail').focus();
return false
}
}
if(document.getElementById("ctl00_ContentPlaceHolder1_textproble").value=="")
{
alert("Please Enter the Problem/Suggestion ")
document.getElementById("ctl00_ContentPlaceHolder1_textproble").focus()
return false
}
else
{
var textproble=document.getElementById("ctl00_ContentPlaceHolder1_textproble").value;
if(textproble.trim()=="")
{
var tadd_len2= textproble.length;
for (var iCount = 0; iCount < tadd_len2; iCount++)
{
var str4 = textproble.substring(iCount,iCount+1);
//alert(str4);
var charCode = ascii_value(str4);
//alert(charCode);
//Response.Write(asc_num.ToString() + " ");
if (charCode==32)
{
alert("please enter valid problem.");
document.getElementById('ctl00_ContentPlaceHolder1_textproble').focus();
return false;
break;
}
break;
}
// return false;
}
}
var varlen=document.getElementById('ctl00_ContentPlaceHolder1_textproble').value;
if(varlen.length>7000)
{
alert("Please enter maximum 7000 characters!!");
return false
}
}
</script>
<script type="text/javascript">
function ok(sender, e)
{
$find('ModalPopupExtenderLogin').hide();
__doPostBack('LoginBtn', e);
}
function okJoin(sender, e)
{
$find('ModalPopupExtenderSignup').hide();
__doPostBack('JoinBtn', e);
}
function OnKeyPress(args)
{
if(args.keyCode == Sys.UI.Key.esc)
{
$find("ModalPopupExtenderLogin").hide();
}
}
function body_onkeydown()
{
if(event.keyCode==13 || event.keyCode==27)
{
var _defaultButtonName=getDefautButtonName( event.keyCode==13 ? "submitButton" : "cancelButton");
var frm=document.forms[0];
if(frm && document.all(_defaultButtonName))
{
document.all(_defaultButtonName).click();
}
}
}
function getDefautButtonName(className)
{
var _defaultButtonName="";
var children = document.getElementsByTagName("input");
for (var i = 0; i < children.length; i++)
{
var child = children[i];
var btnAction = child.buttonAction;
if(btnAction == className)
{
_defaultButtonName = child.id;
break;
}
}
return _defaultButtonName;
}
function launchModal2()
{
//alert("helo");
var mpsh=$find("ModalPopupExtender1");
mpsh.show();
}
</script>

Sample java script

<script type="text/javascript">
String.prototype.trim = function() { a = this.replace(/^\s+/, ''); return a.replace(/\s+$/, ''); };
function ascii_value (c)
{
// restrict input to a single character
c = c . charAt (0);
// loop through all possible ASCII values
var i;
for (i = 0; i < 256; ++ i)
{
// convert i into a 2-digit hex string
var h = i . toString (16);
if (h . length == 1)
h = "0" + h;
// insert a % character into the string
h = "%" + h;
// determine the character represented by the escape code
h = unescape (h);
// if the characters match, we've found the ASCII value
if (h == c)
break;
}
return i;
}
function isNameKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (!((charCode >= 97 && charCode <= 122)|| (charCode >= 65 && charCode <= 90) ||(charCode==32)||(charCode==39)||(charCode==08) ||(charCode==09)) )
{
alert("Please Enter Valid Character")
return false;
}
return true;
}
function fnlogin()
{
var email=new String();
var textname=new String();
txtname=document.getElementById("ctl00_ContentPlaceHolder1_textname").value
email=document.getElementById('ctl00_ContentPlaceHolder1_textemail').value;
if (txtname.trim()=="")
{
alert("Please Enter the name ")
document.getElementById("ctl00_ContentPlaceHolder1_textname").focus();
return false
}
else
{
var t_len2;
var str3=document.getElementById("ctl00_ContentPlaceHolder1_textname").value;
t_len2= str3.length;
for (var iCount = 0; iCount < t_len2; iCount++)
{
str4 = str3.substring(iCount, iCount+1);
var charCode = ascii_value(str4);
if (!((charCode >= 97 && charCode <= 122) || (charCode >= 65 && charCode <= 90) || (charCode == 32) || (charCode == 39)))
{
document.getElementById("ctl00_ContentPlaceHolder1_textname").focus();
alert("Please Enter Valid Name");
return false;
break;
}
}
}
if(email.trim()=="")
{
alert("Please enter email id");
document.getElementById('ctl00_ContentPlaceHolder1_textemail').focus();
return false;
}
else
{
if (!((/^[a-zA-Z0-9_-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}$/.test(email))||(/^[a-zA-Z0-9_-]+[.]+[a-zA-Z0-9_-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}$/.test(email))||(/^[a-zA-Z0-9_-]+[.]+[a-zA-Z0-9_-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}$/.test(email))||(/^[a-zA-Z0-9_-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}$/.test(email))||(/^[a-zA-Z0-9_-]+[.]+[a-zA-Z0-9_-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}$/.test(email))))
{
alert("Please Enter a Valid Email ID.");
document.getElementById('ctl00_ContentPlaceHolder1_textemail').focus();
return false
}
}
if(document.getElementById("ctl00_ContentPlaceHolder1_textproble").value=="")
{
alert("Please Enter the Problem/Suggestion ")
document.getElementById("ctl00_ContentPlaceHolder1_textproble").focus()
return false
}
else
{
var textproble=document.getElementById("ctl00_ContentPlaceHolder1_textproble").value;
if(textproble.trim()=="")
{
var tadd_len2= textproble.length;
for (var iCount = 0; iCount < tadd_len2; iCount++)
{
var str4 = textproble.substring(iCount,iCount+1);
//alert(str4);
var charCode = ascii_value(str4);
//alert(charCode);
//Response.Write(asc_num.ToString() + " ");
if (charCode==32)
{
alert("please enter valid problem.");
document.getElementById('ctl00_ContentPlaceHolder1_textproble').focus();
return false;
break;
}
break;
}
// return false;
}
}
var varlen=document.getElementById('ctl00_ContentPlaceHolder1_textproble').value;
if(varlen.length>7000)
{
alert("Please enter maximum 7000 characters!!");
return false
}
}
</script>
<script type="text/javascript">
function ok(sender, e)
{
$find('ModalPopupExtenderLogin').hide();
__doPostBack('LoginBtn', e);
}
function okJoin(sender, e)
{
$find('ModalPopupExtenderSignup').hide();
__doPostBack('JoinBtn', e);
}
function OnKeyPress(args)
{
if(args.keyCode == Sys.UI.Key.esc)
{
$find("ModalPopupExtenderLogin").hide();
}
}
function body_onkeydown()
{
if(event.keyCode==13 || event.keyCode==27)
{
var _defaultButtonName=getDefautButtonName( event.keyCode==13 ? "submitButton" : "cancelButton");
var frm=document.forms[0];
if(frm && document.all(_defaultButtonName))
{
document.all(_defaultButtonName).click();
}
}
}
function getDefautButtonName(className)
{
var _defaultButtonName="";
var children = document.getElementsByTagName("input");
for (var i = 0; i < children.length; i++)
{
var child = children[i];
var btnAction = child.buttonAction;
if(btnAction == className)
{
_defaultButtonName = child.id;
break;
}
}
return _defaultButtonName;
}
function launchModal2()
{
//alert("helo");
var mpsh=$find("ModalPopupExtender1");
mpsh.show();
}
</script>

How To Get pree Enter Key in page

What is the use of n-tier architecture and 3-tier architecture?

how to implement 3-tier architecture in asp.net using c#. 3-Tier architecture is also called layered architecture. Some people called it ...