Posts by davidterra • 416 points
23 posts
-
0
votes1
answer271
viewsA: How to increase column width in Listbox C#
Try assigning value to property AutoResizeColumns after adding listview content. ColumnHeader header1, header2; header1 = new ColumnHeader(); header2 = new ColumnHeader(); header1.Text = "Id";…
-
0
votes2
answers242
viewsA: Fill a multiline-textbox with all items in a combobox list
For Each item As String In ComboBox1.Items TextBox1.AppendText(item + Environment.NewLine) Next Or by using Stringbuilder Dim text = New System.Text.StringBuilder() For Each item As String In…
-
4
votes1
answer533
viewsQ: What is the difference between Task and async Task?
In the code below I wrote two methods, one with the return Task and another async Task. What happens differently in the execution of these methods since for one added in the construction the…
-
2
votes1
answer208
viewsA: Separate all items from a string
Dim bar() As String Dim foo() As String Dim i As Byte bar = Split("Nome|1,2,3,4,5,6,7,8,9|59000|50%", "|") foo = Split(bar(1), ",") For i = LBound(foo) To…
-
1
votes1
answer28
viewsA: My executable is still in an old version
To compile go to the File > Make menu
-
0
votes1
answer44
viewsA: Routines between different formats in VB
What you need would be something like: //Form1 Public Sub Atualizar() MsgBox "Atualizado" End Sub Private Sub Command1_Click() Dim objForm2 As Form2 Set objForm2 = New Form2 Set objForm2.Formulario…
-
2
votes5
answers1114
viewsA: Save Combobox C# values to database instead of descriptions
You can create a list and assign it to the combobox. public sealed class ComboBoxItem { public string Texto { get; set; } public string Valor { get; set; } public override string ToString() { return…
-
1
votes1
answer364
viewsA: How to manipulate Combobox
You can create a list and assign it to the combobox. public sealed class ComboBoxItem { public string Texto { get; set; } public string Valor { get; set; } public override string ToString() { return…
-
0
votes1
answer94
viewsA: VB - SETFOCUS - Focus a textbox after failed validation
Just try txtFind.Setfocus If txtFind.Text = "" Then validacao = validacao + False Call MsgBox("Please fill the XX!", vbCritical, "ERRO") txtFind.SetFocus End If…
visual-basic-6answered davidterra 416 -
0
votes2
answers433
viewsA: How to locate next values of the same customer
Try this way: Private Sub cmdPequisar_Click() 'Verificar se foi digitado um nome na primeira caixa de texto If txtcpf.Text = "" Then MsgBox "Digite o CPF de um cliente" txtcpf.SetFocus Exit Sub End…
-
0
votes2
answers375
viewsA: How to insert and execute parameters in a precedent in oracle 11g in vb6
See if this reference helps: http://www.codeproject.com/Articles/15222/How-to-Use-Stored-Procedures-in-VB and http://www.w3schools.com/asp/met_comm_createparameter.asp…
-
1
votes1
answer80
viewsA: Create form and gridView dynamically with VB6
See this reference, How To Dynamically Add Controls to a Form with Visual Basic 6.0 https://support.microsoft.com/en-us/kb/190670 .…
-
4
votes1
answer2775
viewsA: Sign XML Nfse
You must specify which tag you want to sign. private void AssinarXml(string arquivo, string tagAssinatura, string tagAtributoId, X509Certificate2 x509Cert) { StreamReader SR = null; try { SR =…
-
0
votes1
answer175
viewsA: Vb.Net - Total registration in descending order
It would be something like: SELECT COUNT(*), ID FROM TABELA GROUP BY ID ORDER BY ID DESC
-
0
votes1
answer47
viewsA: Confirm if user has already registered VB
Vc can encapsulate your method within a Try catch instruction https://msdn.microsoft.com/pt-br/library/fk6t46tz.aspx to know if an error has occurred. If you have created the ID field as IDENTITY…
visual-basic-6answered davidterra 416 -
0
votes1
answer71
viewsA: Form_load routine does not work
What is appearing is that the form "frmPerfis" was not downloaded after invoking the form "frmPerfisAlter". What I usually do to not leave the form loaded and the variables filled is to create an…
visual-basic-6answered davidterra 416 -
0
votes2
answers1359
viewsA: Specified conversion is not valid in Executescalar
Another alternative is to use the Double.TryParse. string value; double number; value = Double.MinValue.ToString(); if (Double.TryParse(value, out number)) Console.WriteLine(number); else…
-
0
votes1
answer123
viewsA: Rename multiple files with VB6 Database data
Make it simpler, first check if the file exists and then run the command to rename. if Dir("c:\Temp\0001_1.jpg", vbArchive) <> "" then Name "c:\Temp\0001_1.jpg" As "c:\Temp\novonome.jpg" End…
-
1
votes2
answers280
viewsA: Help with Textbox / string parameters
This requires the keyword ref or out out (reference of C#) ref (reference of C#)…
-
1
votes1
answer552
viewsA: How to accept 0 and negative values in decimal attribute using Dataannotations?
[Range(typeof(decimal), "-10", "10")]
-
0
votes2
answers56
viewsA: Distribute programs without losing the path/path at runtime
In vb6 you use the command App.Path to return the path of the executable.
-
1
votes0
answers64
viewsQ: How to improve the loading of related entities using Linqkit?
Hi, I’m using Linqkit To stack "Expression Predicates", I need to do a "foreach" to load the related entities and this is being very expensive for application because to load 1000 records is taking…
-
1
votes1
answer776
viewsA: Strange txt symbol that prevents SEFAZ from reading . txt
When a text file is created using "Open For Append", a blank line is always placed below the written line. In this case I use the function below to remove the blank line. Private Function…