[Solved] How to get the currently running application using vb6

You can get the window title for current application. Based on window title and window handle, you can get sufficient details. Code is in vb.net <DllImport(“user32.dll”)> _ Private Shared Function GetForegroundWindow() As IntPtr End Function <DllImport(“user32.dll”)> _ Private Shared Function GetWindowText(hWnd As IntPtr, text As StringBuilder, count As Integer) As Integer End Function Private Function … Read more

[Solved] Date not saving in right format vb6.0, SQL server 2005

You need to put apostrophes around your dates, like this: strsql = “INSERT INTO Rental_Copies(Rental_id,Copies_id,Rent_Date,Due_Date)” & _ “Values(” & txtID.Text & “,” & ListView1.ListItems(X + 1) & “,'” & _ txtRent_Date.Text & “‘,'” & txtDue_Date.Text & “‘)” Like others have said, you should be validating your data before using it and parameterizing your SQL to … Read more