2,383 Posted Topics
Re: How far you doing this? post your code. show some effort first. | |
Re: [QUOTE]I have a project of 2 forms and on the 2nd form I want to create a button which when clicked, returns you to the 1st form and all values in the 3 textboxes disappear. Please help! [/QUOTE] I don't get what you want exaclty. You want get back from … | |
Re: [Check this Site](http://www.a1vbcode.com/app-2320.asp) | |
Re: > Just FYI, the link: http://www.daniweb.com/stats/toplist is broken for me. I've got some error too. It makes me automatically log out after click that link. | |
Re: i don't get what you want exactly | |
Re: Try this : ~~~vb Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" Alias "SHEmptyRecycleBinA" (ByVal hwnd As Long,ByVal pszRootPath As String,ByVal dwFlags As Long) As Long Private Const SHERB_NORMAL = &H10 Private Const SHERB_NOCONFIRMATION = &H1 Private Const SHERB_NOPROGRESSUI = &H2 Private Const SHERB_NOSOUND = &H4 Private Const SHERB_NOALL = _ (SHERB_NOCONFIRMATION … | |
Re: Try this : ~~~vb FolderName =Inputbox("Enter Folder Name","Folder Name") FileName =Inputbox("Enter File Name","File Name") Const bytesToMb = 1048576 Set objFSO = CreateObject("Scripting.FileSystemObject") ShowSubFolders objFSO.GetFolder(FolderName) Sub ShowSubFolders(Folder) temp = 0 For Each file In Folder.Files Set objCurFile = objFSO.GetFile(file) If UCase(objCurFile.Name) = UCase(FileName) Then temp = temp + 1 strFile = … | |
Re: Add Reference : Microsoft Script Runtime Add 1 label. ~~~ vb Private Sub SysInfo1_DeviceArrival(ByVal DeviceType As Long, ByVal DeviceID As Long, ByVal DeviceName As String, ByVal DeviceData As Long) Call Check End Sub Private Sub SysInfo1_DeviceRemoveComplete(ByVal DeviceType As Long, ByVal DeviceID As Long, ByVal DeviceName As String, ByVal DeviceData As … | |
Re: See if this help : ~~~ vb Function pathOfFile(fileName As String) As String Dim posn As Integer posn = InStrRev(fileName, "\") If posn > 0 Then pathOfFile = Left$(fileName, posn) Else pathOfFile = "" End If End Function ~~~ Call it using Shell() Function : Private Sub Command1_Click() Dim myPath … | |
Re: Try : Dim diffrence As TimeSpan diffrence = DateTime.Parse(ComboStartTime.SelectedItem.ToString) - DateTime.Parse(ComboEndTime.SelectedItem.ToString) Select Case diffrence.TotalMinutes.ToString Case 30, 45, 50, 60 MsgBox("true") Case Else MsgBox("false") End Select | |
Re: change what? Provide more information. explain more. | |
Re: I'm really in good mood right now. i write a simple code about how to add data to flexgrid and save it, also load it to flexgrid. For edit and delete? do it by yourself. since 265 posts you should know about daniweb rules :) Add references : Microsoft ActiveX … | |
Re: Using what db? post your connection code. | |
Re: Try this : Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect Dim temp() As String = Split(TreeView1.SelectedNode.Text, "-") TextBox1.Text = Trim(temp(0).ToString) TextBox2.Text = Trim(temp(1).ToString) End Sub | |
Re: Try this : Public Function ChangeFileExt(ByVal FileName As String, ByVal Extention As String) Dim str() As String, NewFile As String If InStr(1, FileName, ".") Then str = Split(FileName, ".") NewFile = Replace(FileName, str(UBound(str)), Extention) Name FileName As NewFile Else Name FileName As FileName & "." & Extention End If End … | |
Re: See if this help : Private Sub ListFiles(strPath As String, Optional Extention As String) 'Leave Extention blank for all files' Dim File As String If Right$(strPath, 1) <> "\" Then strPath = strPath & "\" If Trim$(Extention) = "" Then Extention = "*.*" ElseIf Left$(Extention, 2) <> "*." Then Extention … | |
Re: Try this : Private Sub ClearCombo(ByVal MyCombo As ComboBox) MyCombo.Clear End Sub Private Sub ClearCombo_Click() Dim Temp As Control For Each Temp In Me.Controls If TypeOf Temp Is ComboBox Then Temp.Text = "" ClearCombo Temp End If Next End Sub | |
Re: Try : 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 txttID.Text = DataGridView1.Item(0, i).Value txttSurname.Text = DataGridView1.Item(1, i).Value End Sub | |
Re: Try this : Private Sub ClearCombo(ByVal MyCombo As ComboBox) MyCombo.Items.Clear() End Sub For Each ccontrol In Me.Controls If TypeOf ccontrol Is ComboBox Then ccontrol.Text = "" ClearCombo(ccontrol) End If Next ccontrol | |
Re: I don't understang what are your trying to do. But seems you want to make a line chart. Why you don't use Microsoft Chart Control? Go to Project->Component->Mircrosoft Chart Control 6.0 | |
Re: See if this helps : Private Sub FindMySpecificString(ByVal searchString As String) ' Ensure we have a proper string to search for.' If searchString <> String.Empty Then ' Find the item in the list and store the index to the item.' Dim index As Integer = listBox1.FindStringExact(searchString) ' Determine if a … | |
Re: Can you show your sql query to retrieve customers from database? | |
In vb we put comments in codes using single quote in front of comment without close it at the end of comments. Ex : 'This Will be a comments But something wrong if i don't close it with single quote too. All codes after comments will become like comments until … | |
Re: Use looping to read all data. While (acsdr.Read()) ComboBox2.Items.Add(acsdr("Sections")) End While | |
Re: > below is my vb6.0 code. the click command is to save my text and picture. there is no problem for my text. but, i have a problem after saving the picture. the picture can be saved but it is not availabe for preview. is there any fix for this … | |
Re: I don't get what you want to exactly. Please more specify. | |
Re: You mark this thread as solved but you ask a help?? > but it always make timer1.enalbe true Your first code is working. you just need select the item on listbox to get timer enable as False. > i tried this but its always gives false reslut please help me … | |
Re: [See this link](http://vb.net-informations.com/communications/vb.net_smtp_mail.htm) and [this link too](http://www.freevbcode.com/ShowCode.asp?ID=5486) | |
Re: Yes, You need to download the ODBC connector. Here is the link : http://dev.mysql.com/downloads/connector/odbc/5.1.html#win32 | |
Re: [QUOTE=huskarit;1783425]it does not work! but thank you! i found a way![/QUOTE] Hi huskarit, Thats great that you found the way to solve your problem. So, Would you like to share the way you solve it? It will help another member who has same problem like you. Especially when they read … | |
Re: what kind of error? post a complete code and which line of error came up. | |
Re: like this ? [CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Enabled = False ComboBox1.Enabled = False End Sub[/CODE] | |
Re: [CODE] Dim conn As New SqlConnection("ConnectionStringGoesHere") Dim cmd As New SqlCommand conn.Open() cmd.Connection = conn cmd.CommandText = "Delete From bookings where Bk_id = " & CInt(datagridView1.Item(0,datagridView1.CurrentRow.Index).Value.ToString) cmd.ExecuteNonQuery() conn.Close()[/CODE] | |
Re: What you mean two form load work together? these two from load are coming from same Form or different Form? | |
Re: See if this help. This following code will merge multiple text files into one file : Add reference : Microsoft Scripting Runtime [CODE]Private Sub ConcatenateFiles(ByVal ResultFile As String, ByVal Separator As String, ParamArray SourceFiles() As Variant) Dim FSO As New FileSystemObject Dim fsSourceStream As TextStream Dim fsResStream As TextStream Dim … | |
Re: show us the effort :) | |
Re: You can set radio button checked as True in Radio button properties. Or you can set it manually : [CODE] RadioButton1.Checked = True 'RadioButton1 set as default Combobox1.SelectedIndex = 0 'First item of combobox set as default[/CODE] | |
Re: Try This [CODE]Me.Dispose(False)[/CODE] | |
Re: It maybe causing by Null return value. | |
Re: [QUOTE]However, I want the values to store into the application and for them to be present when I re-open the application. [/QUOTE] What you mean about store into application? You can save it to text file and load it when application running. by the way, what is the function of … | |
Re: Add to listbox and sort it. [ICODE]Listbox1.Sorted = true[/ICODE] | |
Re: Most of that problem occured is when you try to retieved a data from the database. Check if the field has the null data or not. [CODE] if not isnull(.Fields!Category) then '[your code] else '[your code] end if[/CODE] | |
![]() | Re: Try this : [CODE]Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged RichTextBox1.SelectionFont = New Font("Tahoma", CInt(ComboBox1.SelectedItem.ToString), RichTextBox1.SelectionFont.Style) End Sub[/CODE] |
Re: Easiest way is using timer control. | |
Re: It cause your "rsLibrary" is not defined. | |
Re: use timer control. Set Enable as True in timer properties [CODE]Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label1.Text = Now End Sub[/CODE] | |
Re: [QUOTE]how to transfer all items of a list box to another list box in vb?[/QUOTE] In .Net you can use AddRange function of listbox. [CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ListBox2.Items.AddRange(ListBox1.Items) End Sub[/CODE] | |
Re: try to using ascii then trap when key press. | |
Re: [QUOTE]How can i improve this code thanks in advance [/QUOTE] Your sql statement is not right [CODE=MSSQL]UPDATE table_name SET column1=value, column2=value2,... WHERE some_column=some_value[/CODE] |
The End.