Skip to main content

Posts

Showing posts from November, 2022

Vb.Net tools Focus Color | Techbymati

Contents Vb.Net tools Focus Color ( Textbox,Combobox and others) Private Sub focus_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_partyname.Enter, _         cb_partydist.Enter, _         cb_partycity.Enter, _         txt_partyadd.Enter, _         txt_partyphone.Enter, _         txt_partypin.Enter, _         txt_partygstno.Enter, _         txt_partypan.Enter         ' Dim tb As TextBox = sender         ' Dim cb As ComboBox = sender         ' tb.BackColor = Color.LightPink         ' cb.BackColor = Color.LightPink         DirectCast(sender, Control).BackColor = Color.LightPink     End Sub     Private Sub focus_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_pa...

Datagridview complete Guide Vb.net | TechByMati

Contents DataGridView summary on Footer Vb.Net Imports System.Drawing Imports System.Data.SqlClient Imports System.Data Partial Class _Default Inherits System.Web.UI.Page Dim total As Integer = 0 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim adapter As New SqlDataAdapter() Dim ds As New DataSet() Dim i As Integer = 0 Dim sql As String = Nothing Dim connetionString As String = "Data Source=.;Initial Catalog=pubs;User ID=sa;Password=*****" sql = "select top 6 ord_num,stor_id,title_id,payterms,qty from sales" Dim connection As New SqlConnection(connetionString) connection.Open() Dim command As New SqlCommand(sql, connection) adapter.SelectCommand = command adapter.Fill(ds) adapter.Dispose() command.Dispose() connection.Close() GridView1.DataSource = ds.Tables(0) GridView1.DataBind() End Sub Protected Sub GridView1_RowDataBound(ByVal sender As Obje...

Vb.Net and MS-Access database Conection | TechbyMati

Contents Vb.Net and MS-Access database Conection Open connection to password protected Access database: "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\App1\Your_Database_Name.mdb; Jet OLEDB:Database Password=Your_Password" connStr = "Provider=Microsoft.Jet.OLEDB.4.0; " +             "Data Source=G:\\Backup\\Kashif\\xyzDB.mdb";             qryStr = "select content,websiteID  from content";             dbConn = new OleDbConnection(connStr); Examples:      SQL:  "server=tonydev;database=northwind;uid=tony;pwd=hrmmm"               "server=tonydev;database=northwind;trusted_connection=yes"      OLE: "Provider=Microsoft.Jet.OLEDB.4.0; Data source=C:\tony.mdb"     Public Function FetchData(ByVal FileName As String) As DataSet         'Define the connectors   ...

Number to Text Crystal Report | Techbymati

Contents Number to Text Crystal Report | Techbymati please try this, 1st you create a formula : NumToWords1 towords(truncate(sum({C_PaymentItem.AMOUNT}),0)) after that the second formula: NumToWords1 if Round({@Total Amount},2) - Int({@Total Amount}) = 0 then  "Ringgit Malaysia: " + ToWords ({@Total Amount},0) + " only" else "Ringgit Malaysia: " + {@NumToWords1}  + " and " + "Cents " + ToWords ((Round({@Total Amount},2) - Int({@Total Amount})) * 100, 0) + " only"  

TEXTBOX AUTO SERACH VB.NET | TECHBYMATI

Contents  TEXTBOX AUTO SERACH VB.NET | TECHBYMATI Private Sub FillSearchResult()         Dim AutoComp As New AutoCompleteStringCollection()         Dim dsSerch As New DataSet         ' Dim ConStr As String = "user id=sa;password=aeiouy;Initial Catalog=......."         ' Dim sqlCon As New SqlClient.SqlConnection(ConStr)         'sqlCon.Open()         ''Dim Str As String = "select empname from tbl_Employee"         '' Dim SqlCom As New SqlClient.SqlCommand(Str, cnn)         ''Dim sqlAdap As New SqlClient.SqlDataAdapter(cnn)         ''sqlAdap.Fill(dsSerch)         checkConnection()         Dim ad As New SqlDataAdapter("SELECT ownername FROM vachileduesG Where ownername like '" & txt_ownername.Text & "%'", cnn)         Dim dt A...