Click here to Skip to main content
16,010,392 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: DateTimePicker - VB Pin
Dave Kreskowiak14-Mar-08 7:56
mveDave Kreskowiak14-Mar-08 7:56 
GeneralRe: DateTimePicker - VB Pin
Mycroft Holmes15-Mar-08 22:02
professionalMycroft Holmes15-Mar-08 22:02 
QuestionHow to Call Function of vb.net whose name stored in Database? Pin
Guru_yogi14-Mar-08 0:09
Guru_yogi14-Mar-08 0:09 
AnswerRe: How to Call Function of vb.net whose name stored in Database? Pin
Colin Angus Mackay14-Mar-08 1:08
Colin Angus Mackay14-Mar-08 1:08 
AnswerRe: How to Call Function of vb.net whose name stored in Database? Pin
AshokPatra14-Mar-08 2:16
AshokPatra14-Mar-08 2:16 
AnswerRe: How to Call Function of vb.net whose name stored in Database? Pin
akash_omsairam14-Mar-08 8:06
akash_omsairam14-Mar-08 8:06 
GeneralRe: How to Call Function of vb.net whose name stored in Database? Pin
Dave Kreskowiak14-Mar-08 9:06
mveDave Kreskowiak14-Mar-08 9:06 
GeneralPopulate ComboBox Using BackGroundWorker... Pin
Member 364986413-Mar-08 23:42
Member 364986413-Mar-08 23:42 
I am using BackGroundWorker to Fill my DataSets And Create DataTables and it works fine. A little marque ProgressBar shows while it's processing for around 30 or 40 seconds and then the form pops up all nicely populated.

My problem is this. I would like to go one step furthor and populate my ComboBoxs. I have about 7 or 8 ComboBoxs on my form and a couple hold quite a bit of data. (One requires over 4,000 names from a SQL database and another holds some 11,000 license plate numbers). When I try to "Add.Item" to my ComboBoxs in my thread I get a CrossThreading error. I do realize why this error occurs and I'm OK with that. The problem I'm having is coding the work-around. In this case using the InvokeRequired. Here is a brief example of what I have that is working...

Imports System.ComponentModel
Imports System.Threading

Private Handler_DoWork As DoWorkEventHandler
Private Handler_Completed As RunWorkerCompletedEventHandler

Private Sub Parking_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AddHandler BackgroundWorker.DoWork, Handler_DoWork
AddHandler BackgroundWorker.RunWorkerCompleted, Handler_Completed
BackgroundWorker.RunWorkerAsync()
End Sub

Private Sub BackgroundWorker_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs) Handles BackgroundWorker.DoWork
Call LoadComboBoxes()
End Sub

Private Sub LoadComboBoxes()
<<<<< Fill DataSets >>>>>>
<<<<<< Fill DataTables >>>>>>

******** I am trying to add the following ********
Dim Counter As Integer
For Counter = 0 To Me.ParkingDataSet.Officers.Rows.Count - 1
cboIssuedByKey.Items.Add(Me.ParkingDataSet.Officers.Rows(Counter)("OfficerID"))
Next
******************************************************
End Sub

I've looked at InvokeRequired and Delegate Sub and I am lost as to how to make these work. Any help on the would really help. Thank you...
AnswerRe: Populate ComboBox Using BackGroundWorker... Pin
Chinners14-Mar-08 0:57
Chinners14-Mar-08 0:57 
QuestionRadnom pick from a enumeration? Pin
Benny_Lava13-Mar-08 20:33
Benny_Lava13-Mar-08 20:33 
GeneralRe: Radnom pick from a enumeration? Pin
darkelv13-Mar-08 21:39
darkelv13-Mar-08 21:39 
GeneralMulti pages in a single crystal report in vb.net Pin
r_mohd13-Mar-08 19:49
r_mohd13-Mar-08 19:49 
GeneralRe: Multi pages in a single crystal report in vb.net Pin
Dave Kreskowiak14-Mar-08 8:16
mveDave Kreskowiak14-Mar-08 8:16 
GeneralRe: Multi pages in a single crystal report in vb.net Pin
r_mohd14-Mar-08 23:12
r_mohd14-Mar-08 23:12 
GeneralRe: Multi pages in a single crystal report in vb.net Pin
Mycroft Holmes15-Mar-08 22:07
professionalMycroft Holmes15-Mar-08 22:07 
Questionhow to show LONG column in datagrid vb.net Pin
jomet13-Mar-08 19:18
jomet13-Mar-08 19:18 
AnswerRe: how to show LONG column in datagrid vb.net Pin
jomet13-Mar-08 23:26
jomet13-Mar-08 23:26 
Generalplotting in Visual Basics Pin
Orlando234513-Mar-08 18:00
Orlando234513-Mar-08 18:00 
GeneralRe: plotting in Visual Basics Pin
Dave Kreskowiak14-Mar-08 8:04
mveDave Kreskowiak14-Mar-08 8:04 
GeneralRe: plotting in Visual Basics Pin
Orlando234516-Mar-08 9:17
Orlando234516-Mar-08 9:17 
GeneralRe: plotting in Visual Basics Pin
Dave Kreskowiak16-Mar-08 16:42
mveDave Kreskowiak16-Mar-08 16:42 
GeneralTimer Pin
Ahmad Rifai Yusuf13-Mar-08 17:33
Ahmad Rifai Yusuf13-Mar-08 17:33 
GeneralRe: Timer Pin
Kevin Brydon13-Mar-08 23:20
Kevin Brydon13-Mar-08 23:20 
GeneralRe: Timer Pin
AshokPatra14-Mar-08 1:57
AshokPatra14-Mar-08 1:57 
GeneralRe: Timer Pin
jchigg200014-Mar-08 3:10
jchigg200014-Mar-08 3:10 

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.