Click here to Skip to main content
15,890,845 members
Everything / Programming Languages / Visual Basic 12

Visual Basic 12

VB12

Great Reads

by Mr. xieguigang 谢桂纲
How to build my own 3D graphics engine from ZERO step by step
by Mr. xieguigang 谢桂纲
The ShellScript is originally developed for the debugging of my "genome-in-code" virtual cell simulation engine, but now it becomes a script language for a .Net program.
by William Costa Rodrigues
This article explains an easy method to download and update your WinForms application
by a_pess
Image File Format

Latest Articles

by William Costa Rodrigues
This article explains an easy method to download and update your WinForms application
by Mr. xieguigang 谢桂纲
How to build my own 3D graphics engine from ZERO step by step
by Mahesh Rajaram Shinde
This project is designed for addressing SQL Server Script deployment on multiple servers and databases.
by David Vanson
Generate you own barcodes for your business, Promotional items or to share links with friends.

All Articles

Sort by Updated

Visual Basic 12 

2 Dec 2016 by $*Developer - Vaibhav*$
C# ADO.NET SqlCommand - ExecuteNonQuery[^]
29 Jan 2015 by /\jmot
try Use ReportViewer1.RefreshReport()Like my code.. ReportViewer1.LocalReport.DataSources.Clear() Dim adaptar As New HotelsDataSetTableAdapters.Rstrnt_Bill_TABLETableAdapter Dim rstrnt_Table As New HotelsDataSet.Rstrnt_Bill_TABLEDataTable ...
5 Nov 2014 by _Vitor Garcia_
Whats the error/exception and where it is ?
22 Oct 2014 by a-dehghani
Thank you for your answers, sorry for some misunderstanding.I'm control engineer and have good experience with hardware as well. I did lots of control projects with DCS and PLC's. I want to improve my self in programming. I'm expert in MCU and know Assembly and C as well. But want to...
23 Sep 2014 by A.ALMUSBAHI
hello , first of all sorry for my bad English. i have been programming on C++ for some time, then moved to VB.net 2012.Every thing went ok so fare but i had a problem with Stacks.how can i use this c++ code while(!stack.empty()){ //other codes } on VB.net
15 May 2014 by a_pess
Image File Format
18 May 2014 by a_pess
Demonstrates how to retrieve resources from a .NET Assembly in Visual Basic .NET
22 May 2014 by a_pess
ThreadSafe Generic List
2 Jun 2014 by a_pess
Check image is upside down in VisualBasic.NET
8 Sep 2014 by Abhinav S
Move the CRUD logic to a different class. Call it the controller.Keep view (i.e. aspx and aspx.designer) logic separate from the CRUD logic by using this approach.
8 Dec 2015 by Abhinav S
This article could help you - DataGridView – Stacked Header[^].
7 Jul 2014 by Abhishek Burrnwal
">Now, Url- ViewWebSite.aspx?UserId=15But I want to change UserName/UserId/15
20 Sep 2014 by Abinonos
Hello;I'm using NumericUpDown control on a windows form, when executing, pressing Delete key or Backspace key make the field empty.how can i reset the value to its minimum value when this situation occurs ?thank you
21 Sep 2014 by Abinonos
Thank you for your answers , Bill, Sergey;I'm trying your advices and solutions and will comment that soon.As i will use the NumericUpDown control many times, i will even consider iheriting from the raw one to implement any eventual solution.Thank you
30 Jan 2015 by Adrian Ulland
Hello, I just want to make sure you are aware this is a beginners project I am having. I am not using XNA.Framework, DirectX, Unity or any game engines, I am making my own game completely from scratch using windows forms in VB.net, so far its alright- however:Question 1: When you move around...
18 Sep 2021 by AdvenSQL
Plz Help I am using visual studio 2017, sql server 2016 I need to fill listview2(Containing Sub Departments) with checkboxes, based on another listview1 checked items & when I select an item in listview1 its all sub departments from Sql server...
4 Jul 2015 by Afzaal Ahmad Zeeshan
Actually your executable is targeting some other resources found in the project folder (folder names also matter in this context; see Solution 1 by OriginalGriff for that because many things are required to run an application no matter if it just says Hello world in your Console). First of all,...
21 Aug 2014 by Aiman Ali
how do i add the DATA VALUE in my combo box? because i am not interested in the text. the text is just for user to see but the DATA VALUE is wat i want to specify MYSELF. HOW IS THAT DONE GUYS???? I AM USING VB. VISUAL STUDIO 2013. Thank u
22 Aug 2014 by Aiman Ali
If TextBox1.Text "" Then cn.Open() cmd.CommandText = "insert into students (FName,LName,StdIDNo,Gender,Status,Date_Enrl,Category,Addr1,Addr2,City,Country,Phone,EMailAddr,Zip) values ('" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox1.Text & "','" & " " & "','" & " " &...
6 Nov 2018 by Alek Massey
Wildcard chars are allowed at begining or end or both but not the middle. The following would be allowed and would include your target row. Dv.rowfilter="Name like '%a m%'" Operator LIKE is used to include only values that match a pattern with wildcards. Wildcard character is * or %, it can be...
17 Jan 2022 by alip1
I have a report drawn through SSRB 3.0. The report is of the .rdl type so through VB.NET code and Report Viewer is hooked and displayed. The data set is managed dynamically so that records can be filtered according to the user's needs. The...
21 Jun 2015 by Andy Lanng
We don't do homework. There are several reasons for this but they are all for your benefit.Give it a go. Get started. Write some code. If you get stuck and have a specific question then let us know.If you have some code, post it and show us where you are stuck. We will help you find...
21 May 2015 by Anele 'Mashy' Mbanga
Exploring the source code behind the offline CodeProject article writer CodeProject.Show.
31 Mar 2015 by AnotherKen
Maybe this will help? Mouse and Keyboard Tracking and Simulator[^]
11 Feb 2015 by anup.bhunia
If this a windows form application,declare the file variable in form scope, instead of local. Open the file in form load.If this is a web application, you need to keep the last line-no in a hidden field. On next click skip upto that mark before loading the next lines in your textboxes.
6 Jan 2015 by Anupama Rhiyas
i want to know about different above visual basic and c#.net Language?
11 May 2014 by Arkorful Jnr
Private Sub BtnFind_Click(sender As Object, e As EventArgs) Handles BtnFind.Click Dim id As Integer con = New SqlConnection("Data Source=.;Initial Catalog=Church_Management_System; Integrated Security=True") con.Open() id = Val(InputBox("Enter Membership ID", "FIND...
11 May 2014 by Arkorful Jnr
'con = New SqlConnection("Data Source=.;Initial Catalog=Church_Management_System;Integrated Security=True") con.Open()sqlstr2 &= "INSERT INTO POSITION VALUES (@Membership_Id, @Position_title, @Name, @Dep_Name)"sqlstr6 &= "INSERT INTO POSITION SELECT * FROM POSITIONS where...
1 Jun 2017 by Arun Sivasankar
Sorry for my bad english. I am a newbie in vb.net. I am creating a user control. My requirement is to make a control that has multiple pages that navigate through buttons only. Should add controls to that pages in design time. What I have tried: I created one inheriting tab control. I need to...
25 Jun 2014 by Ashok8033
Hi,Declare count Variable globally,when click remove button you can get count of newly created control.
6 Jun 2014 by Awadhendra Tripathi
Update your windows or update your IE( may be some patches are missing)orJust Uninstall your web browser or format your machine. :)
4 Apr 2015 by BacchusBeale
You could make/host an error HTML page and redirect (Navigate) to there when there's an error.
16 Sep 2019 by BassamKassem
When trying to use my VB.Net application to connect to accdb file that was originally converted from mdb using MS Access it the application gave me Unrecognized database format however when reversing the action and use the original mdb file it works normally also the migrated accdb file is...
22 Sep 2019 by BassamKassem
I'm getting this error after migrating my database from Access to SQL Server . below are that actions I need do but all of them gave me error "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM." 1- I need to search for all records that are exceeded 24 hours...
1 Oct 2019 by BassamKassem
I get an error call "Child list for field Customers cannot be created." after query execution specially after changing my sql queries to parameters instead of sql injection queries , here is the code //////UPDATES\\\\\\\ Sorry for not providing full info however here are the needed updates:...
4 Oct 2019 by BassamKassem
Hi everyone I have an application that manages database . This application is used by 40 different computers over a shared network drive. What I have tried: I was using .mdb MS Access database and this file was on a network shared drive tp which my VB.net application connects. This was good...
7 Oct 2019 by BassamKassem
My problem is that when uploading bulk records to SQL Server database through VB.Net it creates a lot of EMPTY records after Inserting all records inside the xls file how to eliminate this issue. taking into consideration that Excel.xls file has no Empty records . What I have tried: ...
5 Sep 2014 by behish
Hi I have a page which users can send their comments,the problem is: when user enter security code the browser post back and message please enter security which is entered already,would some body please help me?here is my html code: .::...
25 Jul 2015 by bellatriks
Hi,I want to add three header row to DatagridView.Row1 -> Columns Header -> 2013,2014,2015 Years (Merge Months Count = 12)Row2 -> Columns Header -> 1,2,3,...,12 Months (Merge Days of Month = 28,30, or 31)Row3 -> Columns Header -> 1,2,3,...,28,29,30,31 Days of Month (I calculate this...
18 May 2016 by bellatriks
Hi,There's a checkbox column in DataGridView. Also, there's a text box which is used for searching.When I type in textbox for search, results are filtered automatically. I choose the items I want from the filtered results. When I type another word/letters or delete the keyword from the...
3 Jun 2014 by Bhushan Patki
Fetch values in asp.net AJAX AutoCompleteExtender
20 Sep 2014 by BillWoodruff
If your goal is to make sure the NumericUpDown Control is reset to its minimum value if the value-entry-field is empty, and the NumericUpDown Control loses Focus:private void numericUpDown1_Leave(object sender, EventArgs e){ if (numericUpDown1.Text == String.Empty) { ...
5 Dec 2014 by BillWoodruff
Why don't you get started by studying this CodeProject article which shows you how to build an 'imagemap' control for WinForms: [^]You may also get some ideas from this CP article on an ImageMap for ASP.NET: [^].Some important choices you'll have to make are:1. are you going to...
1 Feb 2018 by blueye89
Hello to all, I have 5 pdf documents opened in 5 tabs in Adobe Reader. 111111.pdf 222222.pdf 333333.pdf 444444.pdf 555555.pdf Let's say that I want to replace one of them. So, I have to close it before. Is it possible to close some of them through VB.Net? What I have tried: For example I...
18 Feb 2019 by boudyonline
I've made a small program by visual studio 2012 contain print procedure using report viewer it's working ok in my PC , but after deploying program using Advanced Installer program and install it in another PC it gives error in printing form as shown in the following picture...
27 Feb 2019 by boudyonline
The reason was that file should be install SQLSysClrTypes after that it working well Thanks for all
7 Oct 2015 by cadiazran
Hi, I'm using the same code for this on .Net >. I have a PLC connected to a PC through Modbus RTU (RS485). Between PLC and PC I have a RS485-RS232-USB converter. I'd like to know how this program could read and write memory registers of 4 bytes (2 words) size. I need to handle memory...
2 Sep 2015 by CgKumar
Hi Friends,Here i have error when the data in excel1 paste into the excel2 at specific location. The error is: "An unhandled exception of type 'System.MissingMemberException' occurred in Microsoft.VisualBasic.dll Additional information: Public member 'Paste' on type 'Range' not...
2 Sep 2015 by CgKumar
Hi friends,Here i have problem for creating bar graph in excel automatically by following same excel file data. The needed flow of my program is:1) Open and read the targeted table in file "C:\Users\Thaneskumar\Desktop\Copy of SBL_Release_Yield Loss .xlsx".2) Create another excel...
10 Sep 2015 by CgKumar
Hi Friends,Here I have some problem. My computer F5 function key is spoil. Here I need to refresh data every day. Thus I plan to design a windows form with one button. If I click that button, it would need to perform as F5 key. Could any one help me?The below code is shows were I design....
27 Jan 2022 by cgthanes
Hi Friends,I m recently doing a program were import the data from Excel to .mdb access file using vb.net. But i have some problem, the data were inside the excel file is cannot import into the access file. can anyone help me? Please your help is required....Thanks.Best Regards,...
30 Aug 2014 by ChauhanAjay
Try this linkcreate a sudoku game[^]
24 Jan 2015 by CHill60
A summary of where we are so far...- You made sure the access database and the contents of the bin folder had all made their way to the target machine.- You then got an error "Could not load the assembly Microsoft.ReportViewer.Winforms so you installed Report Viewer[^] but you are still...
13 Dec 2015 by CHill60
You are trying to add an integer to a string (.Text) which will result in the runtime exception Quote:An unhandled exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dllInstead do something like this ... First you need to get the current text of the label as an...
22 Dec 2015 by CHill60
Firstly - anything that is intended for logging keys, grabbing passwords, hiding from Antivirus is intended for malicious purposes. That behaviour isn't just prohibited here but on all reputable sites. You will get no help with it.Secondly - you said that your teacher asked you to make a...
24 Oct 2017 by CHill60
Have you tried debugging? Here is a guide to how to do that Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^] Why redisplay the form (that is probably what is affecting your focus - try removing : Me.Show()
17 Jan 2022 by CHill60
Your regex seems over-complicated and doesn't check for playlist.m3u8 at all. Why not keep it simple with ^https://edge.*playlist.m3u8$ - ^https://edge line must start with "https://edge" - .* followed by zero or more characters - playlist.m3u8$...
16 Apr 2015 by Chris Jorna
Communication Library Files - LMS5lib | Connection and structure
20 Mar 2020 by codejet
Try enabling MutipleActiveResultSet in your connection string add this MultipleActiveResultSets=True
27 Jul 2014 by CPallini
If I got you, you should display a message box only when a change of state happens, that is whenever IsAvailable changes from False to True (or the opposite). In order to do that, you have to store last IsAvailable value and compare it with the current one: if they are equal then do nothing; on...
24 Aug 2014 by CPallini
You are probably going to receive the sensor data on a virtual serial line. So, your first task is the proper handling of serial line communication with the Arduino board (you may find many articles on this topic).Then you have to display the received data using a chart. You may find some free...
7 Sep 2014 by CPallini
This Wikipedia page could be your starting point: "Bin packing problem"[^].
23 Nov 2017 by CPallini
You should use arrays of controls (e.g. txts(5) instead of txt5s) and arithmetic relations, in order to reduce all the Case stuff to If cur_years
13 Nov 2017 by CPallini
Quote: Me.rtbReceived.Text &= [text] Dim fine As String = Mid([text], 7, 3) Dim list As Integer = ListBox3.Items.Add(fine) The problem is you are adding to the list while the text box string might be still incomplete (you are building it incrementally). You have to...
18 Sep 2021 by Daan Assenberg
CmpCommand = New OleDbCommand("Select * FROM tblCompetitie WHERE((verID)=myVerID) ORDER BY comOmsch", BiljartConnection) CmpCommand.Parameters.Add(MyVerID) CmpAdapter = New OleDbDataAdapter CmpAdapter.SelectCommand = CmpCommand CmpTable = New...
6 Apr 2014 by Dalek Dave
That is because dblRate is NOT declared! Dim dblPrincipal As Double Dim dblPayment As Double Dim blnIsConverted As Boolean Not there.Declare it and see the difference!You are declaring it within the if then statement, so it is declared if the...
3 Jun 2014 by DamithSL
change your web method signature as below System.Web.Services.WebMethod()> _Public Shared Function GetCompletionList(ByVal prefixText As String, ByVal count As Integer) As List(Of String)End FunctionAnd you better follow the stems in AJAX...
25 Jun 2014 by DamithSL
check below examples fro how you can add remove dynamic text boxes on button click Dynamically Add and Remove HTML Elements using JQuery append(), after() and remove() methods[^]JQuery to create dynamic textboxes on button click[^]hope this helps you to find solution.
7 Jul 2014 by DamithSL
use HyperLink ' runat="server" /> then you can access control from code behind hyperlink1.NavigateUrl =newUrl;
23 Jan 2015 by DamithSL
chnage list.Add(dtrow)to list.Add(dtrow.Item("Submit_id"))
25 Aug 2015 by DamithSL
you need to read from excel and insert into access database using insert sql statement, currently you are creating access file and table but not inserting data. reading from excel file using select sql statement will not insert data to access database. sample code :Dim connect As String =...
3 Jan 2016 by DamithSL
go to properties of sdf file, Set the Copy to Output Directory property of the .sdf file to Copy always.
27 Jul 2014 by Daniele Rota Nodari
You can subscribe to the event associated with the IsNetworkAvailable property.Subscribing the event you would receive notification every time the value of IsNetworkAvailable property changes.You will not need to loop and consume CPU cycles.You can write something like:Private Sub...
4 Dec 2014 by Dave Kreskowiak
OS hooks are not going to do it.What you're describing is a proxy server. All requests go through the proxy and it can do whatever it wants with the URL requested, including count how many times it's visited.A proxy is just about the only thing that's going to work with all...
12 Nov 2015 by Dave Kreskowiak
You do NOT want to attach LEDs directly to the parallel port. There are projects out there that will tell you you can get away with it, but you risk blowing up the port if you're not careful and with some ports, it won't work at all.It's possible to do but I recommended against it. See this...
8 Dec 2015 by Dave Kreskowiak
Are you seriously trying to create up to 1,000 PictureBoxes?? DO NOT DO THAT!! Your code will get slower and slower with the more boxes you create, to the point where you're app will be unusable.You REALLY have to scrap this code and rewrite. I suggest dropping a Panel control on the form...
22 Jun 2016 by Dave Kreskowiak
Most monitors don't support being turned off completely by this command. Doing so normally just puts the monitor to sleep, not power it off. There is no way for you to get around this behavior and no documentation that I know of to tell you which monitors support this and which don't.
24 Jun 2016 by Dave Kreskowiak
That depends on exactly what you mean by "deactivate a system event".At face value, no it's not possible to turn off the raising of a system event.You can, however, just not subscribe to the them. If you don't have a handler for the event, nothing happens in your code when the event is...
9 Jul 2016 by Dave Kreskowiak
This requires writing a Remote Display Driver[^].I hope you're into C and debugging kernel drivers because you're not going to be writing this in VB/VB.NET.
1 Aug 2016 by Dave Kreskowiak
Path.GetFileName Method (System.IO)[^]Give this method the fully qualified path and it'll give you just the filename portion.
11 Jan 2017 by Dave Kreskowiak
The problem is that you're app doesn't store the information in a data model. You're using a display/edit control as your data container and that's not good practice. It's also what's making it very difficult for you to do this comparison.Create a data model in your code to store the data....
16 Mar 2020 by Dave Kreskowiak
It appears that you made the mistake of using a single SqlConnection object throughout your entire class. That's the wrong way to do it and leads to problems like this. ALWAYS create your connection when you need it, like in this method you...
25 Aug 2021 by Dave Kreskowiak
Keywords - Visual Basic | Microsoft Docs[^] FORTRAN 77 doesn't have any reserved words, but that doesn't mean using any keywords is a good idea.
9 Mar 2015 by Dave-10169531
I have an application where the user logs in and when they are validated the application needs to change to their database. I have done this in Windows APPS but I am new to the ASP.Net arena. Any help and or guidance is greatly appreciated.I have attempted to search for a solution but I...
10 Jan 2016 by David Vanson
Generate you own barcodes for your business, Promotional items or to share links with friends.
27 Jul 2014 by DeadlyNoodle
Hey guys, am quite new in programming and this is my first time using "While/Do While".this is mine code: If My.Computer.Network.IsAvailable = False Then 'do nothing While My.Computer.Network.IsAvailable = False Label1.Text = ("Internet Down") ...
28 Jul 2014 by DeadlyNoodle
hello, could anyone tell me what i did wrong and how to fix this, here is the code.This should be bookmarks bar in metrotoolbar (dotnetbar). If this code is completely wrong could you provide me working code?my settings is set to System.Collections.Specialized.StringCollectionam using...
16 Nov 2014 by dehumanate
Ok, let's see if, without using an IDE or a VB compiler, we can find some bugs!Firstly, let's simplify that huge loop - notice how ever block after each If statement checking intCount is the same? We can refactor this to use the loop effectively:Private Sub btnVerify_Click(sender As...
15 Apr 2014 by Duncan Edwards Jones
PrintPreviewDialog1.PrintPrevi...
18 Aug 2014 by ehabelnahas
Hi all,I need to connect my Visual Studio LightSwitch with VB.NET project to SQL database which is located on a shared drive on a local network .. Database Name is: Proj2014DB.mdf The PC name containing the DB is: PCNO10Drive on PCNO10 containing the...
18 Aug 2014 by Eldon Elledge
Provided that the PC that the Proj2014.mdf is located on is setup to properly run SQL Server (or Express or LocalDB), include the PC Name (or IP Address)\ SQL Server name. See below:Data Source=PCNO01-PC\SQLEXPRESS;Initial Catalog="Proj2014";Integrated Security=True;Pooling=True;Connect...
18 Aug 2014 by Eldon Elledge
It will need to be installed on the PC that has the database file. Based on the needs, there are different versions to look at:LocalDB - on a local PC - Great for Developing and TestSQL Express - Great for light use across the network with a few users.SQL Server - High-End use
30 Jan 2015 by Emiliarge
Using FindWindow() and WindowFromPoint() to identify window, and SetWindowText(), MoveWindow(), SetForegroundWindow(), EnableWindow() to interact with it
1 Dec 2014 by Er. Dinesh Sharma
Hi Use Binary Serialize to store on local machine with unique key combination and serialize when retrieve.
23 Jun 2015 by fahmijaafar
hi there, newbie here. i just dont know where to start after finishing with the interface. how do i save the combo box in database and then, insert the value for every answer before calculating the final marks for the question below. please help me walk through the solution. every help is deeply...
25 Jun 2015 by fahmijaafar
hi there. i've tried to search for solution for this problem online but i just cant find the one that fits. can anybody help? whenever i try to use the add button, it show ExecuteNonQuery() error. im trying to save the data into access databasethanks for our help.btw data for id is words and...
1 Mar 2018 by faiqaa
In my Login form the user needs to input the username and password in the relative textboxes and then press the button LOGIN. The username and password are already saved into a text file, every time the user tries to enter the username and password entered by him will be matched with the ones...
2 Mar 2018 by faiqaa
This form allows me to calculate the monthly average when I click the respective button, I want to be able to calculate the average display it in a label and then save this value into a text file and when calculating another average I want to be able to display the previous value calculated...
2 Mar 2018 by faiqaa
I am trying to display a message box based on the quantity regarding certain products saved in rows of data (4th item) in a text file, I know how to read each row but not how to only read a specific item.Does anyone have any idea? Let me know,thanks in advance. Below you can see what code...
2 Mar 2018 by faiqaa
I am saving stock info such as product ID,Product name,price and quantity. I want to be able to sort by product ID using a bubble sort. I am first loading the data into the list box from the relevant text file and then sorting. I have tried using the one below but it doesn't not seem to...