2,383 Posted Topics
Re: I think Hericles was given the direction. You need to know how to make connection with databases (MSSQL,MySQL,Oracle,etc). Connectionstring.com provides you how to do it. | |
Re: For transparency form see [URL="http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/104127"]this thread[/URL] and [URL="http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/238928"]this thread too[/URL] | |
Re: As i remember there are code to make a GUI for matlab. | |
Re: You can check file name length.. [CODE]Dim streamer As IO.StreamReader Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click OpenFileDialog1.ShowDialog() If OpenFileDialog1.FileName.Length > 0 Then TextBox1.Text = OpenFileDialog1.FileName streamer = IO.File.OpenText(TextBox1.Text) Dim mystring() As String = streamer.ReadToEnd.Split(vbNewLine) ListBox1.Items.AddRange(mystring) End If End Sub[/CODE] | |
Re: [QUOTE]i want to remove single items from list and want to keep duplicate items in listbox[/QUOTE] You mean just remove selected item? | |
Re: Try this : [CODE]Private Sub cmdAddItem_Click() Static count As Integer Static name As String count = lstPoints.ListCount count = count + 1 name = "Point " & count lstPoints.AddItem name If count = 8 Then cmdAddItem.Enabled = False cmdRemoveItem.Enabled = True End If End Sub Private Sub cmdRemoveItem_Click() Size = … | |
Re: This code will display scroling text from left to right in Label. [B]First set timer Enable = True.[/B] try this following code : [code=vb.net] Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick label1.Text = Microsoft.VisualBasic.Right _ (label1.Text, 1) & Microsoft.VisualBasic.Left _ (label1.Text, Len(label1.Text) - 1) End … | |
Re: [B]1. Total[/B] You can get total from TotalCost variabel since you already count it [ICODE]TotalCost += OrderMenu(1).ItemCost[/ICODE] But you put the declaration in every buttons so you can't use it properly. You need to put TotalCost in Global Declaration and remove all TotalCost declaration in every buttons. [CODE]Private OrderMenu(6) As … | |
Re: Try this : [CODE]Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick Dim i As Integer = DataGridView1.CurrentRow.Index With DataGridView1 TextBox1.Text = DataGridView1.Item(0, i).Value TextBox2.Text = DataGridView1.Item(1, i).Value TextBox3.Text = DataGridView1.Item(2, i).Value End With End Sub [/CODE] | |
Re: You can use SQL aliases on your sql query. e.g : [CODE=MS SQL]select Name as '1', City as '2' from Address[/CODE] | |
Re: >> I need a text box for entering only for 0 to 9,.,Delete key ,Backspace key and Enter key [CODE]Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If Asc(e.KeyChar) < 48 Or Asc(e.KeyChar) > 57 Or Asc(e.KeyChar) = 13 Then e.Handled = True End If If … | |
Re: [CODE]Option Explicit Dim X As Integer, Y As Integer 'Declare variable X and Y as Integer Private Sub Form_Load() ' This following code to assing variable X and Y with Width and Height of Form X = Me.Width 'assign variable X with form Width Y = Me.Height 'assign variable Y … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/system.data.sql.sqldatasourceenumerator.getdatasources.aspx"]See This[/URL] | |
Re: [QUOTE]Can anyone help me by giving out a complete tutorial on the step by step way a connecting to a database using VB6? [/QUOTE] Post your code. How far you doing this? | |
Re: Try to Pass value before Close the form Search. | |
Re: You writing the code use C# or VB.Net? May you forgot to Change the equal sign (=) with slash (/) and Remove the "watch?" string. | |
Re: Remove selected items : [CODE]Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged For i As Integer = 0 To ListBox1.SelectedIndices.Count - 1 ListBox1.Items.RemoveAt(ListBox1.SelectedIndex) Next End Sub[/CODE] | |
Re: So, What the error of your program? I don't get what exactly you want to ask? | |
Re: Its not an error. When you edit data your program will edit all record with name 'jones'. Since you didn't have an key/Id to know which 'jones' to edit. I suggest you to add Id Column as Key. So you can identifier which record to edit even they have the … | |
Re: [URL="http://www.vb6.us/tutorials/create-your-own-vb6-resource-files-tutorial"]See this[/URL] | |
Re: [CODE] Label1Display.Text = Stacks(0).ToString Label2Display.Text = Stacks(1).ToString Label3Display.Text = Stacks(2).ToString Label4Display.Text = Stacks(3).ToString Label5Display.Text = Stacks(4).ToString [/CODE] | |
Re: Try This : [CODE]Private Sub Streching() Picture1.ScaleMode = 3 Picture1.AutoRedraw = True Picture1.PaintPicture Picture1.Picture, _ 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, _ 0, 0, _ Picture1.Picture.Width / 26.46, _ Picture1.Picture.Height / 26.46 Picture1.Picture = Picture1.Image End Sub Private Sub Form_Load() Streching End Sub [/CODE] | |
Re: Try this : [CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Info As New FileInfo("D:\000.jpg") MsgBox("Name : " & Info.Name & vbCrLf & _ "Length : " & Info.Length & " bytes" & vbCrLf & _ "Type : " & Info.Extension & vbCrLf & _ … | |
Re: Still use 'DATE', Date also save the time. [CODE]create table class (schedule_num integer primary key not null, semester varchar(10), course_name varchar(14), credit int, department varchar(15), meeting_time DATE, meeting_place varchar(20), enrollment_limit int);[/CODE] Example : [CODE]select to_char(meeting_time,'HH24:MI:SS') from class[/CODE] ![]() | |
Re: See this link : [URL="http://www.connectionstrings.com/sql-server-2008"]http://www.connectionstrings.com/sql-server-2008[/URL] | |
Re: Where is your stack declaration? [ICODE]Dim Stack(4) As String[/ICODE] -> Your Declaration is for array You need to declare stack before add it. [ICODE]Dim MyStack as New Stack(4)[/ICODE] -> This for Stack To Add stack [ICODE]MyStack.Push(userMsg[/ICODE]) [CODE] ' Declare as global variable Dim MaxSize As Integer = 4 Dim MyStack … | |
Re: [QUOTE=;][/QUOTE] Post your code. So we can fix it. | |
Re: this line not working : [icode]IO.File.Open(filePath, FileMode.Open)[/icode] Try to change with Process Function : [code=vb] If DialogResult.Yes Then Process.Start(filePath) ElseIf DialogResult.No Then MsgBox("you decided not to open") End If [/code] | |
Re: Post your code. how far you doing this. | |
Re: [QUOTE]i want to pass a text from a textbox in form1 to a label in form2[/QUOTE] This following code will transfer text in textbox in form1 to label in form2. [CODE]Private Sub Form_Load() Label1.Caption = Form1.Text1.Text End Sub[/CODE] [QUOTE]but the text in form1 is retrieved from a database.[/QUOTE] Different question. … | |
Re: [CODE]Query = "update Prod_DB_Completed_Board set [Stock Level] = '" & TextBox2.Text & "' where Laminate = '" & ComboBox2.Text & "'" & "AND" & "'" ComboBox3.Text & "'"[/CODE] Missing Other Column Name : [CODE]"AND OtherColumName = " & "'" ComboBox3.Text & "'"[/CODE] | |
Re: [URL="http://www.vbforfree.com/?p=402"]See this[/URL] | |
Re: Don't Use AND [CODE]Query = "INSERT INTO PROD_DB_Complete_Board (ID, [Board Size], Laminate, [Stock Level]) Values('" & TextBox4.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox1.Text & "')"[/CODE] | |
Re: Error occur in which line? | |
Re: [QUOTE=Joni123;1742358]Dear brothers, I also want to ask you guys about my problems. I have this VB6 application which uses Ms Access 2003 as a back-end. It was working well on WinXP platform. I want to install the application on a Win7 machine and i am having error on connection string. … | |
Re: Well, i don't really know what you mean about 'empty'. [URL="http://decipherinfosys.wordpress.com/2009/03/27/null-vs-empty-zero-length-string/"]Maybe this article can help[/URL] | |
Re: Seems He/she already solved it,a few minutes after this thread posted:) | |
Re: Why you not merge it as one sql query? [CODE]strsql = "select * from student_info where Surname, First_Name, Middle_Name not in " _ & "(select Surname, First_Name, Middle_Name from accounting_system)" MsgBox("student")[/CODE] | |
| |
Re: >> Is it possible to have the menu and header static and loads each form in one dynamic container. Yes. You can make parent-child form. Say Form1 as the container/parent and form2 as child. Set IsMdiContainer in Form1 Properties as True. In menu event : [CODE] Dim a As New … | |
Re: Or you can check the length of filename. [CODE]If OpenFileDialog1.FileName.Length > 0 Then Dim loader As New IO.StreamReader(OpenFileDialog1.FileName) TextBox1.Text = loader.ReadLine TextBox2.Text = loader.ReadLine ... loader.Close() End If[/CODE] | |
Re: Just do both of them at the same time. In any event of control you can add item to listbox or combobox and add it to database. Same action for edit, delete and transfer. E.g : [CODE]Private Sub Command1_Click() List1.AddItem Text1.Text 'your codes to add item to database End Sub[/CODE] | |
Re: See if this helps : [CODE]Dim StartPos, Counter As Integer Dim FindString, ReplaceText As String FindString = "test" ReplaceText = "MyString" For Counter = 1 To Len(Text1.Text) StartPos = InStr(Text1.Text, FindString) If StartPos > 0 Then Text1.SelStart = StartPos - 1 Text1.SelLength = Len(FindString) Text1.SelText = "" + ReplaceText End … | |
Re: You can use SysInfo Component to get information about battery status. Project->Component->Microsoft SysInfo Control Add it to Form and use this following codes : [CODE]Private Sub Form_Load() List1.AddItem "BatteryFullTime = " & _ Format$(SysInfo1.BatteryFullTime) List1.AddItem "BatteryLifeTime = " & _ Format$(SysInfo1.BatteryLifeTime) List1.AddItem "BatteryLifePercent = " & _ Format$(SysInfo1.BatteryLifePercent / 100, … | |
Re: [URL="http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/236985"]See this thread.[/URL] | |
Re: See this "tanggalpinjam.Text and tanggalbaliktxt.Text" I think this the problem. You want to insert a date of borrowed date n returning date but you insert it as text. Just convert it to date format. Make sure the type of both column is [B]date[/B] in your database not text or numeric. | |
Re: I suggest to trap it when user input the characters. So, users can only input the specific characters. Example : (This text box only accept numbers input only) [CODE]Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress If Asc(e.KeyChar) < 48 Or Asc(e.KeyChar) > 57 Then e.Handled … |
The End.