Click here to Skip to main content
15,891,431 members
Home / Discussions / C#
   

C#

 
AnswerRe: Print images with the correct size Pin
Alan Balkany14-Apr-10 3:57
Alan Balkany14-Apr-10 3:57 
GeneralRe: Print images with the correct size Pin
Eagle3214-Apr-10 11:55
Eagle3214-Apr-10 11:55 
GeneralRe: Print images with the correct size Pin
Alan Balkany15-Apr-10 2:56
Alan Balkany15-Apr-10 2:56 
QuestionRunning a BackgroundWorker in a Single Threaded Apartment Pin
William Winner13-Apr-10 9:09
William Winner13-Apr-10 9:09 
AnswerRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn13-Apr-10 11:08
sitebuilderLuc Pattyn13-Apr-10 11:08 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
William Winner13-Apr-10 11:21
William Winner13-Apr-10 11:21 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn13-Apr-10 11:32
sitebuilderLuc Pattyn13-Apr-10 11:32 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
William Winner13-Apr-10 11:49
William Winner13-Apr-10 11:49 
Luc Pattyn wrote:
1. is the code shown running on the main thread? BGW does NOT behave the way one expects when created on another thread!


it's run from the Form_Load event...so the main thread of the Form...though I don't know if the program that opens the form has it on its main thread or not...

Luc Pattyn wrote:
2. what is inside DoWork(), could you show the first few lines?

C#
//Open DataCube
ADODB.Connection oCn = New ADODB.Connection();
ADOMD.Catalog oCat = New ADOMD.Catalog();

LoadCubeInBackground.ReportProgress(0, "Opening Data Cube");

ConnectionString myCStringType = e.Argument;



Luc Pattyn wrote:
3. "the first line of my LoadCube function never gets hit." how do you observe that?


I can debug with VS through the program...by that I mean, it opens the program and I can still use breakpoints and such when running my forms. This form is actually called from another form that is called from a button on the main program. So, I set a breakpoint first in the Form_Load and I set a breakpoint at the first ReportProgress in the code shown above. I can step through and see that the BackgroundWorker is created, that the event handlers are added and when I run (F5) at RunWorkerAsync...the breakpoint in the DoWork event handler never gets hit.

Luc Pattyn wrote:
4. Environment.GetCommandLineArgs. Beware command line length limitations (could be 2K).


That's a fair point...I have to pass in the sites that I'm using and there could possibly be hundreds of them...and the name's can be anywhere from 28 characters to 50+. So, I could easily reach that limit. I may just have to pass in a file name with all of the information if I can't get the better way (no command line, no starting process) to work.

I'm going to have to have an install program anyway, because it has to register the toolbar that runs all of this, so I can also install the form's exe...

I really want it to work the way I originally intended...just add the project to the original solution and add it as a new form and let everyone play well together...
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn13-Apr-10 12:04
sitebuilderLuc Pattyn13-Apr-10 12:04 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment [modified] Pin
William Winner13-Apr-10 12:15
William Winner13-Apr-10 12:15 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn13-Apr-10 13:04
sitebuilderLuc Pattyn13-Apr-10 13:04 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
William Winner13-Apr-10 13:18
William Winner13-Apr-10 13:18 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn13-Apr-10 13:34
sitebuilderLuc Pattyn13-Apr-10 13:34 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
William Winner16-Apr-10 10:12
William Winner16-Apr-10 10:12 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn16-Apr-10 10:26
sitebuilderLuc Pattyn16-Apr-10 10:26 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
William Winner13-Apr-10 11:50
William Winner13-Apr-10 11:50 
QuestionKernelbase error on Server 2008 Pin
Paladin200013-Apr-10 9:05
Paladin200013-Apr-10 9:05 
AnswerRe: Kernelbase error on Server 2008 Pin
Paw Jershauge13-Apr-10 10:45
Paw Jershauge13-Apr-10 10:45 
AnswerRe: Kernelbase error on Server 2008 Pin
mitch_olgren30-Jul-10 5:20
mitch_olgren30-Jul-10 5:20 
GeneralRe: Kernelbase error on Server 2008 Pin
Paladin200030-Jul-10 6:04
Paladin200030-Jul-10 6:04 
QuestionDoes anyone encountered problems with using of multiple TCP channels in .NET remoting app? [modified] Pin
Slava_K13-Apr-10 8:28
Slava_K13-Apr-10 8:28 
AnswerRe: Does anyone encountered problems with using of multiple TCP channels in .NET remoting app? Pin
thugthug15-Apr-10 5:17
thugthug15-Apr-10 5:17 
QuestionNPlot - how do I not show weekend dates Pin
boreland13-Apr-10 7:36
boreland13-Apr-10 7:36 
QuestionBackground Worker with Multiple Progress Bars Pin
eddieangel13-Apr-10 7:07
eddieangel13-Apr-10 7:07 
AnswerRe: Background Worker with Multiple Progress Bars Pin
Luc Pattyn13-Apr-10 7:23
sitebuilderLuc Pattyn13-Apr-10 7:23 

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.