Posts

How to connect computer using hotspot by create programme in VB .Net

I am going to explain how to create windows utility for create hotspot and connect it with other machine Step : 1. Take 2 text box one for user id (i.e txtUserName) and one for password (i.e txtPassword) 2. Take 1 button using that we can execute the command to create hotspot using entered credential. 3. call following sample code to create hotspot on click of button. // Sample Code Public s As String Public i As Integer Public flag As Boolean = True If (flag = True) Then flag = False Button1.Text = "Stop" txtUserName.Enabled = False txtPassword.Enabled = False i = txtPassword.TextLength If (i < 6) Then MessageBox.Show("Password must be >= 6 character", "Password") Else s = "netsh wlan show drivers" + vbNewLine + "netsh wlan set hostednetwork mode=allow ssid=" + txtUserName.Text + " &

Text To Speech using VB Script

Here I am going to explain how to convert text to speech using VB Script Code Snippets : Dim speaks, speech speaks = "Welcome " + TextBox1.Text + "How Are You" // Your text for convert into speech speech = CreateObject("sapi.spvoice") // Create object of speech speech.speak(speaks) // Convert text to speech

Identify reading end using Barcode Scanner

While reading the text from the barcode scanner if you want to check if the reading is end or not. When reading has been completed from barcode scanner it will append the enter key in text and if you want to extract text automatically while reading completed then you can check using below javascript code snippets. // pass event as the object from where you are reading text through barcode. function getScanneText(event) { if(event.e.keyCode == 13) // ascii value of enter key { // do something here. } } call above function on keyup event of textbox and check, if enter key is pressed or not.

Generate PDF from HTML Documents using C#

Generate PDF from HTML Documents using C# 1. Install Package : Install-package NReco.PdfGenerator 2.Write Down Code as follow : var htmlToPdf = new HtmlToPdfConverter(); var pdfbytes = htmlToPdf.GeneratePdfFromFile(" ", null); File.WriteAllBytes(" ", pdfbytes);

Create Short URL using C#

How to create Short/Tiny URL from Long URL ? - Get API Key from https://developers.google.com/url-shortener/v1/getting_started - Write Down Code snippet given below and Just replace API Key public static string getGoogleTinyURL(string url) { string key = string post = "{\"longUrl\": \"" + url + "\"}"; string shortUrl = url; HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.googleapis.com/urlshortener/v1/url?key=" + key); try { request.ServicePoint.Expect100Continue = false; request.Method = "POST"; request.ContentLength = post.Length; request.ContentType = "application/json"; request.Headers.Add("Cache-Control", "no-cache"); using (Stream requestStream = request.GetRequestStream())

Take Backup of SQL Database Using Batch file

Step for Take Backup 1.Open Notepad 2.Paste following Code in notepad 3.Save this file as backup.bat Code snippets echo off cls echo -- BACKUP DATABASE -- set DATABASENAME=MobileRecharge :: filename format Name-Date (eg MyDatabase-2009.5.19.bak) set DATESTAMP=%DATE:~-4%.%DATE:~7,2%.%DATE:~4,2% set BACKUPFILENAME=D:\%DATABASENAME%-%DATESTAMP%.bak set SERVERNAME=DESKTOP-0BOTN0I\SQLEXPRESS echo. sqlcmd -E -S %SERVERNAME% -d master -Q "BACKUP DATABASE [%DATABASENAME%] TO DISK = N'%BACKUPFILENAME%' WITH INIT , NOUNLOAD , NAME = N'%DATABASENAME% backup', NOSKIP , STATS = 10, NOFORMAT" echo. pause Instruction 1. MobileRecharge is database name replace this name with your database which you want to take backup 2. Here we specify D:/ for take backup 3.DESKTOP-0BOTN0I\SQLEXPRESS is server name replace with your server name 4.Run the file and see the backup in D:/ Drive 5.If you want to take backup Automatically Schedule this file in Task Scheduler

How to create bootable pendrive using cmd

Run command prompt with admin rights and take following step Insert a USB flash drive into a running computer. Open a Command Prompt window as an administrator . Type diskpart. In the new command line window that opens, to determine the USB flash drive number or drive letter, at the command prompt, type list disk , and then click ENTER. The list disk command displays all the disks on the computer. Note the drive number or drive letter of the USB flash drive. At the command prompt, type select disk , where X is the drive number or drive letter of the USB flash drive, and then click ENTER. Type clean , and the click ENTER. This command deletes all data from the USB flash drive. To create a new primary partition on the USB flash drive, type create part pri , and then click ENTER. To select the partition that you just created, type select part 1 , and then click ENTER. To format the partition, type format fs=ntfs quick, and then click ENTER. Type active , and the