- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 144
- Posts with Upvotes
- 119
- Upvoting Members
- 33
- Downvotes Received
- 5
- Posts with Downvotes
- 4
- Downvoting Members
- 5
Last of 4 brothers. Never married, no sons. Currently retired.
- Interests
- many different and none at the same time
Re: Try this: Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Try Dim sSearch As String = LCase(TextBox1.Text) If sSearch = "" Then Exit Try Dim line As Int32 = 0 TextBox2.Text = "" For Each row As String In File.ReadAllLines("Test.csv") ' split the fields from the row ' … | |
Re: There is an example [Here](http://vb.net-informations.com/crystal-report/vb.net_crystal_report_subreport.htm) | |
| Re: One way to share data between, for example, two forms can be writing and reading a file in disk. [Here](https://www.tutorialspoint.com/vb.net/pdf/vb.net_text_files.pdf) is a tutorial if needed. |
Re: Perhaps this link may help you. [Click Here](https://stackoverflow.com/questions/62150375/how-to-select-correct-sound-output-device-in-the-naudio-after-added-removed-a-s) | |
| Re: Be aware that all string or numeric comparisons must be between the same type: 1. Number compared to Number or 2. String compared to String. Never Number compared to String, or String compared to Number. Line# 9: If ComboBox3.Text.ToString >= 1 <= 10 Then compares ComboBox3.Text.ToString, i.e. a String, with … |
| Re: Why not just supress the traling `.toString` and set value as an `Integer`? Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Dim value As Integer = CInt(Label10.Text) If value >= 1 And value <= 30 Then value -= 1 Else If value <= 0 Then Form11.Button5.PerformClick() Timer1.Stop() End … |
| Re: You may add a `timer` and in `Timer.tick`event call to `Button5_Click(sender, e)`. BTW, number 365 in line#7 is numeric and `dysdiff`is a string, so it's not possible the substraction to work. |
| Re: Are you asking for this?: For Each prop As System.Configuration.SettingsProperty In My.Settings.Properties prop.DefaultValue = "" Next |
Re: Try renaming `size`, for example `sz`. | |
Re: Line# 41 should be `tennis`, isn' it? Also, `n1, n2, n3` and `total` aren't intialized to zero. | |
| Re: You may do: Public Sub Btn_Click(sender As System.Object, ByVal e As System.EventArgs) Try Dim btn As Button Dim cbx As ComboBox Dim txt As TextBox Select Case sender.GetType Case GetType(Button) btn = CType(sender, Button) ' TODO ... ' Case GetType(ComboBox) cbx = CType(sender, ComboBox) ' TODO ... ' Case GetType(TextBox) … |
| Re: Employ `CheckChanged` event: Private Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox3.CheckedChanged If CheckBox3.Checked = True Then TextBox7.Text += fntext & vbCrLf End If End Sub Private Sub CheckBox4_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox4.CheckedChanged If CheckBox4.Checked = True Then TextBox7.Text += artext & vbCrLf End If End … |
| Re: I would do the following: Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged Dim items = (From it In ListBox1.Items Select it Where it.ToString().IndexOf(TextBox3.Text, StringComparison.CurrentCultureIgnoreCase) >= 0).ToArray ListBox1.BeginUpdate() ListBox1.Items.Clear() For Each item As Object In items ListBox1.Items.Add(item) Next If String.IsNullOrEmpty(TextBox3.Text) Then ListBox1.Items.AddRange(My.Settings.userlist.ToString) End If ListBox1.EndUpdate() End Sub |
Re: Probably the code is missing the following `Imports`: Imports Microsoft.VisualBasic.DateAndTime | |
Re: Here is the series solution and an alternative solution. In you can opt for any of both, solution #2 is more accurate, more concise and faster. I hope you can understand and tranlate the VB.Net code: Dim sum As Double = 0 Dim fact As BigInteger = 1 Dim esx … | |
Re: @rajeshmca03 Do you mean a Global Unique Identifier? If so, you may get a new Guid and just append a counter, for example like this: Module Module1 Sub Main() Try Dim sGuid As String = String.Empty Dim nOption As Int32 = 0 Dim sequenceCount As Int32 = 0 Dim curGlobalIdent … | |
Re: Hello. The most easiest way I see to do what you ask is the following: Dim Search1, Search2, Search3, Search4, Search5, Search6, Search7 As String Dim s As String = tbxCustomerName.Text Dim words As String() = Split(s, " ") For i as Int32 = 0 To words.Length - 1 Select … | |
Re: I found the following in your code: 1) There is missing a `Exit Sub` right after `Messagebox` in between lines 30 and 31. 2) Line 46 where variable `i` is incremented, should go before `Loop` in line 45. 3) In line 36 you are comparing `strProductos(i)` (which is a `String`) … | |
Re: "Windows PowerShell is a programming language from Microsoft that is primarily designed for system administration. Since PowerShell is built on top of the .NET framework, .NET’s excellent regular expression support is also available to PowerShell programmers." Now, try using .NET's sequence (?!subexpr) and (?<!subexpr). (?!subexpr) for ex. \w+\b(?![,:;]) will find … | |
Re: [Click Here](http://www.vbforums.com/showthread.php?402956-RESOLVED-Enumerate-USB-Devices) You should add a reference to System.Management dll Function DetectDevice(DeviceName As String) As Boolean Try ' See if the desired device shows up in the device manager.' Dim info As Management.ManagementObject Dim search As System.Management.ManagementObjectSearcher Dim Name As String search = New System.Management.ManagementObjectSearcher("SELECT * From Win32_PnPEntity") For Each … | |
Re: I imagine you are aware of SQL injection. If not you may read [here](https://docs.microsoft.com/en-us/sql/relational-databases/security/sql-injection?view=sql-server-2017) about it. | |
Re: One question: where do you define `itemcoll`? | |
Re: Take a look [Here](https://www.windows-commandline.com/disable-wifi-connection/) | |
Re: Be sure to have all the tags 'closed' (e.g. `<asp:Panel ... />` or `<asp:Panel .... > ....</asp:Panel>`) and all enclosed inside `<form>...</form>`. For example: <body> <form id="form1" runat="server"> <div> <asp:Label ID = "LblDate" runat="server" CssClass="dateStyle" Text="Label"></asp:Label> <asp:Panel ID="pnlFormFields" runat="server" /> <asp:Panel ID="pnlThankYouMessage" runat="server" CssClass="panel" Visible="False"> Thank you. Your message has … | |
Re: Consider reading all the lines at the beginning and, then, prepending the line number, like in: Try Dim vLines() As String = IO.File.ReadAllLines("Append.txt") Using sw As New StreamWriter("Append.txt") For i As Int32 = 0 To vLines.Length - 1 sw.Write(String.Format("Line #{0:0000} ", i) + vLines(i) + vbCrLf) Next End Using Catch … | |
Re: Of course I suppose the student data has been entered correctly, but I can't see the need for entering a third field: status. If you want to assure the password you may constrain passwords to those containing both capital and lower letters and special characters like !,$,%, and so on. … | |
Re: You must add a condition because the columns are being added twice: in design-time and in run time. (DesignMode property from Windows Forms components not 100% reliable, so use this other): Public Sub New() Width = 500 Height = 200 If System.ComponentModel.LicenseManager.UsageMode = System.ComponentModel.LicenseUsageMode.Designtime Then Dim Col1 = New DataGridViewTextBoxColumn … | |
Re: You may want to add a user control, with 4 or 6 textboxes depending on IPv4 or IPv6. For example: Public Class IP_Textbox Const nBytes As Int32 = 4 ' IPv4 (change to =6 if IPv6) Dim vTextbox(nBytes - 1) As TextBox Dim vLabel(nBytes - 2) As Label Private Sub … | |
Re: The EXE, running by itself as you say, is working with no problem for me. Private Sub cmdCreate_File_Click(sender As Object, e As EventArgs) Handles cmdCreate_File.Click Dim InFolder As String = txtFolderToBrowse.Text Dim sInFile As String Dim sTitle As String Dim sArtist As String Dim MyData As MediaID3Structure Dim sOutput As … | |
Re: Did you know about code injection in SQL? Tables can be easily removed . For an explanation [Click Here](https://docs.microsoft.com/en-us/sql/relational-databases/security/sql-injection?view=sql-server-2017) |