I'm having a hell'ish time today, thankfully it only happens every now and then
First of all using ControlsEx I have a program that works perfectly in the B4PPC environment but gives errors once compiled. By inserting MsgBoxes into my code I have found the the probelm is when I add Separators into my Toolstrip...
If I remove the For Next loop and add each seperator normally it all works
The problem only presents itself when I run the compiled file!
The next problem I have is with using a SerialEx object on a Form that is attached to a FormExDesktop.New1( "FrmPrintCapture" ) when the SerialOnComm fires it causes B4PPC to close down. Removing the FormEx items and the problem goes away. I have tried to add the SerialEx object to the extended Form but it doesn't seem to work, Is this because I need to use a controlref property for which there isn't one?
I have tried...
FrmExLib.AddControl( Serial )
FrmExLib.AddControl( "Serial" )
FrmExLib.AddControl( Serial.ControlRef )
Where Serial is a SerialEx object and FrmExLib is a FormEx object
Sorry for being a nussiance, I've attempted to fix the problem myself but am now at a loss.
Regards,
RandomCoder
First of all using ControlsEx I have a program that works perfectly in the B4PPC environment but gives errors once compiled. By inserting MsgBoxes into my code I have found the the probelm is when I add Separators into my Toolstrip...
B4X:
#Region Create Seperators For Ts
'Create seperators for Tool Strip controls
For x = 0 To 4
Control( "SprTs" & x , "ToolStripSeperator" ).New1
Control( "SprTs" & x , "ToolStripSeperator" ).AutoSize = False
Control( "SprTs" & x , "ToolStripSeperator" ).Height = 50
Control( "SprTs" & x , "ToolStripSeperator" ).Width = 30
Next
#End Region
#Region Attach Controls To Ts
'Add controls to Tool Strip
[COLOR="Red"]FrmTs.AddItem( SprTs0.ControlRef )[/COLOR]
FrmTs.AddItem( BtnTsOpen.ControlRef )
FrmTs.AddItem( BtnTsSearch.ControlRef )
[COLOR="red"]FrmTs.AddItem( SprTs1.ControlRef )[/COLOR]
FrmTs.AddItem( BtnTsSave.ControlRef )
[COLOR="red"]FrmTs.AddItem( SprTs2.ControlRef )[/COLOR]
FrmTs.AddItem( BtnTsDelete.ControlRef )
[COLOR="red"]FrmTs.AddItem( SprTs3.ControlRef )[/COLOR]
FrmTs.AddItem( LblTsOrder.ControlRef )
FrmTs.AddItem( TxtTsOrder.ControlRef )
FrmTs.AddItem( LblTsBatch.ControlRef )
FrmTs.AddItem( TxtTsBatch.ControlRef )
[COLOR="red"]FrmTs.AddItem( SprTs4.ControlRef )[/COLOR]
FrmTs.AddItem( BtnTsPreview.ControlRef )
FrmTs.AddItem( BtnTsPrint.ControlRef )
#End Region
The problem only presents itself when I run the compiled file!
The next problem I have is with using a SerialEx object on a Form that is attached to a FormExDesktop.New1( "FrmPrintCapture" ) when the SerialOnComm fires it causes B4PPC to close down. Removing the FormEx items and the problem goes away. I have tried to add the SerialEx object to the extended Form but it doesn't seem to work, Is this because I need to use a controlref property for which there isn't one?
I have tried...
FrmExLib.AddControl( Serial )
FrmExLib.AddControl( "Serial" )
FrmExLib.AddControl( Serial.ControlRef )
Where Serial is a SerialEx object and FrmExLib is a FormEx object
Sorry for being a nussiance, I've attempted to fix the problem myself but am now at a loss.
Regards,
RandomCoder