Click here to Skip to main content
15,885,244 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 Score

Visual Basic 9 (2008) 

6 Oct 2009 by CS Rocks
This is a slideshow that works in a Silverlight 3 UserControl.
14 May 2009 by CS Rocks
This article demonstrates how to upload a file to a (HTTPS) WebDAV server in VB.NET.
2 Aug 2009 by Abhishek Sur
Gives an introduction of how to create SQL CLR managed objects in SQL server.
21 Aug 2009 by kirkaiya
A very simple, XAML-based month-view calendar that shows appointments, exposes events, and allows dragging appointments in the current month.
22 Mar 2013 by Terence Wallace
TexasQuest is a 2D side scroller platform game similiar to Super Mario
7 Jan 2008 by S.SRIVATHSAN
Implementation Nhibernate concept in VB.NET
21 Apr 2010 by Rama Krishna Vavilala
A Microsoft tool named RegMaid does the same thing as what you want to do. The nice thing is that it comes with the full C++ source code. As you can see there is lot involved in removing ActiveX controls (CLSID, AppID, Interfaces, Typelibs etc). Download the tool and the source code...
29 Aug 2009 by _Khallaf
How To Do Precise 2-Way Rijndael CryptoStream Communication
26 Aug 2009 by Martin Hinshelwood
WPF drag and drop behaviour
22 Feb 2011 by Nish Nishant
Here's a quickly put together example:static void Main(){ Console.WriteLine(GetString(20));}static Random rand = new Random();private static char GetRandomChar(){ return (char)rand.Next('a', 'z');}private static string GetString(int length){ StringBuilder...
19 Nov 2010 by Abhinav S
Try setting Cancel = True in the Closing event to prevent the form from unloading.
7 Apr 2011 by #realJSOP
Because even though you're calling the Fill_Combo_Box method, you're not actually using it's returned object in the calling method. You probably want this:Dim myData as OleDbDataReader = Fill_Combo_Box(Cmb_Line_ID_SQL)Not only that, but the method in question doesn't have a return...
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...
11 Sep 2016 by Avatar2400
This is a simple class that allows you to have message box with checkbox and other small features.
26 Jan 2011 by Abhinav S
Yes - this[^] might help you.
18 May 2011 by Karwa_Vivek
As Per me This Must Be a Simple TaskAccording to what I understand about Your NeedTry This and Please Get Me know your Feedback.Let us Suppose Form1 is your Support Form ContainingThe dataGridview having the Related DataAnd Form2 be Your main Form Containing the TextBoxInside...
28 Jan 2012 by OriginalGriff
You should not include SQL Server in your installation. There are a couple of reasons:0) You can only distribute SQL Server Express for copyright reasons - not SQL Server full version.1) They may already have SQL Server installed on the network. If so, then they will presumably want to use...
30 Jan 2012 by Manfred Rudolf Bihy
If the user has the right to change the systems date and time there is no easy solution for you. You could of course try to detect if such a change was made, but that will not help you in correcting it.Here are two solutions to your problem:If the computer has access to the internet you...
4 Jul 2012 by JF2015
Did you read the Wikepedia entry on SFTP?http://en.wikipedia.org/wiki/Simple_File_Transfer_Protocol[^]Here is a library that should allow you access to a SFTP server:http://www.tamirgal.com/blog/page/SharpSSH.aspx[^]
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"[^].
11 Oct 2013 by heemanshubhalla
How to use Masked Textbox control in .NET
22 Dec 2009 by Christian Graus
you have given us a list of things you want. You are not asking for help, you're asking for basic research and/or your work done for you. There is a cryptography namespace in .NET. If that doesn't contain what you require, then you need to read up on these algorithms and impliment them...
24 Apr 2010 by Abhinav S
By record video, do you mean a screen capture utility?You could record screen image captures[^] and then combine them to form an avi video easily.
24 May 2010 by William Winner
If you're using vb 2008 express, then you're using VB.NET. With that in mind, you should be using a FileStream to write and read files, not My.Computer.FileSystem.see here[^].
18 Aug 2010 by Fredrik Bornander
Something like this might solve it for you:Imports System.IOModule Module1 Sub Recurse(ByVal directory As DirectoryInfo, ByVal resultList As List(Of FileInfo)) resultList.AddRange(directory.GetFiles()) For Each subDirectory As DirectoryInfo In...
3 Nov 2010 by Simon_Whale
use Crystal reports but the data source would be a dataset that you pass to it.have a look at this example[^]
6 Nov 2010 by Dalek Dave
Assuming you have created a textbox to accept a number, you need to just multiply that number by 0.035.Somthing like this would do it.Public Class Form1 Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged ...
22 Feb 2011 by Henry Minute
There are several ways to do what you want, which would be easier/quicker will depend on how long the largest string you need to process is.You could declare a string variable and instantiate it with garbage characters. Dim garbage As String =...
16 Mar 2011 by #realJSOP
Yes, you can write a plugin framework in andy .Net language. Try googling ".net plugin framework" and look through the 285,000 results that search will return. There are even some CodeProject articles on the first page of results.
7 Apr 2011 by Marc A. Brown
Oh, I shudder to look at this. You've got a function (Fill_Combo_Box) that doesn't have a return type. And you're taking advantage of that by returning an OleDbDataReader on success and by returning a number on failure. To make matters worse, you're not capturing the return value when you call...
29 Oct 2011 by Not Active
What would be the point in storing passwords in an external text file? You might as well just use a sticky note attached to your monitor.Just attempt to make the connection using the provided credentials. If they are wrong it will fail and you can handle the exception.
1 Dec 2011 by Sergey Alexandrovich Kryukov
First of all, do you know that one can install .NET Framework v.4.0 on any system where v.3.5 can be installed; and I don't see any reason for not doing it. (This is v.4.5 which cannot be installed on XP.)However, you can re-target your projects to any version starting from v.2.0 (the .NET...
30 Jan 2012 by devbtl
try this link..http://nickstips.wordpress.com/2010/02/12/c-get-nist-internet-time/[^]
10 Feb 2012 by BobJanova
Find a service which provides this information (if you want the latest information you might have to pay, there is usually free service available for slightly delayed data), and then write against its API. That will probably contain a service method to get the data for a particular...
1 Mar 2012 by OriginalGriff
See here: Create a Desktop shortcut[^]
6 Mar 2012 by Jyothikarthik_N
Alan,1. Add reference to System.Configuration2. Replace AppSettings("key") with ConfigurationManager.AppSettings("Key")*Mark as answer if this solves your query.
29 Mar 2012 by OriginalGriff
Three possibilities:1) You forgot to copy the myproject.vbproj file2) You don't have Visual Studio installed on the other machine3) The version of VS on the other machine is earlier than that on your machine and the files are not compatible.
3 Apr 2012 by OriginalGriff
Yes.The other alternative is to try something like SharpZipLib and roll your own app round it - but if this is an infrequent thing, then zip would probably be good enough.They do a trial version, but the full job is not expensive. The only thing to look for is that the later version can...
20 May 2012 by Prasad_Kulkarni
Please refer: LINQ To SQL Samples - INSERT/UPDATE/DELETE[^]LINQ to SQL Samples[^]A CP Article: Using LINQ to SQL in Visual Basic[^]
5 Jul 2012 by Prasad_Kulkarni
Refer: Export to Excel using VB.Net[^]and Google too[^]
5 Sep 2012 by Kuthuparakkal
Dim links As Object = (From item In xroot.Element("channel").Descendants("item") Select New YouTubeInfo() With { _ .LinkUrl = item.Element("link").Value, _ .EmbedUrl = GetEmbedUrlFromLink(item.Element("link").Value), _ .ThumbNailUrl = GetThumbNailUrlFromLink(item)...
14 Feb 2013 by Asim Mahmood
try thishttp://stackoverflow.com/questions/9905900/finding-out-input-devices-connected-to-the-system-through-an-asp-net-webpage[^][]
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...
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...
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...
14 Aug 2008 by Yasser M. Jaffal
In this article, I discuss an example of how you can use information retrieval to grab data out of MSN Money pages to get a free Web Service for currency exchange rates and other quotes.
5 Apr 2009 by Richard A. Dalton
Part two of a four part series of articles on the Specification Design Pattern.
5 Apr 2009 by Richard A. Dalton
Part three of a four part series of articles on the Specification Design Pattern.
21 Aug 2009 by Martin Hinshelwood
I am always pulling out the Unity assemblies. Maybe it is just because I am lazy, but I really can’t be bothered rolling my own dependency injection and mapping framework!
26 Nov 2009 by Christian Graus
Why do you have to do this ? In what context ? For what purpose ? What experience do you have that makes you someone who is able to achieve this ? How long do you have ?
27 Nov 2009 by Christian Graus
Use WPF, it does it automatically. Of course, it's just going to call the database and ask for the data, which is what Fill does. There's no magic way to get data from the DB without calling it, no.
15 May 2012 by gabrieldd
I'm trying to set up a Midi application. I've got a MID-Form and some other forms which should show up as children.But Calling the show() method (after setting childform.mdiparent to the Mid-Form) does not result in the desired effect. They show modal/ as popup.If I just instance a blank...
27 Nov 2009 by mikehilton
Is there a simple way to dynamically update a dataset from either an SQL or Access database without constantly invoking the Fill method?My application needs to merely display data from a database that is constantly being updated from a completely separate application. Several of my controls...
28 Nov 2009 by DaveAuld
I just created a windows forms project. Added an MDIForm, and 2 forms, dropped a button on the MDI surface and in the click event for the button did the following; Dim form1 As New Form1 form1.Show() Dim Form2 As New Form2 Form2.MdiParent = Me ...
29 Nov 2009 by gabrieldd
Hi,I finally found the error...I created an instance of Form2 (lets say _F2), but I did not set the instances (_F2) property MDIparent to Form1, but Form2's property (class itself). VB did not throw an exeption and it took me a while until I discovered the mistping.However,thanks a...
18 Dec 2009 by Christian Graus
OK, I still don't see what you're trying to do. What is winsock1 ? Why is it trying to find talk.google.com ? Is that just a check if the computer is online ? Of course, your connect button code is not going to run until you click it, and your winsock = 1 code will run before that. This...
3 Jan 2010 by Christian Graus
You should consider things like1 - do the people who have the problem all come from the same country, and can you reproduce it by setting your PC to the same locale as those people ( for example, it could be an issue created by code that assumes a certain time, date or currency format )2...
4 Apr 2010 by Eugene Sichkar
Actually .net 3.5 have non-repeatable collection class - HashSet class and ISet interface.
15 Apr 2010 by Paulo Morgado
Getting Interface Property Implementations
24 Apr 2010 by Rod Kemp
It would appear you want to use command line arguments in your application, to get the values passed for a win form application you can use;For Each arg As String In Environment.GetCommandLineArgs() 'Do something here if the command you want is found.Next argFor a console...
7 Jul 2010 by alrosan
Module Module1 Dim cnt As Integer Sub Main() cnt = 0 Console.WriteLine(CountFiles()) Console.Read() End Sub Function CountFiles(Optional ByVal dri As String = "C:\", Optional ByVal subDir As Boolean = True) As Integer On Error Resume...
8 Jul 2010 by idenizeni
Ok, I found your solution, your drive string contains 'C:' you need to append the '\' to it. Dim drive As String = Path.GetPathRoot(System.Environment.ExpandEnvironmentVariables("%SystemDrive%")) & "\"Dim counter3 As System.Collections.ObjectModel.ReadOnlyCollection(Of String)counter3 =...
23 Aug 2010 by Dave Kreskowiak
Scrap the VB6 interop code and just re-write it using the Registry class built into .NET. You'll probably end up writing code that's 1/4th size of the VB6 equivilent.
13 Sep 2010 by jebberwocky
there is no Chinese character in "Arial" try "arial unicode ms"
3 Nov 2010 by jonijoni
Hello.I'm programming in Visual Basic 2008. I need to make a report, with its header, body and foot, and with graphics and matrix with data (NOT data base tables).The challenge, is to make a report WITHOUT using data source. The data, are provided by an insternal calculation proccess...
6 Nov 2010 by dmageiras
try: r = 0.01*3.5*number
17 Nov 2010 by Dave Kreskowiak
My bad, it's actually DirectoryInfo and it's GetFiles method. Dim rootFolder As DirectoryInfo("C:\somePath") Dim txtFiles() As FileInfo txtFiles = rootFolder.GetFiles("*.txt")Then it's a simple matter of enumerating over the txtFiles collection and adding up the Length...
18 Nov 2010 by #realJSOP
Try putting each group of textboxes into their own groupbox, and enable/disable the groupbox. If that doesn't work, put the textboxes into a groupbox, and then when you need to enable/disable the textboxes in a given groupbiox, just iterate through the child controls of the groupbox.
18 Nov 2010 by Henry Minute
As a possible alternative to John's answer, you might consider using the DataRepeater control from VB PowerPacks 3.0[^]. This would allow you to have a less cluttered form as the input controls for additional techs would only appear when they are needed.
20 Nov 2010 by Tarun Mangukiya
Hi! I have the solution of this ProblemUse This Code : Private Sub FrmMDI_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Dim Flag As Integer Flag = (MsgBox("Are you sure you want to exit ? ", vbInformation +...
8 Dec 2010 by Cedric Moonen
Honnestly, if you don't explain what the problem is, we won't be able to answer... What is going wrong ? Do you have an error message ? If yes, paste it here with a description on when it occurs.
29 Dec 2010 by #realJSOP
You mean you want to have your application phone home when the usr enters his new code, AND you want that code. Please tell me what software you wrote that does this, because I want to specifically avoid using it on one of my systems.That practice is bad beyond description.
29 Dec 2010 by pd2ebh
Hi,This is not for a Phone but for a PLC controller.i have a safety written in the PLC as well "in Structured text" if someone will stole this device he cannot use this. in this case we can check now if al are ok.The small application i wrote in vb for windows os works like...
11 Jan 2011 by Espen Harlinn
Everything works in test envirenment? If that's the case then the problem is probably related to communication media, radio or cable?Cable can be shielded, radio is a "well known problem", easily solved by using industrial grade equipment, but usually way more expensive.Depending on...
11 Jan 2011 by LittleYellowBird
Hi,EMC Testing is a real pain!If your external hardware (at the end of your USB cable) has crashed and has no watchdog or similar to reset, I think there is little you can do at the PC end. If it is powered by the USB then it maybe be possible to remove the power and cause a reset, but...
15 Jan 2011 by Espen Harlinn
Use the browsers "View Source" functionality, It'll enable you to figure out how to extract the required information.RegardsEspen Harlinn
15 Jan 2011 by Estys
That's called page-scraping.See this project :CP Vanity[^]It scrapes some pages of CP because there's no webservice in place to get the data in a formalized way.
1 Mar 2011 by Gregory Gadow
Executable files can be placed anywhere, so searching in Program Files is probably not going to work all the time. And the registry is iffy: even if you know where major browsers currently store data, there is no guarantee that future versions will put data in the same location, or that browsers...
24 Mar 2011 by Dave Kreskowiak
If your trying to wire up the Click event for a button you just created in code, look into AddHandler[^]. If you're trying to remove the handler and replace it with something else, you'll also need RemoveHandler.
24 Mar 2011 by Dave Kreskowiak
You should have posted a new question for this. The method you wire the MouseUp event to must match exactly, the header for the event. Why are you wiring MouseUp instead of Click??
11 Apr 2011 by #realJSOP
Try this:Dim data As String = ""For i = 1 To myData.FieldCount() - 1 data = "" if (Not myData.IsDBNull(i) Then data = myData(i).ToString() lv.SubItems.Add(data)Next
15 Apr 2011 by Kschuler
You could try this in your SQL:SELECT LEFT(code & ' ', 11) as code, description FROM myFileIt concats eleven spaces to the end of the code, then grabs the first eleven characters of that string. So basically It's a pad right.---- Added ----For this to work, you'll need to...
15 Apr 2011 by Dylan Morley
Letter spacing (as you mentioned, letters such as m and w) are always going to be an issue. You can tackle this in a couple of ways - use a monospaced font as mentioned by Kschuler or you could have your comobo box display multiple columnsThere are a few articles on codeproject that show...
18 Apr 2011 by ankitjoshi24
I hope the following code helps: -frm_load()comboControl = New ComboBox() comboControl.Cursor = System.Windows.Forms.Cursors.Arrow comboControl.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown comboControl.Dock = DockStyle.Fill ...
20 Apr 2011 by Nish Nishant
If the Access file in in C:\, then why would you want to change this path? Or do you mean you want to copy the file elsewhere and then access it from there? If so, just copy the file over and set your connection string accordingly. If there's somethign I missed in your rather vaguely phrased...
21 Apr 2011 by Henry Minute
Your question is not entirely clear but from what I can understand you may need to handle the DataGridView.DefaultValuesNeeded[^] event.
21 Apr 2011 by Gandalf_TheWhite
Your question is not that much clear but what I think is you want to Bind the Grid with the default values you get from database.For that you have to assign your Data source to the DataGrid's bind property. Follow this link for more reference....
21 Apr 2011 by Vagelisr
First of all Gandalf Thanks for your time.So I have a datagridview that fill from one table from access.In my datagridview i want to show 7 of me fields. (Totaly i have 9 fields)In one of them i want to put a number that calculate before save and the other put the system date and...
25 Apr 2011 by That's Aragon
This[^] may help you.It has the example with the source code. Hope it would be helpful to you for understanding the operations related to the grid. Additionally it includes paging also.
27 Apr 2011 by Smitha Nishant
This related thread may help you:http://social.msdn.microsoft.com/forums/en-US/winforms/thread/b7e87240-43cf-426c-bbda-0a9ef572f063/[^]
25 May 2011 by Simon_Whale
why not just create a custom handler for all the textboxes? addhandler textbox1.textchanged, addressof textchangedhandler addhandler textbox2.textchanged, addressof textchangedhandler .... 'add additional textbox handlers .... addhandler textbox7.textchanged, addressof...
5 Jul 2011 by Dave Kreskowiak
Guy...you've asked a ton of questions on the same subject, all for a thesis. If you can't do your own research, you're going to fail this project, badly.You have to know not just your own project inside and out, but all the research surrounding it. Like, why did you didn't take this route...
5 Jul 2011 by Christian Graus
Just to add to Dave's comment, there's source code to do all this, easily found with google. So if you can't use google, what are the odds that you deserve to pass your course ? You need to do more than google and reuse code, you need to understand how it works, or you will fail.
12 Jul 2011 by SamFad
Assuming you have a table called ‘NextNumber’ where you store your incremental number. Assume your table has the following fields(columns) ("DocPrefix","YearPrefix","MonthPrefix","NextNo","mCounter")you can try this code segments:‘Public Function GetNextAutoNo() As String Dim...
30 Jul 2011 by Abhinav S
I just went to the Infragistics Ultragrid site and came up with this.[^]I also came up with this[^].Maybe if you look around the Infragistics website you will find it.
20 Aug 2011 by OriginalGriff
1) Open your projects Properties in the solution explorer, and double click on "Settings.settings"2) In the resulting grid, change the Name to "MySetting", and set the Value to "Defaulted value". Leave Type and Scope as "string" and "User" respectively.3) Save and close the settings...
1 Sep 2011 by Bun Leap_kh
Did you mean you want your application display in full screen?If like this, change some properties of your form like this:- WindowState: WindowState.Maximized- FormBorderStyle: NoneThen your form will appear in full screen.
4 Sep 2011 by Sergey Alexandrovich Kryukov
This is quite possible (you need to get an instance of the Graphics of the picture and draw on it), but makes no sense. Instead, you can more easily draw on a custom Control, including Form or Panel. The class PictureBox won't add any useful functionality to it, will only create some hassles and...
25 Sep 2011 by Muralikrishna8811
Hi, yeah you can maintain single javascript function for multiple ascx filesbut you've to maintain different ids for controls used in ascx control