Questions tagged as 'vb.net'

1
answer

Object can not be cast from DBNull to other types

I'm having a problem in the return "Object can not be cast from DBNull to other types" , how to proceed? Public Function RetornaValorTotalPremiacao(ByVal strCodigoProposta As String) As Decimal Try Dim objApoioConex...
asked by 19.03.2015 / 18:20
1
answer

Is there any way to shorten the property declaration?

I know that in C # you can do this: public string propriedade { get; set; } Is there any short way of declaring properties with the Get and Set procedures in Visual Basic? The only way I know it is this: Private _propriedade...
asked by 18.09.2016 / 23:12
1
answer

Error trying to get the value in a section of XML in VB.NET

The error happens as soon as it passes the first "dEmi" element. XML: <ide> <cUF>11</cUF> <cNF>855305</cNF> <mod>59</mod> <nserieSAT>900000980</nserieSAT> <nCFe>000225<...
asked by 09.01.2015 / 18:42
2
answers

Webservice consumption only runs on debugging under the Visual Studio IDE

My WinForms VB.NET application consumes a webservice to perform some queries. When running in debug or release mode under the Visual Studio IDE, it works perfectly, but once distributed on client computers (or even on my own, running straight fr...
asked by 22.02.2017 / 14:51
2
answers

Strange behavior in DB - Too many records

The problem is that this returns me 8 records while in the database they are only 2. That is 4 for each 1. I can not understand why. (If you want to edit the title of the question) I have this DB: AndIhavethisselect:selectalunos.numero,fa...
asked by 03.02.2016 / 09:49
1
answer

How to get permission to write to the Windows registry via VB the key HKEY_LOCAL_MACHINE

I'm trying to record a record inside HKEY_LOCAL_MACHINE\SYSTEM and visual studio / visual basic will not let me have access. It says that I am not allowed to record my record. My command: My.Computer.Registry.SetValue("HKEY_LOCAL_MAC...
asked by 25.09.2014 / 23:58
1
answer

How to fill a ListBox using multi thread in VB .NET?

In a Windows Form Application I have a List Box that is populated from a list of IP's. It works like this: there is a text file ( config.eep ) that contains a series of IP's, at the press of a button to update the List Box, a loop is cal...
asked by 31.01.2014 / 19:42
1
answer

Disable the "Close" button of a form

Does anyone know how I disable the "Close" ("X") button of a form in VB.NET?     
asked by 20.06.2018 / 17:43
2
answers

Turn decimal into vb minutes

Well, I know that if I take for example 4.70 and turn the ", 70" in minutes, I have to get 0.70 (number after the comma) and multiplied by 60, which would give 42, in value of hours would be 4:42 How do I apply this in VB? How do I get the num...
asked by 16.04.2018 / 15:40
2
answers

How to format a Double by changing the semicolon and keeping 2 decimal places in VB.NET

I need to transform the result from a value of As Double to the Brazilian numeric standard that uses a comma instead of a dot (and also keep only 2 decimal places), thus: ' variaveis de teste ' valores esperados de...
asked by 25.01.2018 / 16:59