Click here to Skip to main content
15,893,588 members
Everything / Programming Languages / Visual Basic 9 (2008)

Visual Basic 9 (2008)

VB9

Great Reads

by CS Rocks
This is a slideshow that works in a Silverlight 3 UserControl.
by CS Rocks
This article demonstrates how to upload a file to a (HTTPS) WebDAV server in VB.NET.
by Abhishek Sur
Gives an introduction of how to create SQL CLR managed objects in SQL server.
by kirkaiya
A very simple, XAML-based month-view calendar that shows appointments, exposes events, and allows dragging appointments in the current month.

Latest Articles

by Richard Atkins
Create a fluid, multi-column, vertically ordered list using nested, floating divs
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
by David Vanson
A progress bar control you can customize

All Articles

Sort by Updated

Visual Basic 9 (2008) 

13 Jul 2023 by Member 15996172
I've got an existing pivot table that performs many calculations within various columns that uses an external data source (.csv file). I would like to programmatically change the source file to another .csv file. I know that I need to create a...
6 Jul 2023 by Andre Oosthuizen
Quote: I know that I need to create a WorkbookConnection, but I haven't had any luck yet finding an example on the web. Not sure what you searched for, I found tons of examples when I searched for vb9 create a WorkbookConnection to a csv...
18 Dec 2022 by Amitkumaryadava
Hello Great Minds ! I am new here. I need to help to create a notepad which has data from data table. I Filled a Data Table dt from data Adapter and Export using string builder. I set Every Column Position Using Padding to fix column width. I am...
18 Dec 2022 by Dave Kreskowiak
First, you're not creating a "notepad". Notepad is an app that edits text files. You're creating a text file in your code. In your code, I don't see you tracking the number of lines you've written to a "page" anywhere. This is not hard to do....
30 Nov 2022 by Marino_Y0301
Hi, Thank you very much for your kind help the other day. Last time I got stuck in the method of outputting in the BSTR structure and passing it to VB, but this time I got stuck in the method of passing it from VB to VC++ as input. I thought I...
30 Nov 2022 by longjmp
hi Marino_Y0301: I checked two projects, but I can't understand how to setting keys. _ Private Shared Function GetDatFromVB(
14 Nov 2022 by Marino_Y0301
Hello, I want to pass a structure between VB (screen (form)) and VC++ (DLL), but it doesn't work... Can i ask for your help? I want to borrow your wisdom, so let me ask you a question. Sorry for my poor English. First of all, it was originally...
14 Nov 2022 by Marino_Y0301
I really appreciate your kindness! As a result, I was able to solve the problem by making the following corrections. <VB (screen (form))> ①API_Refer.vb _ Public Function...
13 Nov 2022 by longjmp
Quote: I think COM will always works well, that is, VB calls a C++ COM method which has only VARIANT/BSTR/base types (SHORT, long, etc.) arguments.
10 Nov 2022 by RickZeeland
Maybe you can try changing the ByRef into ByVal, see example here: Accessing Unmanaged Code from Managed Code[^] For an example of marshalling, see: Passing Strings Between Managed and Unmanaged Code[^] (sadly not in VB.NET but C#) Also note...
22 Jun 2022 by Henry Ancheta
how to change the background of a command button into gradient color using vb.net What I have tried: not found in google and youtube
22 Jun 2022 by RickZeeland
See this CodeProject article: Custom Button Control with Gradient Colors and Extra Image (VB.NET)[^]
8 Apr 2022 by Duke Mitchell
I am writing a custom Windows setup program, and all has gone well to this point. I have working code that allows the program being installed to show in the Windows “Add/Remove Programs window. When I attempt to uninstall the program in the...
8 Apr 2022 by Dave Kreskowiak
Anything under HKEY_LOCAL_MACHINE is not writable by normal users. DO NOT give any users write/modify permissions to anything under HKEY_LOCAL_MACHINE. What you do and how you do it depends on what your installer is doing and is it running as...
12 Sep 2021 by VBeginner.NET
I tried DirectCast(sender, Form).Name (which should say frmA) but this returns the name of the form just loaded (frmB), not the form frmA which called this Form_Load (because of frmB.Show()). Of course, there are ways around it. I can write the...
12 Sep 2021 by OriginalGriff
Basically, you probably shouldn't - it's against the principles of OOPs. If you have two forms: a Parent form which creates and displays a Child form, then OOPs says that the Child should be independent: it should have no idea that the Parent...
16 Aug 2021 by VBeginner.NET
After the splash screen appears and fades away, the main form appears but goes behind some other program's windows like Windows Explorer or Firefox. What do I have to do so that it comes and stays in the front of all other windows? Thanks for any...
16 Aug 2021 by OriginalGriff
You'll have to use user32.dll: c# - How to make a window always stay on top in .Net? - Stack Overflow[^] See the clammum solution - it's not in VB, it's pretty obvious code.
16 Aug 2021 by Richard MacCutchan
You can use the Form.TopMost Property (System.Windows.Forms) | Microsoft Docs[^].
18 Jul 2021 by mostafa barzegar
I wrote a project in vb.net. Can you help me display my favorite forms with the 25 and 2a key combination? example: &i pressed 25 open form1 and i pressed 2a open form2 What I have tried: if e.keycode=keys.numpad2 then if...
17 Jul 2021 by Richard MacCutchan
if e.keycode=keys.numpad2 then if e.keycode=keys.numpad5 then A single keycode cannot equal 2 and also 5 at the same time. You should use a single key value with one or more of the modifier keys (Alt, Ctrl, Shift).
16 May 2021 by Mr.Kim2050
hi all who know how to make datagridview refresh every 2mins without have data duplicate? because i want to write the small program to detect any website live streaming to know the web address isn't online or offline, that why need to make code...
16 May 2021 by OriginalGriff
If you use a DataTable as the DataSource to load the DGV with data,any changes to the datasource will be reflected in the DGV automatically: private DataTable items = new DataTable(); /// /// Called once when form...
15 May 2021 by Mr.Kim2050
Hi all I have a question relate to a code like this, I want to overwrite textfile which data get from Datagridview {Name, Webtype, Statuse, Website URL, Auto} by i want to select only one column "Website URL" all value to overwrite into...
15 May 2021 by OriginalGriff
The actual overwrite is easy: The File class[^] alone contains several methods that will do it, never mind the FileStream class[^]: File.WriteAllBytes(String, Byte[]) Method (System.IO) | Microsoft Docs[^] File.WriteAllLines Method (System.IO) |...
14 May 2021 by Mr.Kim2050
Hi all I have some problem to ask about String.contains. I try to write code in form load to do Binary Read Text File which inside the text file contain name of some website. but when run the program it has problem appear. I really dont know...
14 May 2021 by RickZeeland
You should test your Loadline string variable first before doing any other operations, like this: If String.IsNullOrEmpty(Loadline) Then
14 May 2021 by Patrice T
Quote: Why can't use string.contains The reason is in error message, you need to learn to read carefully. System.NullReferenceException: Object reference not set to an instance of an object. at WindowsApp1.Form1.Form1_Load(Object sender,...
14 May 2021 by Mr.Kim2050
hi all i have one problem with code below, i try to click load to call one textfile load into datagridview by "Line", inside the textfile it has the website URL example www.live.com, i want to using Str() array to compare with function...
14 May 2021 by OriginalGriff
Normally, I wouldn't open a second solution, but this is nothing to do with the original question ... Quote: I try to use String.Contains() like this but when i start to compile the program it show the message error ...
13 May 2021 by OriginalGriff
Have you considered using IndexOf: String.IndexOf Method (System) | Microsoft Docs[^] If it finds it, it returns the index. If it doesn't, it returns -1. Your "code" doesn't do anything except cause a compilation error...
12 May 2021 by Mr.Kim2050
hi all I want to know how to write the code to read the binary text file "MyText.txt" which has few line of data like this, that has two values I want to get it back by separate each values by using ";" and through or using data we get to add...
12 May 2021 by OriginalGriff
Use File.ReadAllLines[^] To read the data. Process each line into separate sections using the string.Split[^] method on teh semicolon. Then you have a choice: either add the items to existing columns of a DGV, or create a "holding class" to hold...
13 Apr 2021 by Shiv Pati Mishra
ERROR: General failure building bootstrapper ERROR: Unrecoverable build error - 0x80004005 What I have tried: I excluded log4net.dll. because it was showing error
13 Apr 2021 by OriginalGriff
As Dave has said, there is nowhere near enough information here for us to begin to help you - we have no idea what you are trying to do, or where you are starting from. Remember that we can't see your screen, access your HDD, or read your mind -...
13 Apr 2021 by Dave Kreskowiak
Using nothing but what you posted, it's impossible for anyone to guess what the hell is going wrong and what you're even doing. You tagged the question as VB9, but gave no explanation whatsoever about what kind of app you're even working on or...
14 Nov 2020 by Vagelisr
Hi to allI have a datagridview, 2 textbox and 1 comboboxIs there any way to check BEFORE insert in datagridview if the 2 textbox and combobox in not nullThanks and regards....
14 Nov 2020 by Member 14945943
I think you could use the datagrid "RowValidting" event: If textbox1.Text is nothing or textbox1.Text = "" (*** Code for manage error ***) e.Cancel = true End if
23 Jun 2020 by Guillermo Perez
The problem is that the item passed by the lambda expression is null... think about this ITEM1 name:Guillermo age:14 ITEM2 name:null age:null ITEM3 name:Jordan age:18 now if I do my where: var x = mylist.Where(w => w.name.Contains("Jor")) ...
23 Jun 2020 by MarqW
I've got a weird problem with some code. If I use this code, it crashes on there custParts.Where(Function(cv), with the error:Delegate to an instance method cannot have null 'this'Dim custParts As CustomerPartNumbers = New CustomerPartNumbers() ' Inherits ComponentModel.BindingList(Of...
19 Nov 2019 by Richard Atkins
Create a fluid, multi-column, vertically ordered list using nested, floating divs
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
1 Apr 2017 by viewsonic12
hi, i have got some problems in MS access 2007.. 1) i cannot send the data which the user key in into the textbox of VB2008. 2) the Access file is not updating 3) how can i know(confirm) that the data has been saved or there is an error in it.. 4) when i insert 'cmd.ExecuteNonQuery()' there...
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
22 May 2016 by Srinath Mishra
I am using VS2008 and crystal report viewer to show crystal report.In the crystal report viewer in the export file option when I try to export the crystal report into PDF file it generates the PDF file successfully.However, the letter language are changes like shipment to shipmenti,...
22 May 2016 by m.r.m.40
Check this out:Crystal Report Displays Strange Characters when Exported to pdfThe exact same problem.
2 Apr 2016 by David Vanson
A progress bar control you can customize
11 Feb 2016 by Jefferson Brown Esquivel
Hello, since i have done making my own All In One file, i would like to make an updater (but i still don't have any idea where to start with ), since i have been using DownloadProgressChanged event as my updater or downloader, what Im trying to do is i would like to separate it from the other...
10 Jan 2016 by David Vanson
Generate you own barcodes for your business, Promotional items or to share links with friends.
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...
2 Nov 2015 by icemanind
16 Sep 2015 by Member 3282487
1. frmChild.TopLevel = False2. frmChild.Dock=DockStyle.Fill2. panel.controls.add(frmChild)
18 Jun 2015 by Dave Kreskowiak
You problem is that you paint on the Panel only once. Once you scroll the Panel over, everything you painted is lost. You have to do the painting of the Panel in the Panels Paint event. Every time the Panel is scrolled or another window is passed over your panel you will lose everything you...
18 Jun 2015 by Sergey Alexandrovich Kryukov
You cannot "contain a FillRectangle"; this is not a stationary object. You can render rectangle using System.Drawing.Graphics.FillRectangle, but it happens in response to Paint event.First, scrolling. For scrolling, you can have your control where you render graphics inside some scrollable...
18 Jun 2015 by rudy-peto
I already create 2 panel in Form, which Panel1 is set to Auto Scroll. Panel2 is inside Panel1 and contain a Fill Rectangle which is set with Timer so it looks like a progress bar. The problem is, when i scroll Panel1 to right, yes.. it scrolled to right but when I scroll it back to left, the...
18 Jun 2015 by Ralf Meier
I don't understand completly what you want to do ... but I would do the following :You create your own Control.This Control inherits from Panel (if you wish - I would take Control).Inside this Control you integrate the Timer.Inside this Control you override the OnPaint-method. This...
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
6 Nov 2014 by Member 8542002
Thanks Sergey for your reply. It looks like I need to do far more research than I have done so far it understand the connection between the XAML code and the code behind as it pertains to FlowDocuments. If you know of a good paper or article that gives an example of how to creates...
5 Nov 2014 by Sergey Alexandrovich Kryukov
It's hard to understand the question and where your confusion is. Probably, this is just general understanding of what XAML does in principle.First, look at this: Essentially, during...
5 Nov 2014 by Member 8542002
Hi,I am using Visual Studio 2008, VB9. I have created a FlowDocument in XAML that, when it is run, requires VB code behind to fill in answers to questions I have hard coded with XAML in the FlowDocument. For instance, the FlowDocument displays a list of question...
23 Jun 2014 by Jafarinejadvazifehkhorani
as guys said go to this linkhttp://www.connectionstrings.com/sql-server-compact/[^]it seems that you need to use following lines to get the right db connection stringstring StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);string...
23 Jun 2014 by OriginalGriff
Try setting up a connection in VS with the Server Explorer pane:1) Open Server Explorer.2) Right click "Data connections" and select "Add connection"3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.4)...
23 Jun 2014 by Heba Kamel
how can i make connection string with .sdf databasethis is my connection string but it doesn't work" Data Source = 'Database1.sdf';"
10 Jun 2014 by a_pess
Build a standard Windows Forms translucent control using GDI+ & VB.NET
2 Jun 2014 by siglr2
Event-based, generic wrapper and manager to implement multithreading in your applications
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.
24 Feb 2014 by Sergey Alexandrovich Kryukov
If you started some process in your code, you can capture the even when it is stopped, but, normally, you would need to handle it in a separate thread. This is not very expensive even if you want to track several external processes requiring a separate tracking thread per process, because most...
24 Feb 2014 by Ravimcts
I have some windows application .exe which are run in my Domain server, i have a problem that if the .exe is stooped how can i get the notification that the .exe has stooped.is there any solution thru i can manipulate my code with operating system and get notification thru mail or any other...
13 Feb 2014 by Mik Wadstrom
Simple way to use Crystal reports as embedded dynamic printable reports
11 Feb 2014 by Member 10590205
the data comes from datagridview, I guess I already state it up there on "I'm trying to save the data from VB (I wrote them on DataGrid)" partthe link you give me use textbox, I need the one that use datagridview, thanks for answering :)
11 Feb 2014 by Karen Mitchelle
since you didn't specify where the data will come from (e.g. textboxes or datagridview), I suggest that you go here[+]..Maybe that would help. :)
11 Feb 2014 by Member 10590205
I'm trying to save the data from VB (I wrote them on DataGrid) to Ms Access, can anyone tell me how to code it?and some time ago, I tried reading data from Access and displaying them to DataGrid on VB6.0, I was wondering if I can use the same method on VB9.0 (VB2008)
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.
13 Jan 2014 by amit_83
Hi Javed, I need to do the same as you expect. If you found a solution, then can you help me here, How did you resolve your issue?
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...
26 Nov 2013 by martene
The word "Focus" means that a particular control (e.g. a textbox) is in focus or not. When a user clicks on/in a control like textbox then this control gets all the input (through the keyboard) from the user. When a user presses the TAB button on the keyboard like we do all the time filling up...
26 Nov 2013 by Anupama Rhiyas
Anybody Tell Me.What is the (Focus) code in vb.net?i want to know about meaning of (Focus) Code in Vb.net.Please Help Me?
10 Nov 2013 by Lucsroy
Try this code let me know if it works.Private Sub DGVStocksMaster_CellFormatting(sender As Object, e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DGVStocksMaster.CellFormatting If Not IsNothing(e.Value) Then If e.ColumnIndex().ToString = 6 And...
11 Oct 2013 by heemanshubhalla
How to use Masked Textbox control in .NET
19 Sep 2013 by Ron Schuler
ASP.NET PDF document viewer control that does not require any Acrobat product to be installed
13 Sep 2013 by basurajkumbhar
you can use the google gadgets .to show google gadgets you can use the web browser control in vb.net for your windows base application.
13 Sep 2013 by Lalit Narayan Jadhav
Here is available code which help me to do project of jwellery shop management system Gadget to Fetch Today's Gold Rates (India) using C# language [^]
5 Sep 2013 by Mike Meinz
Function returns exe name and command line for the provided filename and extension.
3 Sep 2013 by karenpayne
Using newer conventions of coding in VS2010 and higher
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"[^].
20 Jul 2013 by Jeremy Lewis
I made a program to record audio from the line input of my soundcard using vb 2008. I've got the bitspersample set to 16. The samplespersec set 44100. Channels is set to 1 for mono. All that works just fine. But the kbps are very low. 88kbps for the last one I recorded. If I put that file in...
15 Jun 2013 by antonache_radu@yahoo.com
URI must include a filename at the end: ftp://filetransfer/testarea/cms/support/download/stmt/TEST.XSL
11 Jun 2013 by PrasathPalanivel
There are multiple ways to export excel1. ClosedXML2. Write a extension method to export excelusing System;using System.Collections.Generic;using System.Linq;using Excel = Microsoft.Office.Interop.Excel;using System.Data;using System.Data.OleDb;DataTable dt;// fill...
11 Jun 2013 by Am Gayathri
I have created one windows application using VB.net. i wanna export some result in to excel.How can i export data in to excel from a datatable in VB.net? please give me the code.
11 Jun 2013 by Prasad_Kulkarni
Export to Excel using VB.Net[^]Fast Exporting from DataSet to Excel[^]..and more threads here[^]
11 Jun 2013 by Rob Philpott
It's not ideal but the easy way to do it is to create a temporary CSV file and then shell out to Excel using that.If you want something 'better' - i.e. that creates excel files a third-party library would be the way to go, although there is also this: Using C# to Create an Excel Document[^]