Click here to Skip to main content
15,901,505 members
Everything / Programming Languages / Visual Basic.NET 7.x (2002/03)

Visual Basic.NET 7.x (2002/03)

VB7.x

Great Reads

by Jecho Jekov
Provides an easy way to use C calling convention callback functions in C# and VB
by kirkaiya
A very simple, XAML-based month-view calendar that shows appointments, exposes events, and allows dragging appointments in the current month.
by S.SRIVATHSAN
Implementation Nhibernate concept in VB.NET
by Avatar2400
This is a simple class that allows you to have message box with checkbox and other small features.

Latest Articles

by Richard Atkins
Create a fluid, multi-column, vertically ordered list using nested, floating divs
by Eric P Schneider
Basic demo on how to serialize and deserialize custom collections
by Avatar2400
This is a simple class that allows you to have message box with checkbox and other small features.
by icemanind
How to automatically create data access layers and business layers from a Microsoft Access or a SQL Server database

All Articles

Sort by Updated

Visual Basic.NET 7.x (2002/03) 

12 Aug 2023 by Ronalyn Ablang 2023
I want to display the tooltip or just the value but it is not showing when I tried someone else's code in displaying the value of the hovered datapoint. What I have tried: I tried to set the tooltip in chartseries to #VAL{C}, but to no avail. I...
12 Aug 2023 by Graeme_Grant
If you look at the Github Repo[^], there are samples on how to: 1. Use Tooltips[^] 2. Custom ToolTips[^] From the UsingTooltips example: /// /// This method sets tooltips for chart elements /// private void...
20 Jul 2023 by Christian S. (Chris)
Public Structure Foo Public NameLength as Integer '4 Byte Public Name As String 'variable name in MBCS
20 Jul 2023 by OriginalGriff
I can't check it in VS 2013 - it says my licence is "stale" and it can't retrieve a new one - but if I try it in VS 2022 it works fine converted to C#: [StructLayout(LayoutKind.Explicit)] public struct Foo { ...
30 Dec 2022 by Amitkumaryadava
Issued Detail Page No.1 Item Issued For Customer :101 ----------------------------------------- Id Item Qty Date ----------------------------------------- 101 Pen 10 10/05/2021 101 Copy 10 10/05/2021...
25 Dec 2022 by OriginalGriff
Close your stream before you try to use the output file, or it can't be opened by any p[rocess - including ones in your own application. In other words, the End Using needs to be before the Process.Start
2 Jun 2022 by Franz Schweizer
I have a piece of code that I need to basically put all contents of a huge buffer output to a file. So far I am able to get it working with a smaller buffer, but if I try to use a really large buffer, I get too many line continuation errors,...
1 Jun 2022 by Patrice T
Quote: Join arrays in VBA script to write to file The solution: don't join. your code is OK with unlimited memory, which is not the case with your computer. Look at your code, you join elements of an array only to write it is a single go in a...
20 Jan 2022 by M Imran Ansari
Please follow the link for Bandwidth monitoring system vb.net - Bandwidth monitoring system - Stack Overflow[^]
20 Jan 2022 by lov kiemtheng
Hi all, I want to write a program which can be show the Ethernet internet connection bandwidth Upload and Download Speed, it similar to our Windows Task Manager > Performance > Ethernet Send/Receive. can someone who experiences write this similar...
20 Jan 2022 by CHill60
Please read the posting guidelines Point number 2 - Have you searched or Googled for a solution? Try internet bandwidth monitor vb.net - Google Search[^] or even search within Code Project Monitoring Network Traffic[^] or look at the list of...
27 Apr 2021 by RickZeeland
In addition to Richards answer, see this CodeProject article: FFMPEG Video Converter with Progressbar VB.NET[^] You can use the Application.StartupPath Property[^] to get the directory where your application is running.
26 Apr 2021 by Mr.Kim2050
hi all i want to write the program which can convert .TS file to .MP4 file by using FFMEG.exe, but I meet some problem with coding below. 1.I try to write code command into cmd.exe by give commend control into ffmeg.exe to convert .TS to .MP4...
26 Apr 2021 by Richard MacCutchan
You can use FolderBrowserDialog Class (System.Windows.Forms) | Microsoft Docs[^]. If you want the cmd window to close when it finishes then use the /c option.
19 Nov 2019 by Richard Atkins
Create a fluid, multi-column, vertically ordered list using nested, floating divs
31 Jan 2019 by Eric P Schneider
Basic demo on how to serialize and deserialize custom collections
14 May 2018 by AshishVishwakarma
This book has MINIX operating system implementation given. Operating Systems Design and Implementation by Andrew S Tanenbaum https://www.amazon.com/Operating-Systems-Design-Implementation-3rd/dp/0131429388
6 Jun 2017 by Member 4450202
Please explain in the windows form handles when raises and for what we use themfor example me.load handles raise when win form preparing to showplease explain other handles for example say what is different between me.Shown and me.load handles
3 May 2017 by NightWizzard
There are two simple ways to solve this: 1) if it is correct that each map ends with the key word 'exit' and if this key word won't occur in other positions within a map, you may read the complete file content into a single string, then use the split method to turn the string into an array using...
1 May 2017 by Member 13163682
i have set of MAP in text file as below. map alias elr72_511 type regular byRule roles replace admin to owner_roles comment Converted_from_elr72_rule_31 to 1/2/x29,1/3/x27 from 1/4/x5..x6 exit map alias elr72_582 type regular byRule roles replace admin to owner_roles comment...
11 Sep 2016 by Avatar2400
This is a simple class that allows you to have message box with checkbox and other small features.
2 Aug 2016 by ProgrammingEnthusiast
i have created an application that runs in background. when i minimize it, it will appear on the task bar. it is working fine, but when i turn off my computer, windows says that my application is blocking the shut down process. how do i close my application when i shut down my computer? i...
2 Aug 2016 by ProgrammingEnthusiast
i have already resolved it by adding this code during form_closing event of my main form.If e.CloseReason = CloseReason.WindowsShutDown Then Me.Dispose
2 Aug 2016 by Kornfeld Eliyahu Peter
There are certain talks (messages) between the Os and your application while OS try to shut down...OS actually sent a WM_QUERYENDSESSION to your application, but as you didn't handled it it got a false response, marking your application as blocking...Read this paper, to see how prepare your...
9 Jul 2016 by Sh.H.
Hi guys,Is it possible to make a virtual display, and then turn the display from my graphic card to that virtual display?(The monitor will be black then. Or maybe it turns off)What I have tried:I have tried nothing until now.
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.
27 May 2016 by icemanind
How to automatically create data access layers and business layers from a Microsoft Access or a SQL Server database
2 Apr 2016 by David Vanson
A progress bar control you can customize
10 Jan 2016 by David Vanson
Generate you own barcodes for your business, Promotional items or to share links with friends.
2 Nov 2015 by icemanind
13 May 2015 by Maciej Los
Depending on Option Base[^] statement, lower bound of arrays start from 0 (zero) or 1(one). If you do not use this statement, array must starts from 0. I'd suggest to read this article Arrays in VB[^] which might help you to understand how to declare and initilize arrays.ReDim Preserve...
13 May 2015 by Frankie-C
In VB the arrays are defined as safe arrays, you have to access it as such in C.struct myStruct{ long n; SAFEARRAY *data; VARIANT_BOOL rData;};
13 May 2015 by Member 10772496
Hello,I want to transfer into a C ++ structure via a DLL , the content of a VB structure (UTD).My VB code is as follows :Private Declare Function Cpp_TEST1 Lib "C:\Users\\TEST1.dll" (ByRef iStruct As myStruct) As DoubleType myStruct n As Long data() As Long rData...
30 Apr 2015 by Karthik_Mahalingam
1) Create a strongly typed classpublic class ProfileEntity { public string FirstName { get; set; } public string LastName { get; set; } public string Address { get; set; }// add all the properties }2) create a new list of the ProfileEntity class as...
30 Apr 2015 by Member 10285969
Hello, i am trying to get the profile page of the current user but i am seeing an error on my screen and i don't know where it seems to be coming from. please, i need answers from any programmer that has a definite answer to this question. see below for details:ERROR:The model item...
26 Nov 2014 by Pascal Ganaye
In this article, I try to highlight some issues in the .NET Framework generic list and how to circumvent them
22 Apr 2014 by Duncan Edwards Jones
Introduces and discusses the Common Language Runtime framework classes used in printing from a .NET Windows Forms application.
13 Feb 2014 by Mik Wadstrom
Simple way to use Crystal reports as embedded dynamic printable reports
19 Jan 2014 by OriginalGriff
Don't post this under Quick Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.Posting this here relies on them "dropping by" and...
19 Jan 2014 by Unpalis
Hi EveryOneTwo Days Ago I Downloaded many class libraries among them one from this website.NET random number generators and distributions[^]and i managed to add it to Visual Studio 2013But the thing is none of functions are working for example the function IsValidAlpha...
14 Jan 2014 by ISpliter
When discussing VB6, we should look at the reality of the situation and not on preconceived opinions. New source code projects are made daily in Visual Basic 6.0. The paper proposes the reintroduction of Visual Basic 6.0 on the market, in parallel with Visual Studio line.
14 Dec 2013 by Behnam Heydari
Hi and tanksI need to code this project:- Capture and Records mouseclick logging on Virtualkeyboards in browsers+ Capture url from browsersCapture and Records every mouseclick logging on Virtualkeyboards made in any application along with the window they are clicking on, process name,...
2 Dec 2013 by storm6
Hi,every oneI have found lots of solution on this website for that I am very thankfull to you all who helps me and resolve my problems.Today I am talking about Plugins.I am recently working on web browser plugin.I want to link with the firefox flash plugin.which may managed by...
11 Oct 2013 by heemanshubhalla
How to use Masked Textbox control in .NET
6 Oct 2013 by Aydin Homay
HiIf your network has a Active Directory you can use it this facilities follow of...
2 Oct 2013 by Member 10311805
in Design mode I created a datagridView using a dataset.I added a query to create a stored procedue and defined @name as the parameter parameter.I alsso created a button with inputbox calling for the name.I dont find the right way to include the parameter Aprechiate helpThanks Dov
25 Sep 2013 by Rick van Woudenberg
Group policies is usually used for this.
25 Sep 2013 by Prince Tegaton
No. Else, Make your own version of Windows
25 Sep 2013 by Member 10258508
hi I am making sms software in vb6 wich work as windows service.my sms system is install more than 30 pcs in different locations.everything works fine but my problem is if user reinstall windows my sms software definately removed. i have a batch file which create SMsService.exe service ....
19 Sep 2013 by Ron Schuler
ASP.NET PDF document viewer control that does not require any Acrobat product to be installed
5 Sep 2013 by Mike Meinz
Function returns exe name and command line for the provided filename and extension.
2 Aug 2013 by CPallini
We have the very nice article series written by 0x3c0, let's start from the first one: "Beginning Operating System Development, Part One"[^].
8 Jul 2013 by bhuvamehul
If you are using vb.net and you want to draw line in picturebox control using mouse then Dim startpoint As Point Dim endpoint As Point Dim flag As Boolean = False Private Sub PictureBox1_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles...
21 Jun 2013 by SDDMAJORWORK
Sub Drawline(Routeindex As Integer, cityindex As Integer) NumRoutes = NumRoutes + 1Load Route(Routeindex)With Route(Routeindex) .X1 = DB(cityindex) + NumRoutes .Y1 = DB(cityindex) + NumRoutes .X2 = DB - NumRoutes .Y2 = DB - NumRoutes .Visible...
7 Jun 2013 by FatzBomb
How to convert a written number to a numerical value anywhere in a string.
16 May 2013 by E.F. Nijboer
The objects aren't equal and no comparator is available to handle it. Second, it isn't that easy because the image the button uses has lost the meta data, so it doesn't know where it came from. You could load the image from resource and compare the images. Some links are included. But I guess...
16 May 2013 by Polarfuze
i am comparing the the image i stored in button.image with image from my resources folder i am getting error "Operator '=' is not defined for types 'System.Drawing.Image' and 'Object'" the images are .bmp format of plain color greenWhat method should i use to compare the 2 images to...
15 May 2013 by Thomas Daniels
Hi,To split the string, use the String.Split method:String.Split Method[^]To check whether the parts are equal, use an If...Then...Else statement:http://msdn.microsoft.com/en-us/library/752y8abs.aspx[^]Dim twoParts As String() = someStr.Split("-"C)If twoParts(0) = twoParts(1)...
13 May 2013 by Richard C Bishop
This is an example of what you might do:Dim buttonList As New List(Of Button)()buttonList.Add("add your buttons from the page here or if you create them dynamically do it for each one");For i As Integer = 0 To buttonList.Capacity Then Dim btn As New Button ...
13 May 2013 by Keex0r
If I understand the question correctly I guess he already created the buttons in the designer. In this case you can change the text property of each button with the following code: Dim ButtonCount As Integer = 1 For Each c As Control In Me.Controls If TypeOf c...
9 May 2013 by Polarfuze
How do i print the text box and labels in a form to a doc or text file using codewithout writing 1000 lines of codeIN .NET LANGUAGENote:The solution 1 posted below is not for .Net u will have to make little changes. eg dim while declaration of variables
9 May 2013 by ZurdoDev
To text is very easy, use File.WriteAllText(). In VB, use & for concatenating or use a StringBuilder.
9 May 2013 by Radoslav Dimitrov
Hello!I'll say you for .txt files (text files). I brlive for .doc is the same.string fromLabel;string fromTB;string Path = @"C:\Users\Administrator\"; //Write the path herevoid FileWrite(string TextHere, string path){ string line = TextHere; System.IO.StreamWriter...
5 May 2013 by Maciej Los
See this pattern:^*([A-Z]{2,3}\-[0-9]{4}).*Tested on Rad Software Regex Designer[^] and this set of records:MH-9940NH-1940AGV-9Az0FG-5940MZ-92X0AHV-9930with IgnorePatternWhiteSpace and Mulitline set to TRUE.Returns:MH-9940NH-1940FG-5940AHV-9930Is that what...
5 May 2013 by Zoltán Zörgő
Try this: ^[A-Z]{2,3}-\d{4}$For testing an learning purposes I suggest you download Regex Coach[^].
5 May 2013 by Polarfuze
i wish to check for this format similar to this MH-9940 how do i customize regular expression to check if first 2-3 letters are capital from a-z then there should be hyphen followed by four digits from 0-9link to good explanation about regular expression will also be helpful here is by...
26 Apr 2013 by Sebastien Lebreton
Reflexil is an assembly editor and runs as a plug-in for Reflector or JustDecompile. Reflexil is able to manipulate IL code and save the modified assemblies to disk. Reflexil also supports "on-the-fly" C#/VB.NET code injection.
22 Apr 2013 by DinoRondelly
This will show you how to query the database,http://social.msdn.microsoft.com/Forums/en-US/vbide/thread/e4344a25-93e5-40d4-a97d-c5ee0b573577/[^]And this will show you how to bind the results to your combo box,http://vb.net-informations.com/dataset/bind-combobox.htm[^]
22 Apr 2013 by Polarfuze
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged Dim str As String str = "Select Datee From Schedules Where BusID = '" + ComboBox1.SelectedValue + "' " con.Open() End...
17 Apr 2013 by Johnny J.
Adaption of pdoxtrader's codePublic Function BusIdExists(ByVal busid As String) As Boolean Dim thisSql As String = "SELECT Count(*) FROM [yourtable] WHERE busid=@busid" Dim rowCount As Integer ' Get the list of rows with that busid Using conn As New...
17 Apr 2013 by pdoxtader
You could use this function:Public Function BusIdExists(ByVal busid As String) As Boolean Dim theTable As DataTable = New DataTable() Dim thisSql As String = "" ' Prepare our select statement thisSql = "SELECT [some_colume_name] FROM [" & yourdatabase...
16 Apr 2013 by Polarfuze
eg i need to check if busid =5 already exist in the table or not how do i extract data of all the busid field from the database to compare it with the new input i just entered for busid (so that busid is not repeated in the db)
3 Mar 2013 by virajdaw
I want to display the data BEGIN:VCARDVERSION:2.1N:;Mum Orange ;;;FN:Mum OrangeTEL;CELL:763-0912END:VCARD that is stored in xml file in a vb.net datagridview.I want to display the data in format of Name, FirstName, Tel, Cell Any idea, i've been trying to google, but it is giving...
2 Mar 2013 by Maciej Los
Have a look at my previous answers:How to import a V-Card in application mad with vb.Net?[^]Read from vcf file, write to textboxes in a new form..[^]Split is working now to the next step[^]
1 Mar 2013 by virajdaw
How to convert contacts info from xml file in vcard format and display the data in vb.net datagridview.egBEGIN:VCARD VERSION:2.1 N:;Mum Orange ;;; FN:Mum Orange TEL;CELL:7670212 END:VCARD
22 Feb 2013 by Dave Kreskowiak
OK, so you formatted the drive. The question becomes did you do anything else to it, like install an operating system? Did you do more than that??Why an I asking this? Because if you write anything to the drive after you formatted it, you decrease the chances of recovering anything from...
22 Feb 2013 by virajdaw
This site UNIX timestamp to System.DateTime[^] help me to decipher the dates which were in UNIX format.On the above site, it uses seconds, for call date="1359279658478" please use milliseconds,It'll work.Foe example replace dateTime = dateTime.AddSeconds(timestamp);with dateTime =...
21 Feb 2013 by bbirajdar
Try Recuva. It boasts of recovering data from formatted disks.. But remember that the data recovery is not 100% sure , in case of very ideal conditions too. But you must give a try. Its worth that http://www.piriform.com/recuva/features[^]The most important thing is that you should not...
21 Feb 2013 by TRK3
All the times are the same order of magnitude and relatively close to each other, so they aren't actually encrypted. Most likely they are just the total number of some units of time since some origin date.It's either seconds, or milliseconds, since some date.1359279658478...
21 Feb 2013 by virajdaw
- How to decrypt the dates...
20 Feb 2013 by virajdaw
Well through lot of searching, i could get something that could answer the question .Here it goes ... http://www.vbcodesource.info/?p=421[^]
20 Feb 2013 by Shubh Agrahari
Hiiyes it is to difficult to recover file if not recovered by NTFS.....but there is many recover tools and softwares that can help you to achieve your hard work credentials...but in market no one give you confirmation to recover your file....becouse it is not 100% sure...
20 Feb 2013 by virajdaw
How to connect to a drive through a button in vb.net ?I mean, i want to add a button on vb.net form that when pressed, it connects to a removable usb drive like :G then display a message to inform that you are connected to that particular drive.
20 Feb 2013 by Sandeep Mewara
AFAIK, it's gone. If you failed to back them up, you cannot recover them now. Probably, best possible option you have is to create new project and copy the data you have regarding them and rebuild everything.
20 Feb 2013 by Gbenbam
Please how can I recover visual studio project from my formmated hard disk. I recently formated my hard disk because I has some issues with it. I though I had all the valuable files backed up but later found out that I had failed to back up a valuable visual studio project on which I had...
28 Dec 2012 by sbrakl
Explain the basic of Delegate in VB.NET
16 Dec 2012 by Thomas Daniels
Hi,You can use on-the-fly compiling:Compiling .NET code on-the-fly[^]
16 Dec 2012 by sid2x
My question is that how can a VB.NET PROGRAM create exe's ?Suppose in my program i have a button with caption "save as EXE" and when i click thatit saves the form as an executable. I need this for my programming language????Any code for that????You know what's a programming language?...
21 Nov 2012 by richnewman
An article clarifying the various ways of comparing two values for equality in .NET
2 Sep 2012 by D-Kishore
Hi Try like thisprivate void Form4_Load(object sender, EventArgs e) { int Company_Id = 3; Boolean id = Convert.ToBoolean(existCompanyId(Company_Id)); }public int existCompanyId(int Company_Id){ string SQLConnectionStr =...
2 Sep 2012 by Roliking
you can create a function like this and execute the function to get your desired outputcreate function fnCheckExists()returns bitasbegindeclare @val as bit=0;if exists (select yourColumn from yourTable)begin set @val=1;endelsebegin set @val=0;endreturn @valend
2 Sep 2012 by Sharath2790
how to check if a value exists in a DB table and return a Boolean value to variable in vb.net??
31 Aug 2012 by Devang Vaja
You can also convert date by querysql="select *,Convert(char(10),date),103)As date from tabletemp"this will give u date in 'dmy' format
30 Aug 2012 by vijay bisht
dim ds as new dataset dim qry as string = "select * from tabletemp"dim command as sqlcommand = new sqlcommand(qry,connection)dim da as sqldataadapter = new sqldataadapter)command)da.fill(ds,"tabletemp")dim datevariable as stringdatevariable =...
30 Aug 2012 by Aarti Meswania
see, below codedim datevar = dbScalarvalue("select date from tbl where timstampcol=max(timestampcol)")'dbScalarvalue function take query and give result from sql, database connection and all that will manage internally by function.Happy Coding!:)
30 Aug 2012 by Sharath2790
how can i Retrieve date value of last record from a database table and assign it to a variable in vb?? My table has columns like "fact1/fact2/fact3/total/date/timestamp" i'm using sql server as my database..
24 Aug 2012 by Sharath2790
I'm developing a small application which involves sql server and vb for the front end. my tables has timestamp as one of the column. when i write query directly on sql timestamp field can be skipped. But when query is written within the vb app. The query returns a error NOT ENOUGH ARGUMENTS...
24 Aug 2012 by OriginalGriff
Do not concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Use Parametrized queries instead - it will almost certainly cure your problem at the same time!cmd = New SqlCommand("INSERT INTO...
6 Aug 2012 by dawmail333
An example of how to implement and validate non-personal CD-Keys (ideal for distribution on the back of CD cases)
29 May 2012 by Joshi, Rushikesh
Create a customized project template, and let your team use it for repaid development.