2,383 Posted Topics

Member Avatar for keedier

Try : Private Sub ListView1_Click() Dim a, b, c, d As String Dim index As Integer index = ListView1.SelectedItem.index a = ListView1.ListItems(index).Text b = ListView1.ListItems(index).SubItems(1) c = ListView1.ListItems(index).SubItems(2) d = ListView1.ListItems(index).SubItems(3) 'Set textboxes in form2 with value from listview Form2.Text1.Text = a Form2.Text2.Text = b Form2.Text3.Text = c Form2.Text4.Text = …

Member Avatar for Jx_Man
0
282
Member Avatar for Papa_Don

1.[Read this](http://geekswithblogs.net/TimH/archive/2006/11/08/96546.aspx) 2. You can compare date function using `DateTime.Compare(date1, date2)` Ex : Dim date1 As Date = #08/01/2009 12:00AM# Dim date2 As Date = #08/01/2009 12:00PM# Dim result As Integer = DateTime.Compare(date1, date2) Dim relationship As String If result < 0 Then relationship = "is earlier than" ElseIf result …

Member Avatar for Papa_Don
0
234
Member Avatar for somjit{}

> I have a college project related to creating banking software where vb6 is being used as the frontend You can learn about add,update and delete data from database. Also Encrypt and decrypt data. > if the members could guide me to some good books/links that would be great! looking …

Member Avatar for chowdhary.barnali
0
241
Member Avatar for imBaCodes

Developer Tab -> Insert -> More Controls -> Microsoft Date and Time Picker (SP4) -> Then drawing it

Member Avatar for Jx_Man
2
188
Member Avatar for Kujee

Update CurrentStock after Save data. Do save and update at the same time. You can post your code here to give more information.

Member Avatar for Kujee
0
454
Member Avatar for pearl.kumar1

try : TempDate = dr.Item("Appointmentdate").ToString TxtAppointmentdate.Text = TempDate.ToString("yyyy-MM-dd")

Member Avatar for TnTinMN
0
119
Member Avatar for odohben

> please how can i create a database and link it to my VB6 application. i designed a VB application to hold bio-data that will be updated from time to time but am finding it difficult to create the access back-end for it. please any urgent help will be most …

Member Avatar for jhai_salvador
0
232
Member Avatar for manoj_582033

> I Want to Check How Much PC's Are Connected On My LAN, http://www.daniweb.com/software-development/vbnet/threads/310040/how-to-view-computers-connected-to-a-local-network > also if I Call The Database From Server PC to Client PC Then What Should be The Connection String What kind of database? Access : http://www.connectionstrings.com/access-2007 sql server 2008 : http://www.connectionstrings.com/sql-server-2008 More info http://www.connectionstrings.com/

Member Avatar for Jx_Man
0
131
Member Avatar for imBaCodes

> 'is there any code like this? > userform1.input_date.value = userform1.input_date.lastValue Nope.. I don't think it exist > i have a form and i have 2 input box. > Is there any way to restore the last input in reopening the Form. You can save it into text file and …

Member Avatar for imBaCodes
0
129
Member Avatar for chdboy
Member Avatar for dinesh012

Try this : Dim com1 As New OleDb.OleDbCommand com1 = con1.CreateCommand com1.CommandText = "insert into Department(DNo,DName,Manager,AddressL1,AddressL2,City,Telephone,E-mail)values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox8.Text + "' )"

Member Avatar for annaharris
0
139
Member Avatar for Naruse

Try this : Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) w = Picture1.Point(X, Y) R = w And RGB(255, 0, 0) G = Int((w And RGB(0, 255, 0)) / 256) B = Int(Int((w And RGB(0, 0, 255)) / 256) / 256) labelR.Caption = …

Member Avatar for Jx_Man
0
1K
Member Avatar for imBaCodes

Hi imBaCodes, This thread already marked as solved without any reply. You can share the solution here. It will help another members who has same problem like you. Thank You

Member Avatar for imBaCodes
0
176
Member Avatar for 2mhzbrain

> where can i put table headers, this code will loop on selected record on the table Just add one row when you create a table. `Set SIATable = SIADoc.Tables.Add(SIADoc.Bookmarks("\endofdoc").Range, rs.RecordCount + 1, 7)` Fill first row with Column name before you get a data thorugh the looping. '.... ' …

