Re: Timer/debugger interface problem



An additional helpful note: If I do nothing but change the startup object to
MyMainForm then everything works perfectly, including debugger references to
the form's controls. If I then change back to Sub Main() as a startup
object, the problem comes back.

Tom



"Tom Edelbrok" <anonymous@xxxxxxxxxxxxx> wrote in message
news:v0Pge.37731$0X6.25714@xxxxxxxxxxx
>I have narrowed down a previous problem to the following more specific
>items:
>
> 1) I have my startup object in VB.NET (VS 2003) set to Sub Main().
>
> 2) Inside of Sub Main() I do a "Application.Run(MyMainForm)"
>
> 3) Inside of MyMainForm_Load I create an object, ie: "poMyObj=new
> clsMyObj"
>
> 4) Within poMyObj I create a new System.Threading.Timer instance. I use a
> delegate with AddressOf to fire a certain function whenever the timer
> fires (the function
> is called MyFunction(), and works fine).
>
> 5) Everything works like a charm!
>
> 6) HOWEVER: Inside the timer callback function (ie: the MyFunction()
> function) I place a
> breakpoint. When the debugger stops I try to display any labels from
> MyMainForm and
> just referencing them cause VB.NET to hang. This problem only occurs when
> the debugger
> trys to reference controls on the form. If I don't use the debugger the
> controls can be
> referenced by the object's VB code just fine - updating and refreshing
> data.
>
>
> Why can't the debugger access the form's controls but everything else can?
> Note: when
> the problem is occurring I can display any local program variable values,
> but I can't
> display anything from the form unless I do it without stopping via a
> breakpoint.
>
> Any ideas?
>
> Tom
>


.



Relevant Pages

  • Re: compiling problem
    ... infragistics stuff from the toolbox and problem is solved. ... Its the latest version of their controls. ... removed including references, liscence dll added to the project, and some ... The section enables configuration ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: UserControls Vanished
    ... >>Search is not working for me for this newsgroup. ... After editing one of the controls, ... >>rebuilt the project all of the usercontrols on every form ... >>code still references all of them. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Terminate Event is not triggered on application close
    ... i'm using a global collection object which is used ... I can use these controls in standalone as ... If there's a circular reference (object A references object B and object B ...
    (microsoft.public.vb.general.discussion)
  • RE: Search form for multiple fields
    ... Create an unbound dialogue form with three unbound controls and a command ... parameter and, to make the selections optional, test for Nulls, so the query ... In the above frmSearch is the name of the dialogue form, ... table of technical references in a database. ...
    (microsoft.public.access.gettingstarted)
  • Re: Game programming -- Java performance?
    ... references to one another as a) indices, names, or other things and b) ... Murphy's Laws of java programming: ... Haha, well, you should probably try to find out why (perhaps step through with a debugger, or look at the source code?) ... If the app seems to have hung and you're sure it's an infinite loop ...
    (comp.lang.java.programmer)

Loading