516 Posted Topics

Member Avatar for poojavb

See if this helps u... [CODE] Try Dim starttime As New DateTime Dim endtime As New DateTime Dim duration As New TimeSpan endtime = DateTimePicker2.Text starttime = DateTimePicker1.Text duration = TimeValue(DateTimePicker2.Text) - TimeValue(DateTimePicker1.Text) Dim Dur As Integer = duration.Hours Dur = (Dur * 60) / 30 For i As Integer …

Member Avatar for poojavb
0
798
Member Avatar for amf101

Before executing take the query and run in sql server so u will come to know where the syntax is going wrong..

Member Avatar for BitBlt
0
208
Member Avatar for neh555

U cant make exe from web app. DLL's or ASPX pages have to be moved to the Server and you need to set the virutal directory for the application in IIS.

Member Avatar for Pgmer
0
248
Member Avatar for ilmkidunya
Member Avatar for archelle

you can do this in ur select statement from SQL while loading the data... [CODE]SELECT Active= convert(bit,0),* from ur table name[/CODE]

Member Avatar for Pgmer
0
152
Member Avatar for kothaisaravan

Following links may help you. [URL="http://www.codeproject.com/KB/vb/Screen_Shot.aspx"]http://www.codeproject.com/KB/vb/Screen_Shot.aspx[/URL] [URL="http://www.vbforums.com/showthread.php?t=287803"]http://www.vbforums.com/showthread.php?t=287803[/URL]

Member Avatar for kothaisaravan
0
278
Member Avatar for tashee2007
Member Avatar for srm2010

So you need to check if already an instance of form is opened or not.. u can use singleton pattern.

Member Avatar for Pgmer
0
203
Member Avatar for Ehtesham Siddiq

[CODE]If ((DataGridView1.Columns.Count = 0) Or (DataGridView1.Rows.Count = 0)) Then Exit Sub End If 'Creating dataset to export Dim dset As New DataSet 'add table to dataset dset.Tables.Add() 'add column to that table For i As Integer = 0 To DataGridView1.ColumnCount - 1 dset.Tables(0).Columns.Add(DataGridView1.Columns(i).HeaderText) Next 'add rows to the table Dim …

Member Avatar for Pgmer
0
1K
Member Avatar for Ruchi224

In your second form Write public sub which takes datatable or dataset as parameter. When user selects the rows by checking the checkbox and clicks the button, instanitate the object of form 2 and prepare and pass ur datatable or dataset. And use it to show in form 2.

Member Avatar for Pgmer
0
1K
Member Avatar for prathapsv3

