Skip to main content

Posts

How to get Machine Name /Mac Address

How to get   Machine Name                     Get_Machin_Name = Environment.MachineName How to get   Mac Address             Dim mc As System.Management.ManagementClass             Dim mo As ManagementObject             Dim sMac As String = ""             mc = New ManagementClass("Win32_NetworkAdapterConfiguration")             Dim moc As ManagementObjectCollection = mc.GetInstances()             For Each mo In moc                 If mo.Item("IPEnabled") = True Then                     sMac = mo.Item("MacAddress").ToString()                     Exit For       ...

How do I make a textbox that only accepts numbers?

How do I make a textbox that only accepts numbers? private void textBox1_KeyPress( object sender, KeyPressEventArgs e) {     if (! char . IsControl (e. KeyChar )         && ! char . IsDigit (e. KeyChar )         && e. KeyChar != '.' )     {         e. Handled = true ;     }     // only allow one decimal point     if (e. KeyChar == '.'         && (sender as TextBox ). Text . IndexOf ( '.' ) > - 1 )     {         e. Handled = true ;     } } Or use this  private void textBox1_TextChanged ( object sender , EventArgs e )     {         if ( System . Text . RegularEx...

Happy Diwaly

Happy Diwali to all All

How to read Password Field

          How to read Password From Website              Right-click the password box and select "Inspect Element." This brings up the developer console. On the line that starts with "input type=password" change the word "password" to "text." This will reveal your password. While you can always pop into your browsers menu screen to look up saved passwords (or into your LastPass profile), this is a far quicker way to see your hidden passwords. Thanx for read this Article..