Member Avatar for 2mhzbrain
0
217
Member Avatar for zawpai

> Currently, I have 3 listboxs' data, but I don't know how to create 3 columns and show them with datagrid control. > Does anyone give me a guid line how to show listbox's data with datagrid? You can fill recordset with listbox items then you can set datagrid source …

Member Avatar for zawpai
0
2K
Member Avatar for LionelMessi

Try : using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form3 : Form { public Form3() { InitializeComponent(); } Control actcontrol; Point preloc; private void label1_MouseDown(object sender, MouseEventArgs e) { actcontrol = sender as Control; preloc …

Member Avatar for tinstaafl
0
2K
Member Avatar for Jake.20
Member Avatar for Aurax

Try something like this : Function FileText(ByVal filename As String) As String Dim handle As Integer ' ensure that the file exists If Len(Dir$(filename)) = 0 Then Err.Raise 53 ' File not found End If ' open in binary mode handle = FreeFile Open filename$ For Binary As #handle ' …

Member Avatar for Aurax
0
343
Member Avatar for babateejay

Add this foloowing function : Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean If msg.WParam.ToInt32() = CInt(Keys.Enter) Then MsgBox("Enter") Return True End If Return MyBase.ProcessCmdKey(msg, keyData) End Function

Member Avatar for Jx_Man
0
3K
Member Avatar for Jake.20
Member Avatar for cplusplusgeek
Member Avatar for Aurax

Use StrReverse() function to reserve the word/phrase. Compare the real words/phrase with reserved words/phrase. Check out the result if it same or not. Private Sub Command1_Click() Dim Palindrome As String Palindrome = StrReverse(Text1.Text) If StrComp(Text1.Text, Palindrome, vbTextCompare) = 0 Then MsgBox "Palindrome!" Else MsgBox "Not a Palindrome!" End If End …

Member Avatar for Reverend Jim
0
538
Member Avatar for Aurax

Try : For Each Control In Me.Controls If TypeOf Control Is TextBox Then Control.Text = "" End If Next Control

Member Avatar for Aurax
0
193
Member Avatar for Jake.20

Confused here. I can't understand what you want exactly. You can't edit data in datagrid or you can't show data to the textboxes?

Member Avatar for Jx_Man
0
218
Member Avatar for Contagious98

Try This : [CODE]Private Sub OpenFormToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenFormToolStripMenuItem.Click Dim NewForm As New Form1 NewForm.Show() End Sub[/CODE]

Member Avatar for Mapz Xate
0
2K
Member Avatar for linux
Member Avatar for elanch

U can compare dates in terms of days , months or years as u wish by DateDiff Function in VB6. As DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]]) Where interval will be in string as : yyyy Year q Quarter m Month y Day of year d Day w Weekday ww Week …

Member Avatar for dhineshbabu2k1
0
2K
Member Avatar for sharunkumar

