List Info

Thread: Update data in a DataGrid




Update data in a DataGrid
country flaguser name
United States
2007-10-03 23:19:07
Hi all, I have a VB.Net 2005 application that I am working
on that I
could use some help with.

I have a form thats loads values from an access database and
displays
them in a DataGrid.

It loads them without any problems, however, if I want to
update any
of the values it crashes and gives me error message -
OleDbException
was Unhandled - No value Given for one or more required
parameters.

Im puzzled as the update code is actually generated by the
VB IDE
itself and not me. Nor have I modified it in any way.

I have listed the code below. Any help would be GREATLY
appreciated.


************************************************************
*******************************
Public Class Form1


    Private Sub
RoundDetailsBindingNavigatorSaveItem_Click(ByVal
sender As System.Object, ByVal e As System.EventArgs)
Handles
RoundDetailsBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.RoundDetailsBindingSource.EndEdit()


Me.RoundDetailsTableAdapter.Update(Me.RoundInfoDataSet.Round
Details)
-    {Error message points to here}


    End Sub


    Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As
System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the
'RoundInfoDataSet.RoundDetails' table. You can move, or
remove it, as
needed.


Me.RoundDetailsTableAdapter.Fill(Me.RoundInfoDataSet.RoundDe
tails)

************************************************************
*******************************************

Thanks all


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: Update data in a DataGrid
country flaguser name
United States
2007-10-17 23:38:46
In answer to my own question...............

