Picturebox not execute


Author
Message
Rafael
Rafael
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 48, Visits: 216
 have a Picturebox ( name is btnFornecedor Wink of the Strataframe and when click I in it do not execute messagebox.show (" OK"). Why

private void EnableControls(bool state)

{

btnFornecedor.Enabled = state;

}

private MicroFour.StrataFrame.Business.BusinessEditingState currEditingState;

private void sysPedidoCompraItemBO1_EditingStateChanged(MicroFour.StrataFrame.Business.EditingStateChangedEventArgs e)

{

currEditingState = e.EditingState;

if ((e.EditingState == MicroFour.StrataFrame.Business.BusinessEditingState.Adding) || (e.EditingState == MicroFour.StrataFrame.Business.BusinessEditingState.Editing))

{

EnableControls(true);

}

else

{

EnableControls(false);

}

}

private void btnFornecedor_Click(object sender, EventArgs e)

{

if ( this.bdFornecedor.ShowDialog() == DialogResult.OK )

{

for_cod.Text = Convert.ToString(sysFornecedorBO1.for_cod);

}

}


Rafael
Rafael
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 48, Visits: 216
correcting my code he is this

private void EnableControls(bool state)

{

btnFornecedor.Enabled = state;

}

private MicroFour.StrataFrame.Business.BusinessEditingState currEditingState;

private void sysPedidoCompraItemBO1_EditingStateChanged(MicroFour.StrataFrame.Business.EditingStateChangedEventArgs e)

{

currEditingState = e.EditingState;

if ((e.EditingState == MicroFour.StrataFrame.Business.BusinessEditingState.Adding) || (e.EditingState == MicroFour.StrataFrame.Business.BusinessEditingState.Editing))

{

EnableControls(true);

}

else

{

EnableControls(false);

}

}

private void btnFornecedor_Click(object sender, EventArgs e)

{

MessageBox.Show("OK");

if ( this.bdFornecedor.ShowDialog() == DialogResult.OK )

{

for_cod.Text = Convert.ToString(sysFornecedorBO1.for_cod);

}

}

}

}


Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Would you like to check on your Properties sheet if your PictureBox Click event is linked to your "btnFornecedor_Click" ?
Rafael
Rafael
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 48, Visits: 216
Look this image
Rafael
Rafael
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 48, Visits: 216
I remember that used SF Standard Form.
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Are you sure your PictureBox Enabled property is in a True state by the time you are clicking on it?
Rafael
Rafael
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 48, Visits: 216
Enabled is false. But if I to place the property enabled true before click in the new button of the strataframe, picturebox will be qualified for the use. I need to incapacitate and only to qualify when or Edit will be click in the New but my code is not making this. How I make this?
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Try and put a Breakpoint on your "EditingStateChanged" and see how your code is performing. Click on your "Novo" button and it should get you there. That is, if you are adding on your sysPedidoCompraItemBO1...
Rafael
Rafael
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 48, Visits: 216
Obrigado.

Me desculpe eu colouqei o evento EditingStateChanged no BO errado !

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Legal! Cool

Fico contente que tenha resolvido.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search