HOME

Tuesday, October 25, 2016

WML PROGRAM SHOWING EXAMPLE OF TAG

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="one">
<p>
Username:<input type="text" name="use"/>

Password:<input type="password" name="pwd"/>
</p>
<do type="accept" label="login">
<go href="#two"/>
<setvar name="use" value="$(use)"/>
<setvar name="pwd" value="$(pwd)"/>
</do>
</card>
<card id="two">
<p>
hello $(use)
Your password is $(pwd)
</p>

<p>
   <anchor>
        <prev>back
           <setvar name="pwd" value=""/>
        </prev>
   </anchor>
</p>

</card>
</wml>

WML RPOGRAM SHOWING EXAMPLE OF NOOB TAG

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
"http://www.wapforum.org/DTD/wml12.dtd">

<wml>

<card title="Noop Element">
<p>
  <do type="prev" label="Back">
      <noop/>
  </do>
</p>
</card>
</wml>

Thursday, October 20, 2016

WML PROGRAM USING DO TASK ALONG WITH GO TAG

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">


<wml>


<card title="First Page" id="first">
<do name="Next" type="accept" label="Next">
<go href="#second"/>
</do>  
<p> This is first page </p>
</card>


<card title="Second Page" id="second">
<do type="accept" name="Back" label="Back">
<go href="#first"/>
</do>
<p> This is second page</p>
</card>


</wml>

On Key press event code, of Textbox to Accept digits only

1. drag a text box over the form
2. double click the textbox And change the event to key press event
3. right the following code in the key press event

 If Char.IsDigit(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then
            e.Handled = vbTrue
            MessageBox.Show("Enter digits only", "character press instead of number")
            TextBox1.Text = ""
            TextBox.Focus()
        End If
 
4. debug and try pressing character. it won't accept. it will accept only numbers


Explanation :

The "Char.IsDigit(e.KeyChar) = False " is the first condition That is been checked to verify what the
user's pressed if the user press a character (i.e not Digit)   then it will go for the second condition

"Char.IsControl(e.KeyChar) = False" this check's if what the user's pressed is control or not (i.e backspace, enter key e.t.c)

when this both conditions are satisfied then the condition becomes true , that the user pressed a character not a digit, number and not a control

the message box will be displayed to the user that the TextBox accepts digits only.
and then what ever is written in the textbox will be cleared and focus() will be return to the TextBox again.


Thank you

you can ask for more explanation if you felt to.

Saturday, October 15, 2016

WML program to create a Table

/*WML Program to Display Table*/
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORAM//DTD WML 1.2//EN"
"http:??www.wapforum.org/DTD/wml12.dtd">
<wml>
<card title = "WML Table">
<p>
<table columns="3" align="LCR" Border="1">
<tr>
<td>col1</td>
<td>col2</td>
<td>col3</td>
</tr>
<tr>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
<tr>
<td>D</td>
<td>E</td>
<td>F</td>
</tr>
</table>
</p>
</card>
</wml>

WML program to display Image of wbmp format

/*WML Program to Display Image*/
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORAM//DTD WML 1.2//EN"
"http:??www.wapforum.org/DTD/wml12.dtd">
<wml>
<card title = "Image">
<p>
This is an Image
<img src="info.wbmp" alt="info"?>
</p>
</card>
</wml>

WML program to display Splash screen using timer

/*WML Program to Display Timer*/
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORAM//DTD WML 1.2//EN"
"http:??www.wapforum.org/DTD/wml12.dtd">
<wml>
<card id="splash" title="splash">
<onevent type="ontimer">
<go href="#Welcome">
</onevent>
<timer value=50"/>
<p>
<a href="#Welcome">Enter</a>
</p>
</card>
<card id="Welcome" title="Welcome">
<p>
Welcome to the main screen
</p>
</card>
</wml>

WML program to display Image of wbmp format

/*WML Program to Display Image*/
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORAM//DTD WML 1.2//EN"
"http:??www.wapforum.org/DTD/wml12.dtd">
<wml>
<card title = "Image">
<p>
This is an Image
<img src="info.wbmp" alt="info"?>
</p>
</card>
</wml>

WML program to display different types of text format

/*WML Program for Displaying Different Types of Text*/
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORAM//DTD WML 1.2//EN"
"http:??www.wapforum.org/DTD/wml12.dtd">
<wml>
<card title="Text Formatting">
<p>
<b>bold Text</b><br />
<big>big Text</big><br />
<em>Emphasized Text</em><br />
                  <i>italic Text</i><br />
<small>small Text</small><br />
<strong>strong Text</Strong><br />
<u>underlined Text</u>
          </p>
</card>
</wml>

WML program to display number of card inside deck

<? xml version="1.0"?>
<wml>
<card id="one" title="First Card">
<p>
This is the first card in the deck
</p>
</card>
<card id="two" title="Second Card">
<p>
Ths is the second card in the deck
</p>
</card>
</wml>