Click here to Skip to main content
15,891,657 members
Home / Discussions / C#
   

C#

 
AnswerRe: Why i can't import C# com dll to C++ project ? ? ? Pin
Judah Gabriel Himango2-Aug-07 6:12
sponsorJudah Gabriel Himango2-Aug-07 6:12 
GeneralRe: Why i can't import C# com dll to C++ project ? ? ? Pin
Yanshof2-Aug-07 6:25
Yanshof2-Aug-07 6:25 
GeneralRe: Why i can't import C# com dll to C++ project ? ? ? Pin
Judah Gabriel Himango2-Aug-07 6:31
sponsorJudah Gabriel Himango2-Aug-07 6:31 
GeneralRe: Why i can't import C# com dll to C++ project ? ? ? Pin
Yanshof2-Aug-07 6:33
Yanshof2-Aug-07 6:33 
Questionsub forms ?? Pin
Software_Specialist2-Aug-07 5:27
Software_Specialist2-Aug-07 5:27 
AnswerRe: sub forms ?? Pin
Judah Gabriel Himango2-Aug-07 6:10
sponsorJudah Gabriel Himango2-Aug-07 6:10 
GeneralRe: sub forms ?? Pin
Software_Specialist2-Aug-07 6:46
Software_Specialist2-Aug-07 6:46 
GeneralRe: sub forms ?? Pin
Tarakeshwar Reddy2-Aug-07 9:12
professionalTarakeshwar Reddy2-Aug-07 9:12 
Software_Specialist wrote:
i.e Form2.ShowDialog(Form1);
Nopes the intellisence doesn't give me any ShowDialog option..

Create an object of Form2 and then do a ShowDialog().
private void btnOpenForm_Click(object sender, System.EventArgs e)
{
   Form2 objForm = new Form2();
   objForm.ShowDialog();
}  

If you want to hide a form and reshow then you would need to send an object of your current form to Form2

In Form1
private void btnOpenForm_Click(object sender, System.EventArgs e)
{
  Form2 objForm = new Form2(this);
  objForm.Show();
  this.Hide();
}
In Form2 you store the object of Form1 and when you close the form, do a Show() on the object you sent from Form1.
private Form frmParent;

public Form2(Form objForm)
{
  InitializeComponent();
  frmParent= objForm;
}

private void btnClose_Click(object sender, System.EventArgs e)
{			
   this.Close();
   frmParent.Show();
}



GeneralRe: sub forms ?? Pin
Software_Specialist2-Aug-07 23:59
Software_Specialist2-Aug-07 23:59 
GeneralRe: sub forms ?? Pin
Rudolf Jan3-Aug-07 0:26
Rudolf Jan3-Aug-07 0:26 
GeneralRe: sub forms ?? Pin
Software_Specialist3-Aug-07 1:42
Software_Specialist3-Aug-07 1:42 
GeneralRe: sub forms ?? Pin
Sam_c3-Aug-07 2:24
Sam_c3-Aug-07 2:24 
GeneralRe: sub forms ?? Pin
Software_Specialist3-Aug-07 2:58
Software_Specialist3-Aug-07 2:58 
GeneralRe: sub forms ?? Pin
Rudolf Jan5-Aug-07 10:25
Rudolf Jan5-Aug-07 10:25 
GeneralRe: sub forms ?? Pin
Software_Specialist3-Aug-07 0:22
Software_Specialist3-Aug-07 0:22 
GeneralRe: sub forms ?? [modified] Pin
Sam_c3-Aug-07 2:04
Sam_c3-Aug-07 2:04 
GeneralRe: sub forms ?? Pin
Software_Specialist3-Aug-07 2:17
Software_Specialist3-Aug-07 2:17 
QuestionDatagridview cursor focus Pin
praveenkumar palla2-Aug-07 4:57
praveenkumar palla2-Aug-07 4:57 
AnswerRe: Datagridview cursor focus Pin
Judah Gabriel Himango2-Aug-07 5:12
sponsorJudah Gabriel Himango2-Aug-07 5:12 
GeneralRe: Datagridview cursor focus Pin
praveenkumar palla2-Aug-07 5:38
praveenkumar palla2-Aug-07 5:38 
GeneralRe: Datagridview cursor focus Pin
Judah Gabriel Himango2-Aug-07 6:05
sponsorJudah Gabriel Himango2-Aug-07 6:05 
QuestionAdding Pictures to program Pin
Bonsta2-Aug-07 4:43
Bonsta2-Aug-07 4:43 
AnswerRe: Adding Pictures to program Pin
Judah Gabriel Himango2-Aug-07 5:10
sponsorJudah Gabriel Himango2-Aug-07 5:10 
QuestionShow an integer property as hexadecimal in a property grid Pin
FDK22-Aug-07 4:08
FDK22-Aug-07 4:08 
AnswerRe: Show an integer property as hexadecimal in a property grid Pin
Martin#2-Aug-07 4:11
Martin#2-Aug-07 4:11 

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.