The code itself is actually perfectly correct (given that it
was
created by VB's wizards it should be).


However, somewhere along the way I had removed the Primary
Key
indicator on my MS Access Database.


So despite my NUMEROUS attempts save data it would come back
with one
form of error or another. Each and every one of them
disappeared when
I added the Primary Key.


SOOOOOOOOOO SIMPLE YET SOOOOOOOOOOO FRUSTRATING!!!!!!!!!!!




On Oct 4, 2:19 pm, Bails <andrewgbail...gmail.com> wrote:
> Hi all, I have a VB.Net 2005 application that I am
working on that I
> could use some help with.
>
> I have a form thats loads values from an access
database and displays
> them in a DataGrid.
>
> It loads them without any problems, however, if I want
to update any
> of the values it crashes and gives me error message -
OleDbException
> was Unhandled - No value Given for one or more required
parameters.
>
> Im puzzled as the update code is actually generated by
the VB IDE
> itself and not me. Nor have I modified it in any way.
>
> I have listed the code below. Any help would be GREATLY
appreciated.
>
>
************************************************************
***************­****************
> Public Class Form1
>
>     Private Sub
RoundDetailsBindingNavigatorSaveItem_Click(ByVal
> sender As System.Object, ByVal e As System.EventArgs)
Handles
> RoundDetailsBindingNavigatorSaveItem.Click
>         Me.Validate()
>         Me.RoundDetailsBindingSource.EndEdit()
>
>
Me.RoundDetailsTableAdapter.Update(Me.RoundInfoDataSet.Round
Details)
> -    {Error message points to here}
>
>     End Sub
>
>     Private Sub Form1_Load(ByVal sender As
System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>         'TODO: This line of code loads data into the
> 'RoundInfoDataSet.RoundDetails' table. You can move, or
remove it, as
> needed.
>
>
Me.RoundDetailsTableAdapter.Fill(Me.RoundInfoDataSet.RoundDe
tails)
>
>
************************************************************
***************­****************************
>
> Thanks all


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: Update data in a DataGrid
country flaguser name
United States
2007-10-18 07:51:05
Isn't the debugger a wonderful thing?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: Update data in a DataGrid
user name
2007-10-18 07:52:38
What is this debugger you speak of? I normally just post
here when I
have a bug in my code :/

On 18/10/2007, cleveridea <cleveridea.netgmail.com> wrote:
>
> Isn't the debugger a wonderful thing?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: Update data in a DataGrid
country flaguser name
United States
2007-10-18 10:15:50
Yup, posting here and waiting for responses is easier than
pressing
the F5 key... :P

On Oct 18, 5:52 pm, "Jamie Fraser"
<jamie.fra...gmail.com> wrote:
> What is this debugger you speak of? I normally just
post here when I
> have a bug in my code :/
>
> On 18/10/2007, cleveridea <cleveridea....gmail.com> wrote:
>
> > Isn't the debugger a wonderful thing


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: Update data in a DataGrid
user name
2007-10-18 19:32:55
F5? What is this F5?

Personally I like to right-click my solution to build ... none of this silly shortcut key crap ... explicitness and transparency in all things!



On 10/18/07, Cerebrus < zorg007sify.com">zorg007sify.com&gt; wrote:

Yup, posting here and waiting for responses is easier than pressing
the F5 key... :P

On Oct 18, 5:52 pm, "Jamie Fraser&quot; < jamie.fra...gmail.com">jamie.fra...gmail.com> wrote:
&gt; What is this debugger you speak of? I normally just post here when I
> have a bug in my code :/
>
&gt; On 18/10/2007, cleveridea < cleveridea....gmail.com">cleveridea....gmail.com > wrote:
>;
> > Isn't the debugger a wonderful thing

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting&quot; group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

Re: Update data in a DataGrid
country flaguser name
United States
2007-10-18 20:34:14
It would be nice if the debuggar would explain things in
plain
language.

It was an absolute fluke that I found the answer to my
problem,
nothing to do with the debuggar (other than it stopped my
app EVERY
time).

On Oct 19, 10:32 am, "Andrew Badera"
<and...badera.us> wrote:
> F5? What is this F5?
>
> Personally I like to right-click my solution to build
... none of this silly
> shortcut key crap ... explicitness and transparency in
all things!
>
> On 10/18/07, Cerebrus <zorg...sify.com> wrote:
>
>
>
>
>
> > Yup, posting here and waiting for responses is
easier than pressing
> > the F5 key... :P
>
> > On Oct 18, 5:52 pm, "Jamie Fraser"
<jamie.fra...gmail.com> wrote:
> > > What is this debugger you speak of? I
normally just post here when I
> > > have a bug in my code :/
>
> > > On 18/10/2007, cleveridea
<cleveridea....gmail.com> wrote:
>
> > > > Isn't the debugger a wonderful thing-
Hide quoted text -
>
> - Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: Update data in a DataGrid
user name
2007-10-18 20:37:30
The debugger really does, typically, explain things as plainly as possible. However, there IS a TON of context to grok before all debugger messages make sense. I can attest to several gurus I've worked with being completely puzzled by debugger info, sometimes for days or weeks on end.

In this case, however, I think it was just a matter, to be honest, of you exploring the issue further. The message, or message of the inner exception, typically gives pretty specific detail.

--ab




On 10/18/07, Bails < andrewgbailliegmail.com">andrewgbailliegmail.com> wrote:

It would be nice if the debuggar would explain things in plain
language.

It was an absolute fluke that I found the answer to my problem,
nothing to do with the debuggar (other than it stopped my app EVERY
time).

On Oct 19, 10:32 am, "Andrew Badera&quot; < and...badera.us">and...badera.us> wrote:
>; F5? What is this F5?
>
&gt; Personally I like to right-click my solution to build ... none of this silly
&gt; shortcut key crap ... explicitness and transparency in all things!
&gt;
> On 10/18/07, Cerebrus < zorg...sify.com">zorg...sify.com&gt; wrote:
>;
>
>
>
>
> > Yup, posting here and waiting for responses is easier than pressing
&gt; > the F5 key... :P
>
&gt; > On Oct 18, 5:52 pm, "Jamie Fraser&quot; < jamie.fra...gmail.com"> jamie.fra...gmail.com> wrote:
>; > > What is this debugger you speak of? I normally just post here when I
> > > have a bug in my code :/
>
&gt; > > On 18/10/2007, cleveridea < cleveridea....gmail.com">cleveridea....gmail.com> wrote:
>;
> > > > Isn't the debugger a wonderful thing- Hide quoted text -
>
>; - Show quoted text -



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting&quot; group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

Re: Update data in a DataGrid
country flaguser name
United States
2007-10-18 23:59:04
Your probably right Andrew, though I now have another
example of the
debugger being a bugga and spitting out gobledegook.

I have listed it below.
If you can make any sense of it I'd be greatful.

All I can make out from the following error is that i dont
have
"referenced assembly installed" on my machine -
but which reference??

************************************************************
***************************
PLATFORM VERSION INFO
        Windows                         : 5.1.2600.131072
(Win32NT)
        Common Language Runtime         : 2.0.50727.1378
        System.Deployment.dll           : 2.0.50727.1378
(REDBITSB2.050727-1300)
        mscorwks.dll                    : 2.0.50727.1378
(REDBITSB2.050727-1300)
        dfdll.dll                       : 2.0.50727.1378
(REDBITSB2.050727-1300)
        dfshim.dll                      : 2.0.50727.1378
(REDBITSB2.050727-1300)


SOURCES
        Deployment url                  :
file:///C:/Documents%20and%20Settings/fabian/My%20Documents/
Visual%20Studio­%202005/Projects/Holdem%20Tournament%20Timer
/Published/Holdem%20Tournament%­20Timer.application
        Application url                 :
file:///C:/Documents%20and%20Settings/fabian/My%20Documents/
Visual%20Studio­%202005/Projects/Holdem%20Tournament%20Timer
/Published/Holdem%20Tournament%­20Timer_1_0_1_13/Holdem%20To
urnament%20Timer.exe.manifest


IDENTITIES
        Deployment Identity             : Holdem Tournament
Timer.application,
Version=1.0.1.13, Culture=en-AU,
PublicKeyToken=a675fef2688dba94,
processorArchitecture=msil
        Application Identity            : Holdem Tournament
Timer.exe,
Version=1.0.1.13, Culture=en-AU,
PublicKeyToken=a675fef2688dba94,
processorArchitecture=msil, type=win32


APPLICATION SUMMARY
        * Installable application.


ERROR SUMMARY
        Below is a summary of the errors, details of these
errors are
listed
later in the log.
        * Activation of C:Documents and SettingsfabianMy
Documents
Visual
Studio 2005ProjectsHoldem Tournament
TimerPublishedHoldem
Tournament Timer.application resulted in exception.
Following failure
messages were detected:
                + The referenced assembly is not installed
on your
system.
(Exception from HRESULT: 0x800736B3)


COMPONENT STORE TRANSACTION FAILURE SUMMARY
        No transaction error was detected.


WARNINGS
        There were no warnings during this operation.


OPERATION PROGRESS STATUS
        * [19/10/2007 10:04:09 AM] : Activation of
C:Documents and
Settings
fabianMy DocumentsVisual Studio 2005ProjectsHoldem
Tournament
TimerPublishedHoldem Tournament Timer.application has
started.
        * [19/10/2007 10:04:27 AM] : Processing of
deployment manifest
has
successfully completed.
        * [19/10/2007 10:04:27 AM] : Installation of the
application
has
started.
        * [19/10/2007 10:04:27 AM] : Processing of
application
manifest has
successfully completed.
        * [19/10/2007 10:04:49 AM] : Request of trust and
detection
of
platform is complete.
        * [19/10/2007 10:04:50 AM] : Downloading of
subscription
dependencies
is complete.
        * [19/10/2007 10:04:50 AM] : Commit of the
downloaded
application has
started.


ERROR DETAILS
        Following errors were detected during this
operation.
        * [19/10/2007 10:04:50 AM]
System.Runtime.InteropServices.COMException
                - The referenced assembly is not installed
on your
system.
(Exception from HRESULT: 0x800736B3)
                - Source: System.Deployment
                - Stack trace:
                        at
System.Deployment.Internal.Isolation.IStore.GetAssemblyInfor
mation(UInt32
Flags, IDefinitionIdentity DefinitionIdentity, Guid&
riid)
                        at
System.Deployment.Internal.Isolation.Store.GetAssemblyManife
st(UInt32
Flags, IDefinitionIdentity DefinitionIdentity)
                        at
System.Deployment.Application.ComponentStore.GetSubscription
StateInternal(D­
efinitionIdentity
subId)
                        at
System.Deployment.Application.SubscriptionStore.GetSubscript
ionStateInterna­
l(SubscriptionState
subState)
                        at
System.Deployment.Application.ComponentStore.CollectCrossGro
upApplications(­
Uri
codebaseUri, DefinitionIdentity deploymentIdentity,
Boolean&
identityGroupFound, Boolean& locationGroupFound,
String&
identityGroupProductName)
                        at
System.Deployment.Application.SubscriptionStore.CommitApplic
ation(Subscript­
ionState&
subState, CommitApplicationParams commitParams)
                        at
System.Deployment.Application.ApplicationActivator.InstallAp
plication(Subsc­
riptionState&
subState, ActivationDescription actDesc)
                        at
System.Deployment.Application.ApplicationActivator.PerformDe
ploymentActivat­
ion(Uri
activationUri, Boolean isShortcut)
                        at
System.Deployment.Application.ApplicationActivator.ActivateD
eploymentWorker­
(Object
state)


COMPONENT STORE TRANSACTION DETAILS
        No transaction information is available.




On Oct 19, 11:37 am, "Andrew Badera"
<and...badera.us> wrote:
> The debugger really does, typically, explain things as
plainly as possible.
> However, there IS a TON of context to grok before all
debugger messages make
> sense. I can attest to several gurus I've worked with
being completely
> puzzled by debugger info, sometimes for days or weeks
on end.
>
> In this case, however, I think it was just a matter, to
be honest, of you
> exploring the issue further. The message, or message of
the inner exception,
> typically gives pretty specific detail.
>
> --ab
>
> On 10/18/07, Bails <andrewgbail...gmail.com> wrote:
>
>
>
>
>
> > It would be nice if the debuggar would explain
things in plain
> > language.
>
> > It was an absolute fluke that I found the answer
to my problem,
> > nothing to do with the debuggar (other than it
stopped my app EVERY
> > time).
>
> > On Oct 19, 10:32 am, "Andrew Badera"
<and...badera.us> wrote:
> > > F5? What is this F5?
>
> > > Personally I like to right-click my solution
to build ... none of this
> > silly
> > > shortcut key crap ... explicitness and
transparency in all things!
>
> > > On 10/18/07, Cerebrus <zorg...sify.com> wrote:
>
> > > > Yup, posting here and waiting for
responses is easier than pressing
> > > > the F5 key... :P
>
> > > > On Oct 18, 5:52 pm, "Jamie
Fraser" <jamie.fra...gmail.com> wrote:
> > > > > What is this debugger you speak of?
I normally just post here when I
> > > > > have a bug in my code :/
>
> > > > > On 18/10/2007, cleveridea
<cleveridea....gmail.com> wrote:
>
> > > > > > Isn't the debugger a wonderful
thing- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: Update data in a DataGrid
user name
2007-10-19 02:53:42
Thats the browser-refresh shortcut, so once you've posted
here you can
frantically hit F5 until you get a full solution!!!!

On 19/10/2007, Andrew Badera <andrewbadera.us> wrote:
> F5? What is this F5?
>
> Personally I like to right-click my solution to build
... none of this silly
> shortcut key crap ... explicitness and transparency in
all things!
>
>
>
>
> On 10/18/07, Cerebrus <zorg007sify.com> wrote:
> >
> > Yup, posting here and waiting for responses is
easier than pressing
> > the F5 key... :P
> >
> > On Oct 18, 5:52 pm, "Jamie Fraser"
<jamie.fra...gmail.com> wrote:
> > > What is this debugger you speak of? I
normally just post here when I
> > > have a bug in my code :/
> > >
> > > On 18/10/2007, cleveridea
<cleveridea....gmail.com > wrote:
> > >
> > > > Isn't the debugger a wonderful thing
> >
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: Update data in a DataGrid
user name
2007-10-19 05:24:20
Well, that's more COM/interop than it is the debugger :P

Do you know what components you're using interop to work with? I take it you're working with an older component, in a .NET environment?

Are you using p/invoke anywhere? (DllImport) ...


On 10/19/07, Bails < andrewgbailliegmail.com">andrewgbailliegmail.com> wrote:

Your probably right Andrew, though I now have another example of the
debugger being a bugga and spitting out gobledegook.

I have listed it below.
If you can make any sense of it I'd be greatful.

All I can make out from the following error is that i dont have
";referenced assembly installed&quot; on my machine - but which reference??

***************************************************************************************
PLATFORM VERSION INFO
 ; &nbsp; &nbsp; &nbsp; Windows ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;  : 5.1.2600.131072 (Win32NT)
  ; &nbsp; &nbsp; &nbsp;Common Language Runtime&nbsp; &nbsp; &nbsp;   ; : 2.0.50727.1378
   ; &nbsp; &nbsp; System.Deployment.dll&nbsp; &nbsp; &nbsp;   ; &nbsp; : 2.0.50727.1378
( REDBITSB2.050727-1300)
&nbsp; &nbsp; &nbsp;   ;mscorwks.dll &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;: 2.0.50727.1378
(REDBITSB2.050727-1300)
&nbsp; &nbsp; &nbsp; &nbsp; dfdll.dll&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  : 2.0.50727.1378
(REDBITSB2.050727-1300)
&nbsp; &nbsp; &nbsp; &nbsp; dfshim.dll&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; : 2.0.50727.1378
(REDBITSB2.050727-1300)


SOURCES
&nbsp; &nbsp; &nbsp; &nbsp; Deployment url &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;:
file:///C:/Documents%20and%20Settings/fabian/My%20Documents/Visual%20Studio­%202005/Projects/Holdem%20Tournament%20Timer/Published/Holdem%20Tournament%­20Timer.application
 &nbsp; &nbsp; &nbsp; &nbsp;Application url &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; :
file:///C:/Documents%20and%20Settings/fabian/My%20Documents/Visual%20Studio­%202005/Projects/Holdem%20Tournament%20Timer/Published/Holdem%20Tournament%­20Timer_1_0_1_13/Holdem%20Tournament%20Timer.exe.manifest


IDENTITIES
&nbsp; &nbsp; &nbsp; &nbsp; Deployment Identity&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; : Holdem Tournament
Timer.application,
Version=1.0.1.13, Culture=en-AU, PublicKeyToken=a675fef2688dba94,
processorArchitecture=msil
&nbsp; &nbsp; &nbsp; &nbsp; Application Identity&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;: Holdem Tournament
Timer.exe,
Version=1.0.1.13, Culture=en-AU, PublicKeyToken=a675fef2688dba94,
processorArchitecture=msil, type=win32


APPLICATION SUMMARY
&nbsp; &nbsp;   ; &nbsp;* Installable application.


ERROR SUMMARY
&nbsp; &nbsp;   ; &nbsp;Below is a summary of the errors, details of these errors are
listed
later in the log.
 ; &nbsp; &nbsp; &nbsp; * Activation of C:Documents and SettingsfabianMy Documents
Visual
Studio 2005ProjectsHoldem Tournament TimerPublishedHoldem
Tournament Timer.application resulted in exception. Following failure
messages were detected:
  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; + The referenced assembly is not installed on your
system.
(Exception from HRESULT: 0x800736B3)


COMPONENT STORE TRANSACTION FAILURE SUMMARY
&nbsp; &nbsp;   ; &nbsp;No transaction error was detected.


WARNINGS
  ; &nbsp; &nbsp; &nbsp;There were no warnings during this operation.


OPERATION PROGRESS STATUS
&nbsp; &nbsp; &nbsp;   ;* [19/10/2007 10:04:09 AM] : Activation of C:Documents and
Settings
fabianMy DocumentsVisual Studio 2005ProjectsHoldem Tournament
TimerPublishedHoldem Tournament Timer.application has started.
&nbsp;   ; &nbsp; &nbsp;* [19/10/2007 10:04:27 AM] : Processing of deployment manifest
has
successfully completed.
 &nbsp; &nbsp; &nbsp; &nbsp;* [19/10/2007 10:04:27 AM] : Installation of the application
has
started.
   ; &nbsp; &nbsp; * [19/10/2007 10:04:27 AM] : Processing of application
manifest has
successfully completed.
 &nbsp; &nbsp; &nbsp; &nbsp;* [19/10/2007 10:04:49 AM] : Request of trust and detection
of
platform is complete.
 &nbsp; &nbsp; &nbsp; &nbsp;* [19/10/2007 10:04:50 AM] : Downloading of subscription
dependencies
is complete.
  ; &nbsp; &nbsp; &nbsp;* [19/10/2007 10:04:50 AM] : Commit of the downloaded
application has
started.


ERROR DETAILS
&nbsp;   ; &nbsp; &nbsp;Following errors were detected during this operation.
 &nbsp; &nbsp; &nbsp; &nbsp;* [19/10/2007 10:04:50 AM]
System.Runtime.InteropServices.COMException
   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;- The referenced assembly is not installed on your
system.
(Exception from HRESULT: 0x800736B3)
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; - Source: System.Deployment
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;- Stack trace:
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; at
System.Deployment.Internal.Isolation.IStore.GetAssemblyInformation (UInt32
Flags, IDefinitionIdentity DefinitionIdentity, Guid& riid)
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; at
System.Deployment.Internal.Isolation.Store.GetAssemblyManifest(UInt32
Flags, IDefinitionIdentity DefinitionIdentity)
  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;at
System.Deployment.Application.ComponentStore.GetSubscriptionStateInternal(D­
efinitionIdentity
subId)
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; at
System.Deployment.Application.SubscriptionStore.GetSubscriptionStateInterna­
l(SubscriptionState
subState)
&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; at
System.Deployment.Application.ComponentStore.CollectCrossGroupApplications(­
Uri
codebaseUri, DefinitionIdentity deploymentIdentity, Boolean&amp;
identityGroupFound, Boolean&amp; locationGroupFound, String&;
identityGroupProductName)
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; at
System.Deployment.Application.SubscriptionStore.CommitApplication(Subscript­
ionState&;
subState, CommitApplicationParams commitParams)
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;at
System.Deployment.Application.ApplicationActivator.InstallApplication(Subsc­
riptionState&amp;
subState, ActivationDescription actDesc)
  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivat­
ion(Uri
activationUri, Boolean isShortcut)
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;at
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker­
(Object
state)


COMPONENT STORE TRANSACTION DETAILS
&nbsp; &nbsp;   ; &nbsp;No transaction information is available.




On Oct 19, 11:37 am, "Andrew Badera&quot; < and...badera.us"> and...badera.us> wrote:
>; The debugger really does, typically, explain things as plainly as possible.
> However, there IS a TON of context to grok before all debugger messages make
> sense. I can attest to several gurus I've worked with being completely
> puzzled by debugger info, sometimes for days or weeks on end.
>
> In this case, however, I think it was just a matter, to be honest, of you
> exploring the issue further. The message, or message of the inner exception,
> typically gives pretty specific detail.
&gt;
> --ab
>
> On 10/18/07, Bails < andrewgbail...gmail.com">andrewgbail...gmail.com> wrote:
>;
>
>
>
>
> > It would be nice if the debuggar would explain things in plain
> > language.
>
> > It was an absolute fluke that I found the answer to my problem,
&gt; > nothing to do with the debuggar (other than it stopped my app EVERY
>; > time).
>;
> > On Oct 19, 10:32 am, "Andrew Badera&quot; < and...badera.us">and...badera.us> wrote:
>; > > F5? What is this F5?
>
&gt; > > Personally I like to right-click my solution to build ... none of this
> > silly
> > > shortcut key crap ... explicitness and transparency in all things!
&gt;
> > > On 10/18/07, Cerebrus < zorg...sify.com">zorg...sify.com&gt; wrote:
&gt;
> > > > Yup, posting here and waiting for responses is easier than pressing
&gt; > > > the F5 key... :P
>
&gt; > > > On Oct 18, 5:52 pm, "Jamie Fraser&quot; < jamie.fra...gmail.com"> jamie.fra...gmail.com> wrote:
>; > > > > What is this debugger you speak of? I normally just post here when I
> > > > > have a bug in my code :/
>
&gt; > > > > On 18/10/2007, cleveridea < cleveridea....gmail.com">cleveridea....gmail.com> wrote:
>;
> > > > > > Isn't the debugger a wonderful thing- Hide quoted text -
>
>; > > - Show quoted text -- Hide quoted text -
>
&gt; - Show quoted text -

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting&quot; group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

Re: Update data in a DataGrid
country flaguser name
United States
2007-10-19 18:11:26
No. I have NO IDEA what  Com/interop is. I have posted my
code below
if that helps.

Its a simple timer program for Texas Holdem Poker i am
working on.


Theree are only 2 forms. The first uses a datagrid connected
to an MS
Access database back end.

The 2nd has a few labels, a timer and Menu bars on it -
nothing
special.

*****************************************************
Form1 Code
Public Class frmStructure

    Private Sub
RoundDetailsBindingNavigatorSaveItem_Click(ByVal
sender As System.Object, ByVal e As System.EventArgs)
Handles
RoundDetailsBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.RoundDetailsBindingSource.EndEdit()
 
Me.RoundDetailsTableAdapter.Update(Me.RoundInfoDataSet.Round
Details)
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As
System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the
'RoundInfoDataSet.RoundDetails' table. You can move, or
remove it, as
needed.
 
Me.RoundDetailsTableAdapter.Fill(Me.RoundInfoDataSet.RoundDe
tails)

    End Sub

    Private Sub BtnGoToTimer_Click(ByVal sender As
System.Object,
ByVal e As System.EventArgs) Handles BtnGoToTimer.Click
        Form2.Show()
        Me.Hide()
************************************************************
*****************************************8
Form2 Code
 Inherits System.Windows.Forms.Form
    Dim c(6, 0) As String
    Dim xx, yy As Long

    'These next few lines set up the start ofthe timer. They
take the
values from the datagrid on form1.
    'IMPORTANT: For these lines to extract the values, the
project
MUST start on Form1, then o to this form,
    'otherwise it cannot read any values.
    'The grid is filled across the rows and start at 0
(Zero).
    'The first Number represents the Row, the second
represents the
Column.
    'So to fill our data across the page for Round 1 would
like like:
    '(0,0),(1,0),(2,0),(3,0),(4,0) etc
    ' Round 2 would be (0,1),(1,1),(2,1),(3,1),(4,1)
    Dim iRoundNumber As Integer =
frmStructure.RoundDetailsDataGridView.Item(0, 0).Value   '
Set Round
Number - this is the top left cell of the datagrid (0,0)
    Dim iRoundLength As Integer =
frmStructure.RoundDetailsDataGridView.Item(1, 0).Value   '
set Round
Length - this is the top Row and 1 in - (0,1)
    Dim iSmallBlind As Integer =
frmStructure.RoundDetailsDataGridView.Item(2, 0).Value    '
set the
Small Blind amount.
    Dim iBigBlind As Integer =
frmStructure.RoundDetailsDataGridView.Item(3, 0).Value     
' Set the
Big Blind amount.
    Dim iAnte As Integer =
frmStructure.RoundDetailsDataGridView.Item(4, 0).Value      
   ' Set
the Ante Amount
    Dim RoundLength = iRoundLength * 600 ' Converts the
Round Length
into Seconds

    'These next few lines load up the 'Next Round (Round 2)
data
    Dim iNextSmall As Integer =
frmStructure.RoundDetailsDataGridView.Item(2, 1).Value     '
Set the
next Small Blind
    Dim iNextBig As Integer =
frmStructure.RoundDetailsDataGridView.Item(3, 1).Value      
' Set the
next Big Blind
    Dim iNextAnte As Integer =
frmStructure.RoundDetailsDataGridView.Item(4, 1).Value      
  ' Set
the next Ante

    Dim sTotalRows As String =
frmStructure.RoundDetailsDataGridView.RowCount.ToString '
sets the
total number of rows in the datagrid.
    Dim iTime As String '= Format(DateTime.Now, "hh:mm
tt") ' Sets
Curent Time

    Dim iPlayersRemaining As Integer
    Dim iNumberOfPlayers As Integer
    Dim iStartingStack As Integer
    Dim iAverageStack As Integer

    Private Sub Form2_Load(ByVal sender As Object, ByVal e
As
System.EventArgs) Handles Me.Load
        On Error Resume Next
        'These next few lines are to assist with resizing
the form and
controls
        xx = Me.ClientSize.Width
        yy = Me.ClientSize.Height
        taga(Me, xx, yy)

        'TODO: This line of code loads data into the
'RoundInfoDataSet.RoundDetails' table. You can move, or
remove it, as
needed.

        iTime = Format(DateTime.Now, "hh:mm tt")
'DateTime.Now


        ToolStripStatusLabel1.Text = "Round:"
& iRoundNumber
        'ToolStripStatusLabel2.Text = "Small Blind:
" & iSmallBlind
        'ToolStripStatusLabel3.Text = "Big Blind:
" & iBigBlind
        'ToolStripStatusLabel4.Text = "Ante: "
& iAnte
        'ToolStripStatusLabel6.Text = iTime

        'Once the variables for the round have been
dimenshioned and
set, we display them on the screen. Round 1 is the first
displayed.
        Label1.Text = "Round: " & iRoundNumber
'Label1 is the Round
Number
        If iRoundLength < 10 Then
            Label2.Text = "0" & iRoundLength
& ":00" ' Label2 is the
Round Length as is the large label in the middle of the
screen.
        Else
            Label2.Text = iRoundLength &
":00"
        End If
        Label3.Text = iSmallBlind       ' Label3 is thye
Small Blind
amount
        Label4.Text = iBigBlind         ' label4 is the Big
Blind
        Label5.Text = iAnte             ' Label5 is the
ante

        Label10.Text = iNextSmall       ' Label10 is the
Next Small
Blind
        Label14.Text = iNextBig         ' Label14 is the
Next Big
Blind
        Label13.Text = iNextAnte        ' Label13 is the
Next Ante
Amount

        Timer1.Enabled = False
        Button1.Text = "Start"
        Button2.Text = "Pause"
        'Button1.Image = C:Documents and
SettingsfabianApplication
DataLimeWirethemesother_themeplay_dn.gif
        Label16.Text = iTime
        CurrentTimeToolStripMenuItem.Checked = True
        AverageChipStackToolStripMenuItem.Checked = True

    End Sub
    Private CountDownStart

    Private Sub Form2_Resize(ByVal sender As Object, ByVal e
As
System.EventArgs) Handles Me.Resize
        On Error Resume Next
        Dim sX, sY As Double
        Dim j As Integer

        On Error Resume Next
        sX = Me.ClientSize.Width / xx
        sY = Me.ClientSize.Height / yy
        For j = 1 To c.GetUpperBound(1)
            mudar(Me, c(0, j), j, sX, sY)
        Next j

    End Sub

    Private Sub taga(ByVal ct As Object, ByVal w As Long,
ByVal h As
Long)
        On Error Resume Next
        Dim i, k As Integer
        Dim ctl As Control
        For Each ctl In ct.Controls
            If ctl.Name = "" Then Exit For
            k = c.GetUpperBound(1)
            ReDim Preserve c(6, k + 1)
            c(0, k + 1) = ctl.Name
            c(1, k + 1) = ctl.Left
            c(2, k + 1) = ctl.Top
            c(3, k + 1) = ctl.Width
            c(4, k + 1) = ctl.Height
            c(5, k + 1) = ctl.Font.Size
            c(6, k + 1) = ctl.Font.Style
            i = ctl.Controls.Count
            If i > 0 Then
                taga(ctl, ctl.Width, ctl.Height)
            End If
        Next ctl
    End Sub
    Private Sub mudar(ByVal cm As Object, ByVal s As String,
ByVal n
As Integer, ByVal x As Double, ByVal y As Double)
        On Error Resume Next
        'Dim i, k As Integer
        Dim ct As Control
        For Each ct In cm.controls
            If ct.Name = s Then
                ct.Left = c(1, n) * x
                ct.Top = c(2, n) * y
                ct.Width = c(3, n) * x
                ct.Height = c(4, n) * y
                If x < y Then
                    ct.Font = New
System.Drawing.Font(ct.Font.Name,
c(5, n) * x)
                Else
                    ct.Font = New
System.Drawing.Font(ct.Font.Name,
c(5, n) * y)
                End If
                ct.Font = New System.Drawing.Font(ct.Font,
c(6, n))
                Exit For
            Else
                mudar(ct, s, n, x, y)
            End If
        Next
    End Sub
    Private Sub button1_Click(ByVal sender As Object, ByVal
e As
System.EventArgs) Handles Button1.Click
        On Error Resume Next

        If Not Timer1.Enabled Then

            CountDownStart =
Microsoft.VisualBasic.DateAndTime.Timer
            Timer1.Enabled = True
            Button1.Text = "Stop"
            Button1.Image = My.Resources.stop_up ' Changes
the image
to a square Stop icon.
            Button2.Text = "Pause"
            Button2.Image = My.Resources.pause_up ' Changes
the image
to a Pause icon.

            Button2.Enabled = True

        Else
            Timer1.Enabled = False
            Label2.Text = "0" & iRoundLength
& ":00"
            'My.Computer.Audio.Play(
            Button1.Text = "Start"
            Button1.Image = My.Resources.play_dn
            Button2.Text = "-----"
            Button2.Image = Nothing
            Button2.Enabled = False

        End If

    End Sub
    Private Sub Button2_Click(ByVal sender As Object, ByVal
e As
System.EventArgs) Handles Button2.Click
        On Error Resume Next
        Static PauseInterval
        If Timer1.Enabled Then
            PauseInterval =
Microsoft.VisualBasic.DateAndTime.Timer -
CountDownStart
            Timer1.Enabled = False
            Button1.Text = "Restart"
            Button2.Text = "Resume"
            Button2.Image = My.Resources.play_dn
        Else
            CountDownStart =
Microsoft.VisualBasic.DateAndTime.Timer -
PauseInterval
            Timer1.Enabled = True
            Button1.Text = "Stop"
            Button1.Image = My.Resources.stop_up
            Button2.Text = "Pause"
            Button2.Image = My.Resources.pause_up

        End If
    End Sub
    Public Sub IncrementRoundNumber()
        On Error Resume Next


        'These 2 line make sure that the round number doesnt
go behond
the current number of rounds or less than the 1
        If iRoundNumber > sTotalRows - 1 Then
iRoundNumber =
sTotalRows - 1
        If iRoundNumber < 1 Then iRoundNumber = 1

        'These next few lines read the data from the form1
data grid
for the next round
        'by increaseing or decreaseing the Round Number
variable
(iRoundNumber) we can
        'either skip forward to the next blind or go back to
the
previous round
        'we subtract 1 from the round number as the grid
starts at 0,0
and our Round Numbers
        'start with 1.
        iRoundLength =
frmStructure.RoundDetailsDataGridView.Item(1,
iRoundNumber - 1).Value

        RoundLength = iRoundLength * 600
        iSmallBlind =
frmStructure.RoundDetailsDataGridView.Item(2,
iRoundNumber - 1).Value
        iBigBlind =
frmStructure.RoundDetailsDataGridView.Item(3,
iRoundNumber - 1).Value
        iAnte =
frmStructure.RoundDetailsDataGridView.Item(4,
iRoundNumber - 1).Value
        iNextSmall =
frmStructure.RoundDetailsDataGridView.Item(2,
iRoundNumber).Value
        iNextBig =
frmStructure.RoundDetailsDataGridView.Item(3,
iRoundNumber).Value
        iNextAnte =
frmStructure.RoundDetailsDataGridView.Item(4,
iRoundNumber).Value



        Me.Text = "Holdem Tournament Timer"
        'Button1.Text = "Start"
        'Button2.Text = "Pause"

        'Here we update the form with the new values
        Label1.Text = "Round " & iRoundNumber

        If iRoundLength < 10 Then
            Label2.Text = "0" & iRoundLength
& ":00" ' Label2 is the
Round Length as is the large label in the middle of the
screen.
        Else
            Label2.Text = iRoundLength &
":00"
        End If

        Label3.Text = iSmallBlind
        Label4.Text = iBigBlind
        Label5.Text = iAnte
        Label10.Text = iNextSmall
        Label14.Text = iNextBig
        Label13.Text = iNextAnte

        CountDownStart =
Microsoft.VisualBasic.DateAndTime.Timer

        ToolStripStatusLabel1.Text = "Round:"
& iRoundNumber



        Call Timer1_Tick(Me, Nothing) ' this takes the cycle
back to
Timer1_tick and starts
        'the countdown again with the new values.

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object,
ByVal e
As System.EventArgs) Handles Button4.Click
        iRoundNumber += 1
        IncrementRoundNumber()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object,
ByVal e
As System.EventArgs) Handles Button3.Click
        iRoundNumber -= 1
        IncrementRoundNumber()
    End Sub

    Public Sub Timer1_Tick(ByVal sender As System.Object,
ByVal e As
System.EventArgs) Handles Timer1.Tick
        On Error Resume Next
        Dim MinDiff
        Dim SecDiff
        'Dim TenthDiff
        Dim TimeDiff
        'Dim RoundTime
        TimeDiff = (RoundLength) -
