2,383 Posted Topics
Re: 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 = … | |
Re: 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 … | |
Re: > 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 … | |
Re: Developer Tab -> Insert -> More Controls -> Microsoft Date and Time Picker (SP4) -> Then drawing it | |
Re: Update CurrentStock after Save data. Do save and update at the same time. You can post your code here to give more information. | |
Re: try : TempDate = dr.Item("Appointmentdate").ToString TxtAppointmentdate.Text = TempDate.ToString("yyyy-MM-dd") | |
Re: > 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 … | |
Re: > 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/ | |
Re: > '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 … | |
Re: http://support.microsoft.com/kb/321185 | |
Re: 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 + "' )" | |
Re: 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 = … | |
Re: 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 | |
Re: > 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. '.... ' … | |
Re: > 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 … | |
Re: 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 … | |
Re: 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 ' … | |
Re: 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 | |
Re: this is connected to database? | |
Re: dickersonka is right... Separated them into each procedure. | |
Re: 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 … | |
Re: Try : For Each Control In Me.Controls If TypeOf Control Is TextBox Then Control.Text = "" End If Next Control | |
Re: 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? | |
Re: 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] | |
| |
Re: 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 … | |
Re: 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. | |
Re: DHARAMVEER,, post your own thread..dont raise old thread.. | |
Re: [See this site](http://www.a1vbcode.com/app-2339.asp) | |
Re: 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 … | |
Re: 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) … | |
Re: 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. | |
Re: in properties of textbox1 -> tabindex = 0 when it run the cursor will get focus in textbox1. ![]() | |
Re: what kind of database you want to use? And how far you doing this? | |
Re: > 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". | |
Re: > 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 … | |
Re: 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. | |
Re: > 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? | |
Re: okay.. How far you doing this? show some effort here.. | |
Re: Post your code. we will help you :) | |
Re: 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 … | |
Re: @Djamel2010 : make your own thread dude..don't raise dead thread | |
Re: How far you doing this? Post the code that you've been work. | |
Re: 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() … | |
Re: well, it works fine to me. Provide more information, what exactly you want to do. | |
Re: 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 … | |
Re: Save background color changed into txt files or you can use registry instead of txt files. Load it when form load. | |
Re: 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 … |
The End.