Click here to Skip to main content
15,896,915 members
Home / Discussions / C#
   

C#

 
QuestionHandle OK button Pin
Maddie from Dartford7-Jun-06 4:57
Maddie from Dartford7-Jun-06 4:57 
AnswerRe: Handle OK button Pin
Josh Smith7-Jun-06 9:46
Josh Smith7-Jun-06 9:46 
QuestionIs searching in a datagridview possible??? Pin
printscreen123457-Jun-06 4:48
printscreen123457-Jun-06 4:48 
AnswerRe: Is searching in a datagridview possible??? Pin
leckey7-Jun-06 10:31
leckey7-Jun-06 10:31 
QuestionChecking if an event is being handled Pin
Dan Neely7-Jun-06 4:10
Dan Neely7-Jun-06 4:10 
AnswerRe: Checking if an event is being handled Pin
malikjhangirahmed@hotmail.com7-Jun-06 4:38
malikjhangirahmed@hotmail.com7-Jun-06 4:38 
GeneralRe: Checking if an event is being handled Pin
Dan Neely7-Jun-06 5:13
Dan Neely7-Jun-06 5:13 
AnswerRe: Checking if an event is being handled [modified] Pin
3Dizard7-Jun-06 6:21
3Dizard7-Jun-06 6:21 
GeneralRe: Checking if an event is being handled [modified] Pin
Dan Neely7-Jun-06 7:10
Dan Neely7-Jun-06 7:10 
QuestionBinary file I/O Pin
buzzy847-Jun-06 4:09
buzzy847-Jun-06 4:09 
QuestionSetup & Deployment - File Association Pin
cmarcus7-Jun-06 3:54
cmarcus7-Jun-06 3:54 
QuestionAny Links to Finding/Saving Delta of File? Pin
Grav-Vt7-Jun-06 3:50
Grav-Vt7-Jun-06 3:50 
AnswerRe: Any Links to Finding/Saving Delta of File? Pin
User 66587-Jun-06 4:54
User 66587-Jun-06 4:54 
QuestionSignature table Pin
Mahmood Ilyas7-Jun-06 2:19
Mahmood Ilyas7-Jun-06 2:19 
AnswerRe: Signature table Pin
Wjousts7-Jun-06 2:41
Wjousts7-Jun-06 2:41 
GeneralRe: Signature table Pin
Colin Angus Mackay7-Jun-06 2:52
Colin Angus Mackay7-Jun-06 2:52 
GeneralRe: Signature table Pin
User 66587-Jun-06 3:04
User 66587-Jun-06 3:04 
GeneralRe: Signature table Pin
leckey7-Jun-06 10:25
leckey7-Jun-06 10:25 
AnswerRe: Signature table Pin
Josh Smith7-Jun-06 3:48
Josh Smith7-Jun-06 3:48 
QuestionDataGridView Pin
andrei_dalcu7-Jun-06 1:56
andrei_dalcu7-Jun-06 1:56 
AnswerRe: DataGridView Pin
Nafiseh Salmani7-Jun-06 2:23
Nafiseh Salmani7-Jun-06 2:23 
GeneralRe: DataGridView Pin
andrei_dalcu7-Jun-06 2:33
andrei_dalcu7-Jun-06 2:33 
AnswerDelete and Edit options Pin
andrei_dalcu7-Jun-06 3:58
andrei_dalcu7-Jun-06 3:58 
GeneralRe: Delete and Edit options Pin
Wjousts7-Jun-06 4:37
Wjousts7-Jun-06 4:37 
QuestionHow can i hide or show a panel in usercontrol from a form? Pin
Nafiseh Salmani7-Jun-06 1:56
Nafiseh Salmani7-Jun-06 1:56 
my application has a usercontrol that contains 3 panels.
there are a flash object on my main form , contains 3 button, i want hide and show that panel on usercontrol according to commands that falsh object send!!!

i call a method from usercontrol in my form that changes visibility of panels
but doesn't work. Confused | :confused:

Please Help me D'Oh! | :doh:
on form :

<br />
private void AXSWMenu_FSCommand(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent e)<br />
{<br />
CtlSimpleHtml find_suitableAction =new CtlSimpleHtml();<br />
find_suitableAction.load_html(e.args.ToString());<br />
<br />
}



on usercontrol:

<br />
public void load_html(string command_type)<br />
{<br />
if (command_type.Trim()=="Bio")<br />
{<br />
fill_author_name_forBio();<br />
pnl_viewer.Hide(); //a panel on user control<br />
pnl_Story.Hide(); //a panel on user control<br />
pnl_AuthorName.Show(); //a panel on user control<br />
pnl_AuthorName.Location=new Point(8,8); <br />
pnl_viewer.Location=new Point(8,672);<br />
pnl_AuthorName.Update();<br />
pnl_Story.Update();<br />
pnl_viewer.Update();	<br />
}<br />
}<br />


<br />
public void fill_author_name_forBio()<br />
 {<br />
Authors name =new Authors();<br />
DataTable Authors_name=name.find_AuthorsName_all(connection.make());<br />
//li_AuthorName is a listBox on the usercontrol<br />
li_AuthorName.DataSource=Authors_name;<br />
li_AuthorName.DisplayMember="Name";<br />
li_AuthorName.ValueMember="id";<br />
li_AuthorName.SelectedIndex=-1;<br />
 }<br />


In Classes:

Authors:
<br />
public class Authors<br />
 {<br />
   OleDbConnection con;<br />
   OleDbCommand cmd;<br />
public DataTable find_AuthorsName_all(string cnstring)<br />
{<br />
con=new OleDbConnection(cnstring);<br />
 try<br />
  {<br />
   con.Open();<br />
   string cmdstr="select name,id from Authors ";<br />
   cmd=new OleDbCommand(cmdstr,con);<br />
   cmd.CommandType=CommandType.Text;<br />
   OleDbDataAdapter adp=new OleDbDataAdapter(cmd);<br />
   DataTable dt =new DataTable("Authors");<br />
   adp.Fill(dt);<br />
   con.Close();<br />
   return dt;<br />
   }<br />
   catch(Exception ex)<br />
   {<br />
     MessageBox.Show(ex.Message);<br />
     con.Close();<br />
     return null;<br />
    }<br />
   }<br />
}<br />

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.