2,383 Posted Topics

Member Avatar for razamughal67
Member Avatar for LFCDay123

[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 …

Member Avatar for razamughal67
0
199
Member Avatar for razamughal67
Member Avatar for jbennet

> 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.

Member Avatar for Airshow
0
2K
Member Avatar for ZainabJuma
Member Avatar for luckynisarg
Member Avatar for Vega_Knight

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 …

Member Avatar for Jx_Man
0
391
Member Avatar for pennywise134

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 = …

Member Avatar for Jx_Man
0
115
Member Avatar for razamughal67

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 …

Member Avatar for razamughal67
0
2K
Member Avatar for razamughal67

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 …

Member Avatar for razamughal67
0
10K
Member Avatar for jhedonghae

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

Member Avatar for Sahil89
0
696
Member Avatar for kris222
Member Avatar for Naveed_786

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 …

Member Avatar for androidz
0
4K
Member Avatar for jhedonghae
Member Avatar for tashee2007

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

Member Avatar for Reverend Jim
0
928
Member Avatar for Sawamura

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 …

Member Avatar for Sawamura
0
326
Member Avatar for Sawamura

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 …

Member Avatar for Sawamura
0
2K
Member Avatar for Sturdy

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

Member Avatar for Sturdy
0
897
Member Avatar for tendaimare

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

Member Avatar for Jx_Man
0
275
Member Avatar for Gus_19

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

Member Avatar for Reverend Jim
0
102
Member Avatar for alapeh

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

Member Avatar for Jx_Man
0
154
Member Avatar for TriaL11

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 …

Member Avatar for poojavb
0
245
Member Avatar for Sturdy
Member Avatar for Jx_Man

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 …

Member Avatar for Dani
0
225
Member Avatar for kampao00

Use looping to read all data. While (acsdr.Read()) ComboBox2.Items.Add(acsdr("Sections")) End While

Member Avatar for kampao00
0
1K
Member Avatar for alapeh

> 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 …

Member Avatar for Jx_Man
0
4K
Member Avatar for belber
Member Avatar for mustaffa hasan
0
212
Member Avatar for gozo12

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 …

Member Avatar for Jx_Man
0
141
Member Avatar for collin_ola

[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)

Member Avatar for Jx_Man
0
117
Member Avatar for belber

Yes, You need to download the ODBC connector. Here is the link : http://dev.mysql.com/downloads/connector/odbc/5.1.html#win32

Member Avatar for belber
0
120
Member Avatar for huskarit

[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 …

Member Avatar for Jx_Man
0
184
Member Avatar for sathya_s
Member Avatar for Jx_Man
0
78
Member Avatar for huskarit

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]

Member Avatar for huskarit
0
243
Member Avatar for dilse4sk

[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]

Member Avatar for Mitja Bonca
0
171
Member Avatar for alapeh

What you mean two form load work together? these two from load are coming from same Form or different Form?

Member Avatar for Jx_Man
0
767
Member Avatar for C0ding

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 …

Member Avatar for C0ding
0
999
Member Avatar for sukhy_1
Member Avatar for huskarit

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]

Member Avatar for huskarit
0
114
Member Avatar for P.manidas
Member Avatar for dwiniers
Member Avatar for LFCDay123

[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 …

Member Avatar for Jx_Man
0
164
Member Avatar for 432
Member Avatar for dwiniers

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]

Member Avatar for Jx_Man
0
480
Member Avatar for CriticalError

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]

Member Avatar for Jx_Man
0
848
Member Avatar for choosechrist
Member Avatar for dwiniers
Member Avatar for reds8

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]

Member Avatar for Gé48
0
153
Member Avatar for shilpanayar

[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]

Member Avatar for Jx_Man
0
126
Member Avatar for Expotential
Member Avatar for Farhan_B

[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]

Member Avatar for cyberdaemon
0
363

The End.