138 Posted Topics
| |
Re: I am almost new to lambda expressions, but thanks to you, I could write the same code in VB.Net: Module Module1 Dim rules As New List(Of Func(Of Int32, String)) From { Function(x) IIf(x Mod 15 = 0, "BAZ", ""), Function(x) IIf(x Mod 5 = 0, "BAR", ""), Function(x) IIf(x Mod … | |
Re: If you want to be sure 100 percent, why not set a flag pending confirmation while sending an email to the user to confirm the address? | |
Re: Do you mean how to input scanned bar codes? If yes, see for example: [here](https://www.codeproject.com/Articles/296533/Using-a-bar-code-scanner-in-NET) | |
Re: Your language uses "," as decimal separator and "." as thousand separator and that is why instead of retrieving 1/4 (=0.25), `CDbl` is getting 25. Use `double.parse` instead, setting the NumberFormat you need: Dim ni As Globalization.NumberFormatInfo = Globalization.CultureInfo.CurrentCulture.NumberFormat.Clone ni.NumberDecimalSeparator = "." tara = Double.Parse(lblindicador2.Text, ni) PB = Double.Parse(lblindicador.Text, ni) | |
Re: In this other way the code seems to work: x = [16.7, 16.5, 16.1, 15, 13.5,14.2, 14.9, 13.7] # an example D = [0, 1, 4, 7, 16, 31, 64, 127] # example n_H = 0.9 Sec_nucli = 0 ## I defined the function like this: def Fragmentation(D,x): s_nucli = … | |
Re: Dim vplaats() As String = Split(Replace(TextBox1.Text, "'", "''"), " ") vplaats(0) = StrConv(vplaats(0), VbStrConv.ProperCase) vplaats(vplaats.Length - 1) = StrConv(vplaats(vplaats.Length - 1), VbStrConv.ProperCase) Dim platts As String = Join(vplaats, " ") | |
Re: The message is telling that field pr.invno on line 1 should also figure in the Group By clause, or in a function like sum(pr.invno) or count(pr.invno) . | |
Re: Where is `rap[ ]` assigned a value? You should look there because the value of `ra1`comes from `rap[ ]`, so if the values in `ra1`differ it's that `rap[ ]`values are already coming different from some other code, not the one you show. | |
Re: I agree in that the only way I can see is to submit the form back to the server. Something like: <!DOCTYPE html> <html> <body> <script> function chkLen() { if(document.getElementById("dCell").value.length =10) document.getElementById("myForm").submit(); } </script> <form name="myForm" onsubmit="myPhp.php"> <input id="dCell" type="text" onChange="chkLen();" value="<?php echo $_SESSION['mySessionIDHere'];?>" /> </form> </body> </html> | |
Re: You may try [Here](http://forums.codeguru.com/showthread.php?305265-Getting-the-Line-Number-on-a-VB-error) and [Click Here](https://msdn.microsoft.com/es-es/library/aa264519(v=vs.60).aspx) | |
Re: Besides the need of brackets for sql in reserved names as in [key] or [name], to communicate between form1 and form2 there may be a raising event. Imports System.Data.OleDb Public Class Form1 Public dbconn As New OleDbConnection Dim adt As New OleDbDataAdapter Dim ds As New DataSet Dim datatable As … | |
Re: @Josh_4 Please, take a look to the answer at your first thread [Here](https://www.daniweb.com/programming/threads/508636/set-icon-for-nodes-in-xmltreeview-via-xml-file-vb-net/2) | |
The present code snippet just does an especific task. This is, given an ordered sequence of natural numbers, starting at zero, generate all the different permutations there can be. When we talk about permutations, the order of the sequence does matter. So, the sequence 0, 1, 2 differs from 2, … | |
Re:   The function you're asking for may well be Regex's class: Imports System.Text.RegularExpressions Public Class SearchCharOrString Private Sub btnGo_Click(sender As Object, e As EventArgs) Handles btnGo.Click Try Dim cnt As Int32 = countCharOrString( tbSearch.Text, tbIn.Text, chkSens.Checked) lblCount.Text = "Count: " + cnt.ToString Catch ex As Exception End Try End … | |
Re: Do you mean somewhat like this?: Imports System.Linq Public Class Properties Private Sub Properties_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try Dim A1() As A = {New A(1, "name1", "address1"), New A(2, "name2", "address2"), New A(3, "name3", "address3")} Dim q = (From p In A1 Select p.ID, p.Address).ToDictionary(Function(x) x.ID, … | |
Re: Perhaps you'd like to emply 'mates8.dll' (in the attached file there is an example). There needs to be a reference to the dll and the imports statement. Then, you may parse simple expressions calling the Expression.parseExpression method.  Imports m8 = mates8 Public Class Form1 Private Sub Button1_Click(sender As … | |
Re: Change lines #21 and 22 into the following to see how many registers are really updated: dim n as int32 = cmd.ExecuteNonQuery() 'n=The number of rows affected' MsgBox("Updated "+n.tostring+" rows") Change lines #30 and 31 into the following and see how many registers are really saved: dim n as int32= … | |
Re: Just a file system filter driver [Here](https://docs.microsoft.com/en-us/windows-hardware/drivers/ifs/file-system-filter-drivers) would do the job. | |
Re: Searching seems as there is an issue in CrystalReports. Can't you divide, as a workaround, the report in two or three so each one has less than 2^15=32768 pages? | |
Re: I can't see anything wrong with the code you are sharing. So, what's the problem? Can you explain a bit further? | |
Re: You may send the image as plain text [Click Here](https://social.msdn.microsoft.com/Forums/vstudio/en-US/b0da124b-976b-4502-b38d-e33ad845be6b/how-to-save-images-to-text-file-as-charactersbinary-or-whatever-and-retrieve-them-back-to-picture?forum=vbgeneral) | |
Re: Are you talking about a ListView, a container of images? Or perhaps are you refering to a listbox filled with items? | |
Re: dim dgv as datagridview = DirectCast(sender,DatagridView) if dgv.name = "..." then | |
Re: If product names are really the same in both datagridview, i.e., no need to add rows: Dim us As New Globalization.CultureInfo("en-US") Function parseN(value As String, ByRef result As Double) As Boolean Return Double.TryParse(value, Globalization.NumberStyles.Any, us, result) End Function Private Sub btnCopyLeftToRight_Click(sender As System.Object, e As System.EventArgs) Handles btnCopyLeftToRight.Click CopyDGV(DataGridViewLeft, DataGridViewRight) … | |
Re: I guess the table names are being repeated, to avoid this problem you may set the 200 numbers, firstly ordered in `vinte`and then reorder randomly: Dim n As Int32 = 200 Dim vinte(n - 1) As Int32 For i As Int32 = 0 To n - 1 vinte(i) = i … | |
Re: Set the code in this other way and see if it still throws an exception: For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls If ctrl.GetType Is GetType(Windows.Forms.Panel) Then Select Case ctrl.GetType Case GetType(TextBox) ' do whatever ' Case GetType(ComboBox) Case GetType(RadioButton) Dim r As RadioButton = CType(ctrl, RadioButton) If r.Name = … | |
Re: I'm not very sure of what you're trying, but perhaps: SELECT Format([expr1],"# %") AS expr2, count(totvisit)/count(totrem) AS expr1 FROM ( SELECT DISTINCT remid FROM remtable WHERE remtable.pacid = 94) AS totrem, ( SELECT DISTINCT visitaid FROM jurnal AS b WHERE jurnal.pacient_id = 94) AS totvisit | |
Re: Here the image rotates while dragging around the center clockwise or not, although when the mouse moves horizontally the spinning slows. A workaround could be to spin just in one direction and take into account that when dragging and y=0 the image continues spinning.  Imports System.Drawing Imports System.Reflection … | |
Re: I think string should be converted in numeric, say `Format(CStr(Mid(dr, 2, 6)) + 1, "E00000#")` or `Format(CInt(Mid(dr, 2, 6)) + 1, "E00000#")` | |
Re: I would set datagrid's property `AllowUserToAddRow` to False and then manage to add a row by code. For example: Private Sub btnNext_Click(sender As System.Object, e As System.EventArgs) Handles btnNext.Click Try Dim caseNum As Int32 = 0 If Int32.TryParse(tbCase.Text, caseNum) Then With DataGridView1 Dim index As Int32 = .Rows.Count .Rows.Add() .Rows(index).Cells(0).Value … | |
Re:  I've tried your code and the only way I could change the window's background was setting `x:Key`. MainWindow.xaml: <Window x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Style="{StaticResource MyWindowStyle}" > <Grid HorizontalAlignment="Center" VerticalAlignment="Center"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Text="Hello" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /> <TextBox Grid.Row="1" Height="25" Width="100" HorizontalAlignment="Center" … | |
Re: Be more explicit, please, and explain what amount, what listbox and what code is there. Copy here any code you have and tell what you expect the program to do for you. | |
Re: For me the solution has been: 1) set up a home group 2) add a network location: in "This PC" right click and selected that option and followed the wizard. 3) in my case, on the second PC I had to install MS Office Database Engine 2010 [From Here](https://www.microsoft.com/es-es/download/details.aspx?id=13255) Note: … | |
Re: Possibly you're look for a solution like the one on this threat [Click Here](https://www.daniweb.com/programming/software-development/threads/507654/combobox-search) | |
Re: I have tried to allow carriage returns: Imports System.IO Imports System.Text Imports System.Text.RegularExpressions Public Class CSV Dim separator As String Private Sub btnLoad_Click(sender As System.Object, e As System.EventArgs) Handles btnLoad.Click Try btnLoad.Enabled = False OpenFileDialog1.Filter = "CSV Files (*.CSV)|*.CSV|All Files (*.*)|*.*" OpenFileDialog1.FilterIndex = 1 Dim r As DialogResult = OpenFileDialog1.ShowDialog … | |
Re:  SELECT e.classid, a.planname, b.workoutname, e.date, c.timeslot, e.status, d.staffemail FROM tblclass e JOIN tblallocation f ON e.planallocationid = f.planallocationid JOIN tblplan a ON a.planid = f.planid JOIN tblworkout b ON b.workoutid = f.workoutid JOIN tblstaff d ON d.staffid = e.staffid JOIN tbltimeslot c ON c.timeslotid = e.timeslotid | |
Re:  This is physics and has to do, in my opinion, with OOP more or less like physical. The solution I think is θ' = π - θ because I should have taken PP' instead of P'P. | |
Re: Perhaps you are asking for `DataGridView1.CellClick`event ? | |
Re: You must develope and install a driver. Search for MS' DDK, driver deveopment kit. | |
Re: Seems as there are 3 factors: a 'n' or 'y' value; extra_days or not; and procesDate (<,> or =) versus thisDate. I would suggest to you to draw a table like this one and fill in all the different possibilities. At least having a clear method to follow it'll be … | |
Re: What's the message? In which line? | |
Re: One thing you may do is try to define exactly what do you mean by a complete solution and try by yourself to accomplish that target. Then you may share your code, doubts and difficulties -if any. | |
Re: You should close first `rdr.close()` before the insert into command. | |
Re: As a start you may do something like the following: Imports System.Text Public Class multiColumnListbox Private Sub multiColumnListbox_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load ListBox1.Items.Add(New car("X1", "BMW", "140", "276", 1)) ListBox1.Items.Add(New car("XS", "BMW", "225", "375", 2)) '... '... ListBox1.Items.Add(New car("718", "Porsche", "88", "112", 2)) End Sub End Class Public … | |
Re: I think the non random result is due to the fact that the random is defined inside a sub procedure and not a class level. The only way to create a random sequence is to define the random variable just once in all the analysis. Then you may play 100, … | |
Suppose we need to populate and filter a Datagrid with the data coming from an Access table. It could be of course a table from Sql Server also. Form dataGridSelect contains two buttons and a DataGridView. Clicking the first button will populate the DataGridView the data comming from a Sql … | |
Re: Watch out for strings outside the warning label. Replace strings by System.Text.StringBuilder. |
The End.