Click here to Skip to main content
16,005,162 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionlistbox inconsistency Pin
Tim Kredlo5-Dec-09 22:23
Tim Kredlo5-Dec-09 22:23 
AnswerRe: listbox inconsistency Pin
Luc Pattyn6-Dec-09 1:23
sitebuilderLuc Pattyn6-Dec-09 1:23 
GeneralRe: listbox inconsistency Pin
Tim Kredlo6-Dec-09 7:41
Tim Kredlo6-Dec-09 7:41 
GeneralRe: listbox inconsistency Pin
Luc Pattyn6-Dec-09 7:59
sitebuilderLuc Pattyn6-Dec-09 7:59 
GeneralRe: listbox inconsistency Pin
Tim Kredlo6-Dec-09 8:41
Tim Kredlo6-Dec-09 8:41 
GeneralRe: listbox inconsistency Pin
Luc Pattyn6-Dec-09 8:46
sitebuilderLuc Pattyn6-Dec-09 8:46 
GeneralRe: listbox inconsistency Pin
Tim Kredlo6-Dec-09 9:00
Tim Kredlo6-Dec-09 9:00 
GeneralRe: listbox inconsistency Pin
Luc Pattyn6-Dec-09 9:15
sitebuilderLuc Pattyn6-Dec-09 9:15 
if you use Visual Studio
if you have the solution pane open
if you have ever clicked the "show all files" button
if your form happens to be called Form1
if you used Visual Designer to add a first ListBox and a second ListBox
and if you did change their default names to lstCode1 and lstCode2

then you will have a file called "Form1.Designer.vb" (that is where Visual Designer stores all the things you do graphically when designing Form1), in which you will find both these lines:
Me.lstCode1 = New System.Windows.Forms.ListBox
Me.lstCode2 = New System.Windows.Forms.ListBox

which is fine, and allows you to then do things with lstCode1 and lstCode2 as you did in the code you showed earlier.

And if you keep adding and removing ListBoxes with all kinds of names and changing code files without really understanding what you are doing, then you are likely to get variables that never get assigned an object to, so your code would fail.

I suggest you buy and study a book on VB.NET and start looking around inside your test projects.

Hmmm | :|

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


GeneralRe: listbox inconsistency Pin
Tim Kredlo6-Dec-09 10:52
Tim Kredlo6-Dec-09 10:52 
QuestionReplace function in vb6 with MS Access using adodb.recordset Pin
Tufail Ahmad4-Dec-09 18:16
Tufail Ahmad4-Dec-09 18:16 
AnswerRe: Replace function in vb6 with MS Access using adodb.recordset Pin
Luc Pattyn5-Dec-09 2:46
sitebuilderLuc Pattyn5-Dec-09 2:46 
QuestionShould I have to explicity create a dataset even it is already defined in design time? Pin
JUNEYT4-Dec-09 11:43
JUNEYT4-Dec-09 11:43 
AnswerRe: Should I have to explicity create a dataset even it is already defined in design time? Pin
T21024-Dec-09 12:46
T21024-Dec-09 12:46 
QuestionCustom Events Pin
#realJSOP4-Dec-09 0:29
professional#realJSOP4-Dec-09 0:29 
AnswerRe: Custom Events Pin
Geoff Williams4-Dec-09 1:23
Geoff Williams4-Dec-09 1:23 
AnswerRe: Custom Events Pin
Dave Kreskowiak4-Dec-09 3:40
mveDave Kreskowiak4-Dec-09 3:40 
QuestionCheck file infection by CRC32 Pin
Gagan.203-Dec-09 23:04
Gagan.203-Dec-09 23:04 
AnswerRe: Check file infection by CRC32 Pin
David Skelly3-Dec-09 23:19
David Skelly3-Dec-09 23:19 
GeneralRe: Check file infection by CRC32 Pin
Gagan.204-Dec-09 5:05
Gagan.204-Dec-09 5:05 
GeneralRe: Check file infection by CRC32 Pin
Dave Kreskowiak4-Dec-09 5:34
mveDave Kreskowiak4-Dec-09 5:34 
GeneralRe: Check file infection by CRC32 Pin
David Skelly4-Dec-09 6:14
David Skelly4-Dec-09 6:14 
AnswerRe: Check file infection by CRC32 Pin
Gagan.204-Dec-09 14:56
Gagan.204-Dec-09 14:56 
QuestionPivotTable Strategery Pin
Bomb_shell3-Dec-09 11:31
Bomb_shell3-Dec-09 11:31 
AnswerRe: PivotTable Strategery Pin
freakyit4-Dec-09 4:06
freakyit4-Dec-09 4:06 
GeneralRe: PivotTable Strategery Pin
Bomb_shell10-Dec-09 5:20
Bomb_shell10-Dec-09 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.