- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 145
- Posts with Upvotes
- 120
- 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
138 Posted Topics
**Features:** * Retrieves the differentiating bit of a key with respect to the previous one and stores only this position in the index. * With at most one single disk read, assuming the index is in memory, it determines whether the key exists or not. * The index is always … | |
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) | |
Re: Just split the fields inside each row: Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Try For Each row As String In File.ReadAllLines("Table.csv") ' split the fields from the row ' Dim vFields() As String = Split(row, ";") If vFields(0).Contains(TextBox1.Text) Then ' vFields(0) = specificaion ' lblValue1.Text = … | |
Re: To get error line number I would enclose inside a try-catch. | |
Re: Coding like the following you get the attached image: Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load ListView1.View = View.Details For i As Int32 = 0 To 3 Dim ch As ColumnHeader = ListView1.Columns.Add("Column " + (i + 1).ToString) ch.Width = 100 Next With ListView1 … | |
Re: I haven't tried your code, but instead of using `wsSource.Cells(Rows.Count, 1).End(xlUp).Row`, you could use `.UsedRange`. UsedRange knows really where the data ends. | |
Re: Why not launch a modal pop-up from client side or server side using Ajax Toolkit? See [Here](https://docs.microsoft.com/en-us/aspnet/web-forms/overview/ajax-control-toolkit/modalpopup/launching-a-modal-popup-window-from-server-code-cs) | |
Re: Looks like there is a comparison between a numeric value (PROPID) and a string ('%" & Textbox2.Text & "%' ). The solution is to convert both to same type by means of CAST or CONVERT: Syntax for CAST: CAST ( expression AS data_type [ (length ) ]) or Syntax for … | |
![]() | Re: Assuming you correct the XML file and you know the name of the fields, you could do something like the following: Imports System.IO Public Class XMLreader Private Sub Populate_Click(sender As Object, e As EventArgs) Handles Populate.Click extractFields() End Sub Sub extractFields() Try Dim svFields() As String = {"code", "codeSystemName"} Dim … |
![]() | Re: Try a static variable so DocumentCompleted fires just once (I had the same problem): Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) 'Initialize the google map with the initial settings.' 'The Initialize script function takes four parameters' 'zoom, lat, lng, maptype. Call the script passing the' 'parameters in.' … |
Re: First you should copy the images to an ImageList [Click Here](https://msdn.microsoft.com/es-es/library/system.windows.forms.imagelist(v=vs.110).aspx)instance and assign to the `TreeView.ImageList` property. | |
Re: Take a look [here](https://docs.microsoft.com/es-es/dotnet/standard/base-types/custom-date-and-time-format-strings) Dim dt As DateTime = Now Dim sDate As String = dt.ToString("yyyy-MM-dd") | |
Re: Assuming 'lr' is the last populated row it could be `lr = .UsedRange.rows.count` instead of .cells.find(... In any case you could change line #21 to: `dic(mid(ws.Name,3) & arr(i,1)) ' prepend the year '` or `dic(arr(i,1) & mid(ws.Name,3)) ' postfix the year '` depending on the sort preference in this manner … | |
Re: I've only take a look to addition and substraction and made some modifications. I hope you understand it and leave up to you the other operators. import java.util.ArrayList; import java.util.Scanner; import static java.lang.Integer.*; import static java.lang.System.*; public class ExpressionSolver { int answer; String expString; ArrayList<String> exp; public ExpressionSolver(String s) { … | |
Re: Try `collections\/col(\d{2,}|[^23])(?!\/products)`, because (\d{2,}|[^23]) will allow 2 or more numbers (as in col22, col21) or 1 number other than 2 or 3 (col1, col4, col5 but not col2 nor col3). | |
Re: Type in Google: w3schools customers.php The first link appeared to have: { "records":[ {"Name":"Alfreds Futterkiste","City":"Berlin","Country":"Germany"}, {"Name":"Ana Trujillo Emparedados y helados","City":"México D.F.","Country":"Mexico"}, {"Name":"Antonio Moreno Taquería","City":"México D.F.","Country":"Mexico"}, {"Name":"Around the Horn","City":"London","Country":"UK"}, {"Name":"B's Beverages","City":"London","Country":"UK"}, {"Name":"Berglunds snabbköp","City":"Luleå","Country":"Sweden"}, {"Name":"Blauer See Delikatessen","City":"Mannheim","Country":"Germany"}, {"Name":"Blondel père et fils","City":"Strasbourg","Country":"France"}, {"Name":"Bólido Comidas preparadas","City":"Madrid","Country":"Spain"}, {"Name":"Bon app'","City":"Marseille","Country":"France"}, {"Name":"Bottom-Dollar Marketse","City":"Tsawassen","Country":"Canada"}, {"Name":"Cactus Comidas para llevar","City":"Buenos … | |
Re: I'm not sure if each time can be a withdraw of 1 unit, but in that case, calling anotherTransct() from menu(), then menu() from anotherTransact() and repeating this same process enough times, there could be a stack overflow. | |
Re: Remove the extra `Entropy` from line #48 to: `cout << "The Entropy is: \t" << e << " Kj/(Kg.K)" << endl;` | |
Here I present a WebSite containing just Default.aspx. Current snippet code has to do with coloring text in an input field of a web page. The input field is an editable DIV HTML element. While the user writes, there is a partial post (an XMLHttpRequest) to the server. Then the … | |
Re: Try the following If retVal IsNot DBNull.Value Then retVal += 1 Else retVal = 4999 End If | |
Re: Try changing line #11 to: $query = "SELECT username FROM user_details WHERE username='"+$username+"'"; |
The End.