try this [CODE] Try Dim savefile As SaveFileDialog = New SaveFileDialog() savefile.DefaultExt = "jpeg" savefile.Filter = "All files*.*|*.*" If savefile.ShowDialog() = DialogResult.OK Then Int(Width = PictureBox1.Width) Int(Height = PictureBox1.Height) Dim Bitmap As Bitmap = New Bitmap(Width, Height) Dim rc As Rectangle = New Rectangle(0, 0, Width, Height) PictureBox1.DrawToBitmap(Bitmap, rc) Bitmap.Save(savefile.FileName, …

Member Avatar for Pgmer
0
2K
Member Avatar for NewUserVB.Net
Member Avatar for NewUserVB.Net
0
164
Member Avatar for shay_inter

[CODE] Dim conn As SqlConnection Dim strCnn As String = "your connection string;" conn = New SqlConnection(strCnn) Dim icnt As Int64 = 0 conn.Open() Try If DataGridView1.Rows.Count > 0 Then Dim cmdInsert As New SqlCommand cmdInsert.Connection = conn Dim strCommandText As String Dim values As String = "" strCommandText = …

Member Avatar for shay_inter
0
99
Member Avatar for gerchi152
Member Avatar for adam_k
0
200
Member Avatar for archelle
Member Avatar for Pgmer
0
219
Member Avatar for khizer03
Member Avatar for M.Waqas Aslam
1
88
Member Avatar for aishapot

Dim str As String = StrConv(txtName.Text, VbStrConv.ProperCase) txtName.Text = str Use this while saving ur data as mentioned by Phasma... Whats the problem in it?

Member Avatar for aishapot
0
2K
Member Avatar for aishapot

use MASK text box and set the pattern of phone number you want. you can also set ur custom format if you want...

Member Avatar for M.Waqas Aslam
0
227
Member Avatar for mansi sharma

[CODE] Private Sub readTextFile(ByVal fileName As String) Try If Not System.IO.File.Exists(fileName) Then Exit Sub Dim strContent As String() strContent = System.IO.File.ReadAllLines(fileName) Dim x As String = "" Catch ex As Exception messagebo.show(ex.tostring) End Try End Sub[/CODE]

Member Avatar for thines01
0
5K
Member Avatar for khizer03

You should create the login form with two text box and one button. textboxes for user name and password. once user enters the username and password u should authenticate with ur database if user is authenticated then hide the login form and show the main form...

Member Avatar for khizer03
-1
242
Member Avatar for forge199

This is called cascaded combobox. In cmb1 Selected index changed event you need to filter the records of dataset which urusing to bind the cmb2 using dataview and then bind the filtered resultset to cmb2.

Member Avatar for skran
0
151
Member Avatar for divyakrishnan

Try this [CODE] Select EMpNAME,AMT,DEPTNAME from (SELECT tbl_employee.E_Name as EMpNAME,sum(tbl_Salary.Amt) as AMT,tbl_Dpt.DeptName as DEPTNAME FROM tbl_employee INNER JOIN tbl_Salary ON tbl_employee.eid = tbl_Salary.eid INNER JOIN tbl_Dpt ON tbl_Salary.eid = tbl_Dpt.eid WHERE tbl_employee.eid ='E101' GROUP BY tbl_employee.E_Name,tbl_Dpt.DeptName) as A [/CODE]

Member Avatar for adam_k
0
1K
Member Avatar for bhagawatshinde

[CODE] Dim str1 As String = "Your string" RichTextBox1.Text = str1 RichTextBox1.SelectionStart = RichTextBox1.Find(str1) RichTextBox1.SelectionFont = New Font(RichTextBox1.Font, FontStyle.Bold) [/CODE] New Font(RichTextBox1.Font, FontStyle.Bold) is having many overloaded methods probalbly you can get something there

Member Avatar for bhagawatshinde
0
1K
Member Avatar for maggoteer
Member Avatar for xxblinddzxx
Member Avatar for chellemits

Use convert.int(txtbkletnum1.text) or use txtbkletnum1.value instead of .text

Member Avatar for Pgmer
0
151
Member Avatar for quentinqid

If cn.State = ConnectionState.Closed Then again u need to initilize the connection like cn=new Sqlconnection and cn.connectionstring=connectionInfo

Member Avatar for Reverend Jim
0
2K
Member Avatar for ananth3125

Try below code.. it works for me... [CODE] Dim fBrowse As New OpenFileDialog With fBrowse .Filter = "RTF files(*.rtf)|*.rtf|doc Files(*.doc)|*.doc|All files (*.*)|*.*" .FilterIndex = 1 .Title = "Select any file" End With [/CODE]

Member Avatar for Pgmer
0
330
Member Avatar for violette
Member Avatar for pankeel
Member Avatar for Ruchi224

Try using dataset and set display member and value member to combo. in Select statement itself get the distinct bank names.

Member Avatar for Ruchi224
0
111
Member Avatar for 8mir

[CODE] Dim strS As String() = Nothing Dim actaulstring As String = "" strS = TextBox1.Text.Split(">") actaulstring = strS.GetValue(1) strS = actaulstring.Split("<") actaulstring = strS(0) [/CODE]

Member Avatar for thines01
0
221
Member Avatar for Ruchi224

ur doing Select max(regnum) from order, Where is is the insert statement? str is getting dbnull values i guess.

Member Avatar for Ruchi224
0
345
Member Avatar for PutingPanday

[CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim numtoDisturbute As String numtoDisturbute = Trim(txtSource.Text) If numtoDisturbute.Length = 0 Then Exit Sub Dim arr As New List(Of String) For Each Cha As Char In numtoDisturbute arr.Add(Cha) Next For i As Integer = 0 To arr.Count …

Member Avatar for PutingPanday
0
210
Member Avatar for dew97
Member Avatar for Ehtesham Siddiq

in ExcelWorkSheetObject.SaveAs(ExcelSheetName) method perorm the step. After saving all the data make ProgressBar1.Maximum = 100.

Member Avatar for Mitja Bonca
0
832
Member Avatar for imslala
Member Avatar for sackymatt

For this u need to write procedure to delete row from db or SQlL statement by passing the condition to delete. And load the new set of data and bind back to grid.

Member Avatar for Pgmer
0
2K
Member Avatar for mihirpatel12
Member Avatar for Pgmer
0
145
Member Avatar for Ruchi224
Member Avatar for Kalys3
Member Avatar for weeraa
Member Avatar for amitmardana

You need to prepare the insert statement and connections to ur DB. And run the query using command object. There are multiple similar threads u can refer to or google will help u.

Member Avatar for bluehangook629
0
65
Member Avatar for Abdullasha
Member Avatar for bilal_fazlani
0
96
Member Avatar for khentz

you need to get the coordinates of mouse pointer and Set the location of panel to that new coordinates

Member Avatar for khentz
0
1K
Member Avatar for rahman86

you need to copy the database in client machine, by making copylocal=true property. So whenver you publish it takes the new file to build and copy in user machine.

Member Avatar for rahman86
0
151
Member Avatar for Hardosh Kumar

You need to use either datareader or dataadapter methods to get the data from DB and then assign to textboxes by looping through ur dataset or datareader.

Member Avatar for Hardosh Kumar
0
262
Member Avatar for Cifale
Member Avatar for Cifale
0
736
Member Avatar for mihirpatel12
Member Avatar for Hardosh Kumar

[CODE] Try Dim cn As SqlConnection Dim strCnn As String = "Your data base connection string" cn = New SqlConnection(strCnn) cn.Open() Dim comm As New SqlCommand("Your sp or Command text to get the data from DB", cn) '' If ur using Sp then Commandtype= CommandType.StoredProcedure if it is Text then …

Member Avatar for Hardosh Kumar
0
207

The End.