138 Posted Topics

Member Avatar for kugan80
Member Avatar for Tom_33

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 …

Member Avatar for Reverend Jim
1
636
Member Avatar for Blueie

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?

Member Avatar for xrjf
0
195
Member Avatar for Obbie_1

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)

Member Avatar for Reverend Jim
0
3K
Member Avatar for Arnold_7

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)

Member Avatar for happygeek
0
234
Member Avatar for ALosh99

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

Member Avatar for ALosh99
0
360
Member Avatar for johndohmen1963

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, " ")

Member Avatar for johndohmen1963
0
394
Member Avatar for JModak

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

Member Avatar for Santanu.Das
0
398
Member Avatar for JohnMcPherson

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.

Member Avatar for JohnMcPherson
0
808
Member Avatar for Mr.M

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>

Member Avatar for Mr.M
0
6K
Member Avatar for Gokul_4

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)

Member Avatar for rproffitt
0
186
Member Avatar for Catherine_5

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 …

Member Avatar for xrjf
0
380
Member Avatar for joshi1984

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

Member Avatar for xrjf
0
341
Member Avatar for xrjf

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

Member Avatar for xrjf
0
2K
Member Avatar for Saanvi

![searchStringA.PNG](/attachments/small/3/b86c0c12826ad13329e94ff2482d7cf8.PNG) ![searchStringB.PNG](/attachments/small/3/1483e5943398e3807885b1bea34714b6.PNG) 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 …

Member Avatar for xrjf
0
521
Member Avatar for KushMishra

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

Member Avatar for KushMishra
0
4K
Member Avatar for jailani_1

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. ![mates8daniweb.PNG](/attachments/small/3/236937961bc07f7fb0ebfdb5ddb07005.PNG "center") Imports m8 = mates8 Public Class Form1 Private Sub Button1_Click(sender As …

Member Avatar for Reverend Jim
0
991
Member Avatar for JModak

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

Member Avatar for dspnhn
0
2K
Member Avatar for Mr.M

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.

Member Avatar for xrjf
0
302
Member Avatar for Programmer_2

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?

Member Avatar for ddanbe
0
148
Member Avatar for JModak

I can't see anything wrong with the code you are sharing. So, what's the problem? Can you explain a bit further?

Member Avatar for xrjf
0
314
Member Avatar for Luke_7

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)

Member Avatar for xrjf
0
90
Member Avatar for JModak

Are you talking about a ListView, a container of images? Or perhaps are you refering to a listbox filled with items?

Member Avatar for xrjf
0
1K
Member Avatar for Tim_8
Member Avatar for xrjf
0
839
Member Avatar for Rica_1

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

Member Avatar for xrjf
0
1K
Member Avatar for tshukela.george

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 …

Member Avatar for xrjf
0
422
Member Avatar for Enrique_2

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

Member Avatar for Joris Claassen
0
343
Member Avatar for walaga
Member Avatar for DobyMoby

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

Member Avatar for xrjf
0
125
Member Avatar for Maurice_4

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. ![rotatingRectangle.PNG](/attachments/large/3/d1d764e1dcd5d860f646604adc5f317d.PNG "align-center") Imports System.Drawing Imports System.Reflection …

Member Avatar for xrjf
0
2K
Member Avatar for JModak

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#")`

Member Avatar for xrjf
0
2K
Member Avatar for Khaliunaa

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 …

Member Avatar for Khaliunaa
0
4K
Member Avatar for KushMishra

![WpfStyleFile.PNG](/attachments/large/3/0c9a49e533ca301a6578f615c654647b.PNG "align-center") 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" …

Member Avatar for rproffitt
0
2K
Member Avatar for Bim_2

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.

Member Avatar for Mr.M
0
123
Member Avatar for mikeybware

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

Member Avatar for xrjf
0
3K
Member Avatar for JModak

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)

Member Avatar for xrjf
0
503
Member Avatar for MukeshZ

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 …

Member Avatar for deceptikon
0
20K
Member Avatar for Alv45525

![jointables.png](/attachments/large/3/256c3728e565d559606955673ba99b34.png "align-center") 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

Member Avatar for xrjf
0
433
Member Avatar for Curious Gorge

![turretangle.png](/attachments/large/3/0aaf5412186dcf3117ee835052f23754.png "align-center") 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.

Member Avatar for xrjf
0
548
Member Avatar for Alv45525
Member Avatar for Mr.M
Member Avatar for xrjf
0
475
Member Avatar for Alv45525
Member Avatar for xrjf
0
322
Member Avatar for VIPER5646

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 …

Member Avatar for VIPER5646
0
427
Member Avatar for JModak
Member Avatar for Paul_55

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.

Member Avatar for xrjf
0
210
Member Avatar for Alv45525
Member Avatar for jackiiee

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 …

Member Avatar for xrjf
0
2K
Member Avatar for Reverend Jim

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

Member Avatar for xrjf
0
2K
Member Avatar for xrjf

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 …

0
360
Member Avatar for _1_14
Member Avatar for tinstaafl
0
740

The End.