on any event : [CODE]SendKeys.Send("{ENTER}") 'for enter SendKeys.Send("{%}") 'for Alt SendKeys.Send("{^}") 'for Ctrl SendKeys.Send("{+}") 'for shift[/CODE] [CODE]' Combination SendKeys.Send("^(c)") 'for Ctrl-C[/CODE] [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send.aspx"] More information, go to msdn online[/URL] anyway you posting on wrong section..this section for vb 4,5,6 not for vb.net section.

Member Avatar for Cardine.Mpisane
0
28K
Member Avatar for OM PARWANI
Member Avatar for aliyahkusnan
Member Avatar for arasten

This code Using 'Shell': [CODE]Call Shell("Shutdown /s") 'to shutdown Call Shell("Shutdwon /r") 'to restart Call Shell("Shutdown /l") 'to logoff Call Shell("Shutdown /a") 'to Abort [/CODE] This Code Using 'Managed Code in .NET': [CODE]System.Diagnostics.Process.Start (Shutdown", "/s") 'to shutdown System.Diagnostics.Process.Start("Shutdown", "/r") 'to restart System.Diagnostics.Process.Start("Shutdown", "/l") 'to logoff System.Diagnostics.Process.Start("Shutdown", "/a") 'to abort[/CODE] Choose …

Member Avatar for pritaeas
0
5K
Member Avatar for sonia sardana

Go to Project -> References -> Microsoft Excel 10.0 Object Library Then add this following code : [code=vb]Dim MsExcel As Excel.Application Private Sub Command1_Click() MsExcel.Workbooks.Add MsExcel.Range("A1").Value = List1.List(0) MsExcel.Range("B1").Value = List1.List(1) MsExcel.Range("C1").Value = List1.List(2) MsExcel.Visible = True End Sub Private Sub Command2_Click() With List1 .AddItem (txtName.Text) .AddItem (txtEmail.Text) .AddItem (txtMobile.Text) …

Member Avatar for Reverend Jim
0
1K
Member Avatar for silversurf

Try to using Alias in your SQL Statement. It's working for me in vb.net version, but never test it in vb6 with flex grid. Change alias with your desire column name.

Member Avatar for silversurf
0
2K
Member Avatar for rajsharma_85

in properties of textbox1 -> tabindex = 0 when it run the cursor will get focus in textbox1.

Member Avatar for Rahul47
0
5K
Member Avatar for killer88
Member Avatar for tinstaafl
0
149
Member Avatar for mklove999

> Our school wanted us to use that. Even us students, are wondering on why we are still using that. Okay.. Post your code. How far you doing this. Make some effort here. Any problem then ask here, "BUT DON'T ASK HOW TO CODE IT".

Member Avatar for Jx_Man
0
110
Member Avatar for mferarri

> The label flashes every time the caption changes (this is the problem). so what the problem with this? > Also, if I set the timer interval to 1, the label dosent print 1000 milliseconds in a second can anyone explain this? It happen because you set interval to 1000 …

Member Avatar for samsylvestertty
0
627
Member Avatar for JBD2

nick already answer your question. go to registry and delete the current file there. or you can use msconfig manager. go to start->run and type 'msconfig'. click on startup tab then enable the files on list.

Member Avatar for Mr.M
0
4K
Member Avatar for vonnoy

> how to search in datagrid where every keyword you type wil display the record > found in database? You want to search in datagrid or search record in database?

Member Avatar for deepakbshitole
0
5K
Member Avatar for gmissile1
Member Avatar for Yzk
Member Avatar for mc1202bc0077
Member Avatar for ponnu

Andre shown how to add header and display it in report style. Below is how to display data into listview using access and adodb. Modified as you need and show to us how it work.. Private Sub ShowData() Dim con As ADODB.Connection Set con = New ADODB.Connection Dim rsShow As …

Member Avatar for ImZick
0
169
Member Avatar for chern4ever
Member Avatar for dnk
Member Avatar for Basavaraj16291
0
392
Member Avatar for albert.staszak

Declare object instance of form2 and use it to disable or visble a button in form2. You already declare it but you didn't use it. Try this : Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Dim form2 As New Form2 form2.SaveVISACaseButton.Enabled = False form2.SaveVISACaseButton.Visible = False form2.Show() …

Member Avatar for Jx_Man
0
105
Member Avatar for yuvjeeth

well, it works fine to me. Provide more information, what exactly you want to do.

Member Avatar for Jx_Man
0
102
Member Avatar for meLiel

Try this : Private Sub cmdDelete_Click() Dim con As ADODB.Connection Set con = New ADODB.Connection Dim rsDelete As ADODB.Recordset Set rsDelete = New ADODB.Recordset Dim Query As String If MsgBox("Are you sure you want to delete?", vbYesNo, "Santo Niño Census Info System") = vbYes Then Query = "DELETE FROM Users …

Member Avatar for RonalBertogi
0
545
Member Avatar for honnysingh

Save background color changed into txt files or you can use registry instead of txt files. Load it when form load.

Member Avatar for Jx_Man
0
90
Member Avatar for LeNenne

There are several ways to get screen resolution : First way Put this in module Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long Public Const SM_CXSCREEN = 0 Public Const SM_CYSCREEN = 1 Put this in form Tmp As String Tmp = GetSystemMetrics(SM_CXSCREEN) & "x" & GetSystemMetrics(SM_CYSCREEN) Label1.Caption …

Member Avatar for LeNenne
0
195

The End.