Int((Microsoft.VisualBasic.DateAndTime.Timer -
CountDownStart) * 10)
        If TimeDiff = 1200 Then
           
My.Computer.Audio.Play("C:NDLPokerSoundEffects
gong.wav")
        End If

        If TimeDiff >= 0 Then
            'TenthDiff = TimeDiff Mod 10
            SecDiff = Int(TimeDiff / 10) Mod 60
            MinDiff = Int(TimeDiff / 600)
            iTime = Format(DateTime.Now, "hh:mm
tt")
            If CurrentTimeToolStripMenuItem.Checked = True
Then
                Label16.Text = iTime
            End If
            Label2.Text = Format(MinDiff, "00")
& ":" &
Format(SecDiff, "00") '& "." &
Format(TenthDiff, "0")
        Else
           
My.Computer.Audio.Play("C:NDLPokerSoundEffects
boxingbellmulti.wav")

            'Label2.Text = "00:00"
            'Timer1.Enabled = False

            iRoundNumber += 1
            'Button1.Text = "Start"
            'Button2.Text = "-----"
            'Button2.Enabled = False
            IncrementRoundNumber()

        End If
        Application.DoEvents()

    End Sub
    Private Sub ExitToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ExitToolStripMenuItem.Click
        Application.Exit()
    End Sub
    Private Sub
ChangeBlindStructureToolStripMenuItem_Click(ByVal
sender As System.Object, ByVal e As System.EventArgs)
Handles
ChangeBlindStructureToolStripMenuItem.Click
        frmStructure.Show()

    End Sub
    Private Sub AboutToolStripMenuItem_Click(ByVal sender
As
System.Object, ByVal e As System.EventArgs) Handles
AboutToolStripMenuItem.Click
        AboutBox1.Show()
    End Sub
    Private Sub CurrentTimeToolStripMenuItem_Click(ByVal
sender As
System.Object, ByVal e As System.EventArgs) Handles
CurrentTimeToolStripMenuItem.Click
        If CurrentTimeToolStripMenuItem.Checked = True Then
            CurrentTimeToolStripMenuItem.Checked = False
            Label16.Text = iTime
            GroupBox1.Visible = False
        ElseIf CurrentTimeToolStripMenuItem.Checked = False
Then
            CurrentTimeToolStripMenuItem.Checked = True
            GroupBox1.Visible = True
            Label16.Text = iTime
        End If
    End Sub

    Private Sub
AverageChipStackToolStripMenuItem_Click(ByVal sender
As System.Object, ByVal e As System.EventArgs) Handles
AverageChipStackToolStripMenuItem.Click
        If AverageChipStackToolStripMenuItem.Checked = True
Then
            AverageChipStackToolStripMenuItem.Checked =
False
            GroupBox2.Visible = False
        ElseIf AverageChipStackToolStripMenuItem.Checked =
False Then
            AverageChipStackToolStripMenuItem.Checked =
True
            GroupBox2.Visible = True
        End If
    End Sub

    Private Sub TimerDetailsToolStripMenuItem_Click(ByVal
sender As
System.Object, ByVal e As System.EventArgs) Handles
TimerDetailsToolStripMenuItem.Click

        If TimerDetailsToolStripMenuItem.Checked = True
Then
            TimerDetailsToolStripMenuItem.Checked = False
            GroupBox3.Visible = False
        ElseIf TimerDetailsToolStripMenuItem.Checked = False
Then
            TimerDetailsToolStripMenuItem.Checked = True
            GroupBox3.Visible = True
        End If

    End Sub

    Private Sub TextBox2_Leave(ByVal sender As Object, ByVal
e As
System.EventArgs) Handles TextBox2.Leave
        'iNumberOfPlayers = TextBox2.Text
        'NumericUpDown1.Value = iNumberOfPlayers
        chipstackcalcs()
    End Sub

    Private Sub NumericUpDown1_ValueChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
NumericUpDown1.ValueChanged
        iPlayersRemaining = NumericUpDown1.Value
        If NumericUpDown1.Value > iNumberOfPlayers Then
NumericUpDown1.Value = iNumberOfPlayers
        If NumericUpDown1.Value < 1 Then
NumericUpDown1.Value = 1
        'iAverageStack = iNumberOfPlayers * iStartingStack
/
iPlayersRemaining
        'Label20.Text = iAverageStack
        chipstackcalcs()
    End Sub

    Private Sub TextBox1_Leave(ByVal sender As Object, ByVal
e As
System.EventArgs) Handles TextBox1.Leave
        iStartingStack = CDbl(TextBox1.Text)
        chipstackcalcs()
    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As
System.Object,
ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        'chipstackcalcs()
    End Sub
    Public Sub chipstackcalcs()
        iNumberOfPlayers = CDbl(TextBox2.Text)
        NumericUpDown1.Value = iNumberOfPlayers
        iPlayersRemaining = NumericUpDown1.Value
        iAverageStack = iNumberOfPlayers * iStartingStack /
iPlayersRemaining
        Label20.Text = iAverageStack
    End Sub




I'd be greatful for any advise or points in the right
direction.



On Oct 19, 8:24 pm, "Andrew Badera" <and...badera.us> wrote:
> Well, that's more COM/interop than it is the debugger
:P
>
> Do you know what components you're using interop to
work with? I take it
> you're working with an older component, in a .NET
environment?
>
> Are you using p/invoke anywhere? (DllImport) ...
>
> On 10/19/07, Bails <andrewgbail...gmail.com> wrote:
>
>
>
>
>
> > Your probably right Andrew, though I now have
another example of the
> > debugger being a bugga and spitting out
gobledegook.
>
> > I have listed it below.
> > If you can make any sense of it I'd be greatful.
>
> > All I can make out from the following error is
that i dont have
> > "referenced assembly installed" on my
machine - but which reference??
>
> >
************************************************************
***************­************
> > PLATFORM VERSION INFO
> >         Windows                         :
5.1.2600.131072 (Win32NT)
> >         Common Language Runtime         :
2.0.50727.1378
> >         System.Deployment.dll           :
2.0.50727.1378
> > (REDBITSB2.050727-1300)
> >         mscorwks.dll                    :
2.0.50727.1378
> > (REDBITSB2.050727-1300)
> >         dfdll.dll                       :
2.0.50727.1378
> > (REDBITSB2.050727-1300)
> >         dfshim.dll                      :
2.0.50727.1378
> > (REDBITSB2.050727-1300)
>
> > SOURCES
> >         Deployment url                  :
>
> >
file:///C:/Documents%20and%20Settings/fabian/My%20Documents/
Visual%20Studio­­%202005/Projects/Holdem%20Tournament%20Time
r/Published/Holdem%20Tournament­%­20Timer.application
> >         Application url                 :
>
> >
file:///C:/Documents%20and%20Settings/fabian/My%20Documents/
Visual%20Studio­­%202005/Projects/Holdem%20Tournament%20Time
r/Published/Holdem%20Tournament­%­20Timer_1_0_1_13/Holdem%20
Tournament%20Timer.exe.manifest
>
> > IDENTITIES
> >         Deployment Identity             : Holdem
Tournament
> > Timer.application,
> > Version=1.0.1.13, Culture=en-AU,
PublicKeyToken=a675fef2688dba94,
> > processorArchitecture=msil
> >         Application Identity            : Holdem
Tournament
> > Timer.exe,
> > Version=1.0.1.13, Culture=en-AU,
PublicKeyToken=a675fef2688dba94,
> > processorArchitecture=msil, type=win32
>
> > APPLICATION SUMMARY
> >         * Installable application.
>
> > ERROR SUMMARY
> >         Below is a summary of the errors, details
of these errors are
> > listed
> > later in the log.
> >         * Activation of C:Documents and
SettingsfabianMy Documents
> > Visual
> > Studio 2005ProjectsHoldem Tournament
TimerPublishedHoldem
> > Tournament Timer.application resulted in
exception. Following failure
> > messages were detected:
> >                 + The referenced assembly is not
installed on your
> > system.
> > (Exception from HRESULT: 0x800736B3)
>
> > COMPONENT STORE TRANSACTION FAILURE SUMMARY
> >         No transaction error was detected.
>
> > WARNINGS
> >         There were no warnings during this
operation.
>
> > OPERATION PROGRESS STATUS
> >         * [19/10/2007 10:04:09 AM] : Activation of
C:Documents and
> > Settings
> > fabianMy DocumentsVisual Studio
2005ProjectsHoldem Tournament
> > TimerPublishedHoldem Tournament
Timer.application has started.
> >         * [19/10/2007 10:04:27 AM] : Processing of
deployment manifest
> > has
> > successfully completed.
> >         * [19/10/2007 10:04:27 AM] : Installation
of the application
> > has
> > started.
> >         * [19/10/2007 10:04:27 AM] : Processing of
application
> > manifest has
> > successfully completed.
> >         * [19/10/2007 10:04:49 AM] : Request of
trust and detection
> > of
> > platform is complete.
> >         * [19/10/2007 10:04:50 AM] : Downloading
of subscription
> > dependencies
> > is complete.
> >         * [19/10/2007 10:04:50 AM] : Commit of the
downloaded
> > application has
> > started.
>
> > ERROR DETAILS
> >         Following errors were detected during this
operation.
> >         * [19/10/2007 10:04:50 AM]
> > System.Runtime.InteropServices.COMException
> >                 - The referenced assembly is not
installed on your
> > system.
> > (Exception from HRESULT: 0x800736B3)
> >                 - Source: System.Deployment
> >                 - Stack trace:
> >                         at
> >
System.Deployment.Internal.Isolation.IStore.GetAssemblyInfor
mation(UInt32
> > Flags, IDefinitionIdentity DefinitionIdentity,
Guid& riid)
> >                         at
> >
System.Deployment.Internal.Isolation.Store.GetAssemblyManife
st(UInt32
> > Flags, IDefinitionIdentity DefinitionIdentity)
> >                         at
> >
System.Deployment.Application.ComponentStore.GetSubscription
StateInternal
> > (D­
> > efinitionIdentity
> > subId)
> >                         at
>
> >
System.Deployment.Application.SubscriptionStore.GetSubscript
ionStateInterna­­
> > l(SubscriptionState
> > subState)
> >                         at
> >
System.Deployment.Application.ComponentStore.CollectCrossGro
upApplications
> > (­
> > Uri
> > codebaseUri, DefinitionIdentity
deploymentIdentity, Boolean&
> > identityGroupFound, Boolean&
locationGroupFound, String&
> > identityGroupProductName)
> >                         at
> >
System.Deployment.Application.SubscriptionStore.CommitApplic
ation
> > (Subscript­
> > ionState&
> > subState, CommitApplicationParams commitParams)
> >                         at
> >
System.Deployment.Application.ApplicationActivator.InstallAp
plication
> > (Subsc­
> > riptionState&
> > subState, ActivationDescription actDesc)
> >                         at
>
> >
System.Deployment.Application.ApplicationActivator.PerformDe
ploymentActivat­­
> > ion(Uri
> > activationUri, Boolean isShortcut)
> >                         at
>
> >
System.Deployment.Application.ApplicationActivator.ActivateD
eploymentWorker­­
> > (Object
> > state)
>
> > COMPONENT STORE TRANSACTION DETAILS
> >         No transaction information is available.
>
> > On Oct 19, 11:37 am, "Andrew Badera"
<and...badera.us> wrote:
> > > The debugger really does, typically, explain
things as plainly as
> > possible.
> > > However, there IS a TON of context to grok
before all debugger messages
> > make
> > > sense. I can attest to several gurus I've
worked with being completely
> > > puzzled by debugger info, sometimes for days
or weeks on end.
>
> > > In this case, however, I think it was just a
matter, to be honest, of
> > you
> > > exploring the issue further. The message, or
message of the inner
> > exception,
> > > typically gives pretty specific detail.
>
> > > --ab
>
> > > On 10/18/07, Bails <andrewgbail...gmail.com> wrote:
>
> > > > It would be nice if the debuggar would
explain things in plain
> > > > language.
>
> > > > It was an absolute fluke that I found
the answer to my problem,
> > > > nothing to do with the debuggar (other
than it stopped my app EVERY
> > > > time).
>
> > > > On Oct 19, 10:32 am, "Andrew
Badera" <and...badera.us> wrote:
> > > > > F5? What is this F5?
>
> > > > > Personally I like to right-click my
solution to build ... none of
> > this
> > > > silly
> > > > > shortcut key crap ... explicitness
and transparency in all things!
>
> > > > > On 10/18/07, Cerebrus
<zorg...sify.com> wrote:
>
> > > > > > Yup, posting here and waiting
for responses is easier than
> > pressing
> > > > > > the F5 key... :P
>
> > > > > > On Oct 18, 5:52 pm,
"Jamie Fraser" <jamie.fra...gmail.com> wrote:
> > > > > > > What is this debugger you
speak of? I normally just post here
> > when I
> > > > > > > have a bug in my code :/
>
> > > > > > > On 18/10/2007, cleveridea
<cleveridea....gmail.com> wrote:
>
> > > > > > > > Isn't the debugger a
wonderful thing- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted
text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at
http:
//cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---


Re: Update data in a DataGrid
user name
2007-10-19 18:17:02
That Holdem (Hold 'Em?)/Redbits stuff ... are you referencing someone else's component somewhere? I tried looking through your unformatted code, but it's kind of tough ... and I lean towards C#, so reading unformatted VB.NET is especially hard ... are you including someone else's component on your form?




On 10/19/07, Bails < andrewgbailliegmail.com">andrewgbailliegmail.com> wrote:

No. I have NO IDEA what  Com/interop is. I have posted my code below
if that helps.

Its a simple timer program for Texas Holdem Poker i am working on.


Theree are only 2 forms. The first uses a datagrid connected to an MS
Access database back end.

The 2nd has a few labels, a timer and Menu bars on it - nothing
special.

*****************************************************
Form1 Code
Public Class frmStructure

   ; Private Sub RoundDetailsBindingNavigatorSaveItem_Click(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
RoundDetailsBindingNavigatorSaveItem.Click
&nbsp; &nbsp; &nbsp;   ;Me.Validate()
 &nbsp;   ; &nbsp; Me.RoundDetailsBindingSource.EndEdit ()

Me.RoundDetailsTableAdapter.Update(Me.RoundInfoDataSet.RoundDetails)
&nbsp; &nbsp; End Sub

 ; &nbsp; Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
 &nbsp; &nbsp; &nbsp;  'TODO: This line of code loads data into the
'RoundInfoDataSet.RoundDetails'; table. You can move, or remove it, as
needed.

Me.RoundDetailsTableAdapter.Fill(Me.RoundInfoDataSet.RoundDetails)

 &nbsp;  End Sub

 ; &nbsp; Private Sub BtnGoToTimer_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BtnGoToTimer.Click
&nbsp; &nbsp;   ; &nbsp;Form2.Show()
 &nbsp;   ; &nbsp; Me.Hide()
*****************************************************************************************************8
Form2 Code
Inherits System.Windows.Forms.Form
   ; Dim c(6, 0) As String
&nbsp; &nbsp; Dim xx, yy As Long

&nbsp; &nbsp; &#39;These next few lines set up the start ofthe timer. They take the
values from the datagrid on form1.
&nbsp; &nbsp; 'IMPORTANT: For these lines to extract the values, the project
MUST start on Form1, then o to this form,
&nbsp; &nbsp; &#39;otherwise it cannot read any values.
&nbsp; &nbsp; 'The grid is filled across the rows and start at 0 (Zero).
&nbsp;   ;'The first Number represents the Row, the second represents the
Column.
 &nbsp; &nbsp;'So to fill our data across the page for Round 1 would like like:
&nbsp; &nbsp; &#39;(0,0),(1,0),(2,0),(3,0),(4,0) etc
   ; '; Round 2 would be (0,1),(1,1),(2,1),(3,1),(4,1)
&nbsp;   ;Dim iRoundNumber As Integer =
frmStructure.RoundDetailsDataGridView.Item(0, 0).Value&nbsp;  ' Set Round
Number - this is the top left cell of the datagrid (0,0)
&nbsp; &nbsp; Dim iRoundLength As Integer =
frmStructure.RoundDetailsDataGridView.Item (1, 0).Value&nbsp;  ' set Round
Length - this is the top Row and 1 in - (0,1)
&nbsp; &nbsp; Dim iSmallBlind As Integer =
frmStructure.RoundDetailsDataGridView.Item(2, 0).Value&nbsp; &nbsp; ' set the
Small Blind amount.
&nbsp; &nbsp; Dim iBigBlind As Integer =
frmStructure.RoundDetailsDataGridView.Item(3, 0).Value&nbsp; &nbsp;   ;' Set the
Big Blind amount.
&nbsp; &nbsp; Dim iAnte As Integer =
frmStructure.RoundDetailsDataGridView.Item(4, 0).Value&nbsp; &nbsp;   ; &nbsp; &nbsp;' Set
the Ante Amount
&nbsp; &nbsp; Dim RoundLength = iRoundLength * 600 ' Converts the Round Length
into Seconds

&nbsp;   ;'These next few lines load up the 'Next Round (Round 2) data
 ; &nbsp; Dim iNextSmall As Integer =
frmStructure.RoundDetailsDataGridView.Item (2, 1).Value&nbsp; &nbsp;  ' Set the
next Small Blind
&nbsp; &nbsp; Dim iNextBig As Integer =
frmStructure.RoundDetailsDataGridView.Item(3, 1).Value&nbsp; &nbsp;   ; ' Set the
next Big Blind
&nbsp; &nbsp; Dim iNextAnte As Integer =
frmStructure.RoundDetailsDataGridView.Item (4, 1).Value&nbsp; &nbsp;   ; &nbsp; ' Set
the next Ante

&nbsp; &nbsp; Dim sTotalRows As String =
frmStructure.RoundDetailsDataGridView.RowCount.ToString ' sets the
total number of rows in the datagrid.
  ; &nbsp;Dim iTime As String '= Format( DateTime.Now, "hh:mm tt") ' Sets
Curent Time

&nbsp; &nbsp; Dim iPlayersRemaining As Integer
&nbsp; &nbsp; Dim iNumberOfPlayers As Integer
&nbsp; &nbsp; Dim iStartingStack As Integer
&nbsp; &nbsp; Dim iAverageStack As Integer

  ; &nbsp;Private Sub Form2_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
&nbsp; &nbsp;   ; &nbsp;On Error Resume Next
 ; &nbsp; &nbsp; &nbsp; &#39;These next few lines are to assist with resizing the form and
controls
 &nbsp;   ; &nbsp; xx = Me.ClientSize.Width
&nbsp;   ; &nbsp; &nbsp;yy = Me.ClientSize.Height
  ; &nbsp; &nbsp; &nbsp;taga(Me, xx, yy)

 ; &nbsp; &nbsp; &nbsp; &#39;TODO: This line of code loads data into the
'RoundInfoDataSet.RoundDetails' table. You can move, or remove it, as
needed.

 &nbsp; &nbsp;   ; iTime = Format(DateTime.Now, "hh:mm tt") 'DateTime.Now


&nbsp;   ; &nbsp; &nbsp;ToolStripStatusLabel1.Text = "Round:" & iRoundNumber
 &nbsp; &nbsp;   ; ';ToolStripStatusLabel2.Text = "Small Blind: " & iSmallBlind
 &nbsp; &nbsp; &nbsp;  'ToolStripStatusLabel3.Text = "Big Blind: " & iBigBlind
  ; &nbsp; &nbsp; &nbsp;'ToolStripStatusLabel4.Text = "Ante: " & iAnte
&nbsp; &nbsp; &nbsp; &nbsp; ' ToolStripStatusLabel6.Text = iTime

&nbsp; &nbsp; &nbsp;   ;'Once the variables for the round have been dimenshioned and
set, we display them on the screen. Round 1 is the first displayed.
 &nbsp; &nbsp; &nbsp; &nbsp;Label1.Text = "Round: " & iRoundNumber 'Label1 is the Round
Number
 &nbsp;   ; &nbsp; If iRoundLength < 10 Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;Label2.Text = "0&quot; & iRoundLength & ":00&quot; ' Label2 is the
Round Length as is the large label in the middle of the screen.
&nbsp;   ; &nbsp; &nbsp;Else
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;Label2.Text = iRoundLength & ":00&quot;
 ; &nbsp; &nbsp; &nbsp; End If
 &nbsp;   ; &nbsp; Label3.Text = iSmallBlind &nbsp; &nbsp; &nbsp; ' Label3 is thye Small Blind
amount
 &nbsp; &nbsp;   ; Label4.Text = iBigBlind&nbsp;   ; &nbsp; &nbsp; ' label4 is the Big Blind
&nbsp; &nbsp; &nbsp;   ;Label5.Text = iAnte ; &nbsp; &nbsp; &nbsp; &nbsp;   ; ' Label5 is the ante

&nbsp; &nbsp; &nbsp; &nbsp; Label10.Text = iNextSmall  ; &nbsp; &nbsp; ' Label10 is the Next Small
Blind
 &nbsp; &nbsp; &nbsp;  Label14.Text = iNextBig&nbsp; &nbsp;   ; &nbsp; ' Label14 is the Next Big
Blind
 &nbsp; &nbsp; &nbsp; &nbsp;Label13.Text = iNextAnte&nbsp;   ; &nbsp; &nbsp;' Label13 is the Next Ante
Amount

 &nbsp; &nbsp;   ; Timer1.Enabled = False
&nbsp; &nbsp; &nbsp; &nbsp; Button1.Text = "Start"
&nbsp; &nbsp; &nbsp;   ;Button2.Text = "Pause"
&nbsp; &nbsp;   ; &nbsp;'Button1.Image = C:Documents and SettingsfabianApplication
DataLimeWirethemesother_themeplay_dn.gif
 &nbsp; &nbsp; &nbsp;  Label16.Text = iTime
&nbsp; &nbsp; &nbsp; &nbsp; CurrentTimeToolStripMenuItem.Checked = True
 ; &nbsp; &nbsp; &nbsp; AverageChipStackToolStripMenuItem.Checked = True

&nbsp; &nbsp; End Sub
   ; Private CountDownStart

 ; &nbsp; Private Sub Form2_Resize(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Resize
  ; &nbsp; &nbsp; &nbsp;On Error Resume Next
 ; &nbsp; &nbsp; &nbsp; Dim sX, sY As Double
&nbsp; &nbsp;   ; &nbsp;Dim j As Integer

&nbsp;   ; &nbsp; &nbsp;On Error Resume Next
 ; &nbsp; &nbsp; &nbsp; sX = Me.ClientSize.Width / xx
 &nbsp;   ; &nbsp; sY = Me.ClientSize.Height / yy
 &nbsp;   ; &nbsp; For j = 1 To c.GetUpperBound(1)
&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;mudar(Me, c(0, j), j, sX, sY)
 ; &nbsp; &nbsp; &nbsp; Next j

 &nbsp;  End Sub

 ; &nbsp; Private Sub taga(ByVal ct As Object, ByVal w As Long, ByVal h As
Long)
&nbsp;   ; &nbsp; &nbsp;On Error Resume Next
 ; &nbsp; &nbsp; &nbsp; Dim i, k As Integer
&nbsp; &nbsp;   ; &nbsp;Dim ctl As Control
&nbsp; &nbsp;   ; &nbsp;For Each ctl In ct.Controls
 &nbsp; &nbsp;   ; &nbsp; &nbsp; If ctl.Name = "&quot; Then Exit For
   ; &nbsp; &nbsp; &nbsp; &nbsp; k = c.GetUpperBound(1)
&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;ReDim Preserve c(6, k + 1)
 &nbsp;   ; &nbsp; &nbsp; &nbsp; c(0, k + 1) = ctl.Name
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;c(1, k + 1) = ctl.Left
  ; &nbsp; &nbsp; &nbsp; &nbsp;  c(2, k + 1) = ctl.Top
&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;c(3, k + 1) = ctl.Width
  ; &nbsp; &nbsp; &nbsp; &nbsp;  c(4, k + 1) = ctl.Height
 &nbsp; &nbsp; &nbsp; &nbsp;   ; c(5, k + 1) = ctl.Font.Size
 &nbsp;   ; &nbsp; &nbsp; &nbsp; c(6, k + 1) = ctl.Font.Style
   ; &nbsp; &nbsp; &nbsp; &nbsp; i = ctl.Controls.Count
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;If i > 0 Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;taga(ctl, ctl.Width, ctl.Height)
 &nbsp; &nbsp; &nbsp;   ; &nbsp; End If
 &nbsp;   ; &nbsp; Next ctl
   ; End Sub
   ; Private Sub mudar(ByVal cm As Object, ByVal s As String, ByVal n
As Integer, ByVal x As Double, ByVal y As Double)
&nbsp; &nbsp;   ; &nbsp;On Error Resume Next
 ; &nbsp; &nbsp; &nbsp; &#39;Dim i, k As Integer
&nbsp; &nbsp;   ; &nbsp;Dim ct As Control
&nbsp; &nbsp;   ; &nbsp;For Each ct In cm.controls
 &nbsp; &nbsp; &nbsp;   ; &nbsp; If ct.Name = s Then
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;ct.Left = c(1, n) * x
 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; ct.Top = c(2, n) * y
 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; ct.Width = c(3, n) * x
 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; ct.Height = c(4, n) * y
 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; If x < y Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; ct.Font = New System.Drawing.Font(ct.Font.Name,
c(5, n) * x)
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;Else
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;ct.Font = New System.Drawing.Font(ct.Font.Name ,
c(5, n) * y)
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;End If
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;ct.Font = New System.Drawing.Font(ct.Font, c(6, n))
   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;Exit For
   ; &nbsp; &nbsp; &nbsp; &nbsp; Else
   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;mudar(ct, s, n, x, y)
 &nbsp;   ; &nbsp; &nbsp; &nbsp; End If
   ; &nbsp; &nbsp; Next
 &nbsp; &nbsp;End Sub
   ; Private Sub button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
 &nbsp;   ; &nbsp; On Error Resume Next

&nbsp; &nbsp; &nbsp; &nbsp; If Not Timer1.Enabled Then

&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;CountDownStart = Microsoft.VisualBasic.DateAndTime.Timer
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;Timer1.Enabled = True
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;Button1.Text = "Stop"
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;Button1.Image = My.Resources.stop_up ' Changes the image
to a square Stop icon.
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;Button2.Text = "Pause"
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;Button2.Image = My.Resources.pause_up ' Changes the image
to a Pause icon.

&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;Button2.Enabled = True

&nbsp; &nbsp; &nbsp;   ;Else
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;Timer1.Enabled = False
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;Label2.Text = "0&quot; & iRoundLength & ":00&quot;
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;'My.Computer.Audio.Play(
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;Button1.Text = "Start"
&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;Button1.Image = My.Resources.play_dn
  ; &nbsp; &nbsp; &nbsp; &nbsp;  Button2.Text = "-----"
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;Button2.Image = Nothing
&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;Button2.Enabled = False

&nbsp; &nbsp; &nbsp;   ;End If

   ; End Sub
 ; &nbsp; Private Sub Button2_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button2.Click
 &nbsp;   ; &nbsp; On Error Resume Next
 ; &nbsp; &nbsp; &nbsp; Static PauseInterval
 &nbsp;   ; &nbsp; If Timer1.Enabled Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;PauseInterval = Microsoft.VisualBasic.DateAndTime.Timer -
CountDownStart
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;Timer1.Enabled = False
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;Button1.Text = "Restart"
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;Button2.Text = "Resume"
&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;Button2.Image = My.Resources.play_dn
  ; &nbsp; &nbsp; &nbsp;Else
&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;CountDownStart = Microsoft.VisualBasic.DateAndTime.Timer -
PauseInterval
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;Timer1.Enabled = True
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;Button1.Text = "Stop"
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; Button1.Image = My.Resources.stop_up
  ; &nbsp; &nbsp; &nbsp; &nbsp;  Button2.Text = "Pause"
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;Button2.Image = My.Resources.pause_up

 &nbsp; &nbsp; &nbsp;  End If
 &nbsp;  End Sub
   ; Public Sub IncrementRoundNumber()
 &nbsp; &nbsp; &nbsp;  On Error Resume Next


&nbsp; &nbsp;   ; &nbsp;'These 2 line make sure that the round number doesnt go behond
the current number of rounds or less than the 1
 &nbsp; &nbsp;   ; If iRoundNumber > sTotalRows - 1 Then iRoundNumber =
sTotalRows - 1
 &nbsp;   ; &nbsp; If iRoundNumber < 1 Then iRoundNumber = 1

 &nbsp;   ; &nbsp; 9;These next few lines read the data from the form1 data grid
for the next round
&nbsp; &nbsp; &nbsp; &nbsp; 'by increaseing or decreaseing the Round Number variable
(iRoundNumber) we can
   ; &nbsp; &nbsp; &#39;either skip forward to the next blind or go back to the
previous round
&nbsp; &nbsp; &nbsp; &nbsp; 'we subtract 1 from the round number as the grid starts at 0,0
and our Round Numbers
&nbsp;   ; &nbsp; &nbsp;'start with 1.
 &nbsp;   ; &nbsp; iRoundLength = frmStructure.RoundDetailsDataGridView.Item(1,
iRoundNumber - 1).Value

  ; &nbsp; &nbsp; &nbsp;RoundLength = iRoundLength * 600
   ; &nbsp; &nbsp; iSmallBlind = frmStructure.RoundDetailsDataGridView.Item (2,
iRoundNumber - 1).Value
&nbsp;   ; &nbsp; &nbsp;iBigBlind = frmStructure.RoundDetailsDataGridView.Item(3,
iRoundNumber - 1).Value
&nbsp;   ; &nbsp; &nbsp;iAnte = frmStructure.RoundDetailsDataGridView.Item(4,
iRoundNumber - 1).Value
  ; &nbsp; &nbsp; &nbsp;iNextSmall = frmStructure.RoundDetailsDataGridView.Item(2,
iRoundNumber).Value
 &nbsp; &nbsp; &nbsp; &nbsp;iNextBig = frmStructure.RoundDetailsDataGridView.Item(3,
iRoundNumber).Value
 &nbsp; &nbsp; &nbsp; &nbsp;iNextAnte = frmStructure.RoundDetailsDataGridView.Item (4,
iRoundNumber).Value



   ; &nbsp; &nbsp; Me.Text = "Holdem Tournament Timer";
 &nbsp; &nbsp; &nbsp;  'Button1.Text = "Start"
&nbsp; &nbsp; &nbsp;   ;'Button2.Text = "Pause"

&nbsp; &nbsp;   ; &nbsp;'Here we update the form with the new values
&nbsp; &nbsp;   ; &nbsp;Label1.Text = "Round " & iRoundNumber

 &nbsp;   ; &nbsp; If iRoundLength < 10 Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;Label2.Text = "0&quot; & iRoundLength & ":00&quot; ' Label2 is the
Round Length as is the large label in the middle of the screen.
&nbsp;   ; &nbsp; &nbsp;Else
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;Label2.Text = iRoundLength & ":00&quot;
 ; &nbsp; &nbsp; &nbsp; End If

   ; &nbsp; &nbsp; Label3.Text = iSmallBlind
 &nbsp; &nbsp; &nbsp;  Label4.Text = iBigBlind
  ; &nbsp; &nbsp; &nbsp;Label5.Text = iAnte
&nbsp; &nbsp; &nbsp; &nbsp; Label10.Text = iNextSmall
 &nbsp; &nbsp; &nbsp; &nbsp;Label14.Text = iNextBig
&nbsp;   ; &nbsp; &nbsp;Label13.Text = iNextAnte

 &nbsp; &nbsp; &nbsp; &nbsp;CountDownStart = Microsoft.VisualBasic.DateAndTime.Timer

&nbsp; &nbsp;   ; &nbsp;ToolStripStatusLabel1.Text = "Round:" & iRoundNumber



&nbsp; &nbsp; &nbsp; &nbsp; Call Timer1_Tick(Me, Nothing) ' this takes the cycle back to
Timer1_tick and starts
&nbsp; &nbsp; &nbsp;   ;'the countdown again with the new values.

&nbsp;   ;End Sub

 ; &nbsp; Private Sub Button4_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button4.Click
 &nbsp;   ; &nbsp; iRoundNumber += 1
 &nbsp; &nbsp;   ; IncrementRoundNumber()
&nbsp; &nbsp; End Sub

 ; &nbsp; Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
 &nbsp;   ; &nbsp; iRoundNumber -= 1
 &nbsp; &nbsp;   ; IncrementRoundNumber()
&nbsp; &nbsp; End Sub

 ; &nbsp; Public Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
 &nbsp; &nbsp;   ; On Error Resume Next
 ; &nbsp; &nbsp; &nbsp; Dim MinDiff
&nbsp; &nbsp;   ; &nbsp;Dim SecDiff
&nbsp; &nbsp;   ; &nbsp;'Dim TenthDiff
  ; &nbsp; &nbsp; &nbsp;Dim TimeDiff
&nbsp;   ; &nbsp; &nbsp;'Dim RoundTime
  ; &nbsp; &nbsp; &nbsp;TimeDiff = (RoundLength) -
Int((Microsoft.VisualBasic.DateAndTime.Timer - CountDownStart) * 10)
   ; &nbsp; &nbsp; If TimeDiff = 1200 Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;My.Computer.Audio.Play("C:NDLPokerSoundEffects
gong.wav";)
 &nbsp; &nbsp;   ; End If

   ; &nbsp; &nbsp; If TimeDiff >= 0 Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;'TenthDiff = TimeDiff Mod 10
   ; &nbsp; &nbsp; &nbsp; &nbsp; SecDiff = Int(TimeDiff / 10) Mod 60
 &nbsp;   ; &nbsp; &nbsp; &nbsp; MinDiff = Int(TimeDiff / 600)
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;iTime = Format(DateTime.Now, "hh:mm tt")
  ; &nbsp; &nbsp; &nbsp; &nbsp;  If CurrentTimeToolStripMenuItem.Checked = True Then
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;Label16.Text = iTime
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;End If
 &nbsp;   ; &nbsp; &nbsp; &nbsp; Label2.Text = Format(MinDiff, "00&quot;) & ":&quot; &
Format(SecDiff, "00&quot;) '& ".&quot; & Format(TenthDiff, "0&quot;)
 ; &nbsp; &nbsp; &nbsp; Else
 &nbsp;   ; &nbsp; &nbsp; &nbsp; My.Computer.Audio.Play("C:NDLPokerSoundEffects
boxingbellmulti.wav")

 &nbsp; &nbsp; &nbsp;   ; &nbsp; 9;Label2.Text = "00:00"
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;'Timer1.Enabled = False

&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;iRoundNumber += 1
 &nbsp; &nbsp;   ; &nbsp; &nbsp; &#39;Button1.Text = "Start"
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;'Button2.Text = "-----"
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;'Button2.Enabled = False
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;IncrementRoundNumber()

   ; &nbsp; &nbsp; End If
 &nbsp;   ; &nbsp; Application.DoEvents()

&nbsp;   ;End Sub
   ; Private Sub ExitToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ExitToolStripMenuItem.Click
   ; &nbsp; &nbsp; Application.Exit()
 ; &nbsp; End Sub
   ; Private Sub ChangeBlindStructureToolStripMenuItem_Click(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
ChangeBlindStructureToolStripMenuItem.Click
&nbsp;   ; &nbsp; &nbsp;frmStructure.Show()

 &nbsp; &nbsp;End Sub
   ; Private Sub AboutToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AboutToolStripMenuItem.Click
   ; &nbsp; &nbsp; AboutBox1.Show ()
   ; End Sub
   ; Private Sub CurrentTimeToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CurrentTimeToolStripMenuItem.Click
  ; &nbsp; &nbsp; &nbsp;If CurrentTimeToolStripMenuItem.Checked = True Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;CurrentTimeToolStripMenuItem.Checked = False
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;Label16.Text = iTime
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;GroupBox1.Visible = False
&nbsp; &nbsp; &nbsp; &nbsp; ElseIf CurrentTimeToolStripMenuItem.Checked = False Then
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;CurrentTimeToolStripMenuItem.Checked = True
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;GroupBox1.Visible = True
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;Label16.Text = iTime
&nbsp; &nbsp; &nbsp; &nbsp; End If
 &nbsp;  End Sub

 ; &nbsp; Private Sub AverageChipStackToolStripMenuItem_Click(ByVal sender
As System.Object, ByVal e As System.EventArgs) Handles
AverageChipStackToolStripMenuItem.Click
   ; &nbsp; &nbsp; If AverageChipStackToolStripMenuItem.Checked = True Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;AverageChipStackToolStripMenuItem.Checked = False
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;GroupBox2.Visible = False
&nbsp; &nbsp; &nbsp; &nbsp; ElseIf AverageChipStackToolStripMenuItem.Checked = False Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;AverageChipStackToolStripMenuItem.Checked = True
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;GroupBox2.Visible = True
&nbsp; &nbsp; &nbsp; &nbsp; End If
 &nbsp;  End Sub

 ; &nbsp; Private Sub TimerDetailsToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
TimerDetailsToolStripMenuItem.Click

 &nbsp; &nbsp; &nbsp;  If TimerDetailsToolStripMenuItem.Checked = True Then
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;TimerDetailsToolStripMenuItem.Checked = False
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;GroupBox3.Visible = False
&nbsp; &nbsp; &nbsp; &nbsp; ElseIf TimerDetailsToolStripMenuItem.Checked = False Then
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;TimerDetailsToolStripMenuItem.Checked = True
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ;GroupBox3.Visible = True
 ; &nbsp; &nbsp; &nbsp; End If

   ; End Sub

 ; &nbsp; Private Sub TextBox2_Leave(ByVal sender As Object, ByVal e As
System.EventArgs ) Handles TextBox2.Leave
   ; &nbsp; &nbsp; &#39;iNumberOfPlayers = TextBox2.Text
 &nbsp;   ; &nbsp; 9;NumericUpDown1.Value = iNumberOfPlayers
&nbsp; &nbsp; &nbsp; &nbsp; chipstackcalcs()
 ; &nbsp; End Sub

 ; &nbsp; Private Sub NumericUpDown1_ValueChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
NumericUpDown1.ValueChanged
 &nbsp;   ; &nbsp; iPlayersRemaining = NumericUpDown1.Value
  ; &nbsp; &nbsp; &nbsp;If NumericUpDown1.Value > iNumberOfPlayers Then
NumericUpDown1.Value = iNumberOfPlayers
&nbsp; &nbsp; &nbsp; &nbsp; If NumericUpDown1.Value < 1 Then NumericUpDown1.Value = 1
 &nbsp; &nbsp;   ; ';iAverageStack = iNumberOfPlayers * iStartingStack /
iPlayersRemaining
&nbsp;   ; &nbsp; &nbsp;'Label20.Text = iAverageStack
   ; &nbsp; &nbsp; chipstackcalcs()
 &nbsp;  End Sub

 ; &nbsp; Private Sub TextBox1_Leave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TextBox1.Leave
   ; &nbsp; &nbsp; iStartingStack = CDbl(TextBox1.Text)
&nbsp;   ; &nbsp; &nbsp;chipstackcalcs()
&nbsp;   ;End Sub

 ; &nbsp; Private Sub TextBox1_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TextBox1.TextChanged
  ; &nbsp; &nbsp; &nbsp;'chipstackcalcs()
 &nbsp;  End Sub
   ; Public Sub chipstackcalcs()
&nbsp; &nbsp; &nbsp;   ;iNumberOfPlayers = CDbl(TextBox2.Text)
&nbsp;   ; &nbsp; &nbsp;NumericUpDown1.Value = iNumberOfPlayers
&nbsp; &nbsp; &nbsp; &nbsp; iPlayersRemaining = NumericUpDown1.Value
  ; &nbsp; &nbsp; &nbsp;iAverageStack = iNumberOfPlayers * iStartingStack /
iPlayersRemaining
  ; &nbsp; &nbsp; &nbsp;Label20.Text = iAverageStack
 &nbsp;  End Sub




I&#39;d be greatful for any advise or points in the right direction.



On Oct 19, 8:24 pm, "Andrew Badera&quot; < and...badera.us"> and...badera.us> wrote:
>; Well, that's more COM/interop than it is the debugger :P
>
&gt; Do you know what components you're using interop to work with? I take it
> you're working with an older component, in a .NET environment?
>
&gt; Are you using p/invoke anywhere? (DllImport) ...
>
&gt; On 10/19/07, Bails < andrewgbail...gmail.com">andrewgbail...gmail.com> wrote:
>;
>
>
>
>
> > Your probably right Andrew, though I now have another example of the
> > debugger being a bugga and spitting out gobledegook.
>
>; > I have listed it below.
>; > If you can make any sense of it I'd be greatful.
>
> > All I can make out from the following error is that i dont have
> > "referenced assembly installed&quot; on my machine - but which reference??
>
> > ***************************************************************************­************
> > PLATFORM VERSION INFO
> >   ; &nbsp; &nbsp;  Windows&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  : 5.1.2600.131072 (Win32NT)
> >   ; &nbsp; &nbsp;  Common Language Runtime&nbsp; &nbsp; &nbsp;   ; : 2.0.50727.1378
> >   ; &nbsp; &nbsp;  System.Deployment.dll  &nbsp; &nbsp; &nbsp; &nbsp;   : 2.0.50727.1378
> > (REDBITSB2.050727-1300)
> >   ; &nbsp; &nbsp;  mscorwks.dll &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;: 2.0.50727.1378
> > (REDBITSB2.050727-1300)
> >   ; &nbsp; &nbsp;  dfdll.dll&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;  : 2.0.50727.1378
> > (REDBITSB2.050727-1300)
> >   ; &nbsp; &nbsp;  dfshim.dll  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;