|
|
cant you just use myChatWindowForm.Visible ?
|
|
|
|
|
I would use a delegate and event.
public delegate ChatWindowClosingHandler(object sender, EventArgs args);
public interface IChatWindowManager {
void ChatWindowClosing(object sender, EventArgs args);
}
public partial class ChatManagerForm : Form, IChatFormsManager{
public event ChatWindowClosingHandler OnChatWindowClosing;
public void ChatWindowClosing(object sender, EventArgs args){
}
public ChatManagerForm(){
InitializeComponent();
this.OnChatWindowClosing += new ChatWindowClosingHandler( ChatWindowClosing );
}
}
public partial class ChatWindowForm : Form {
public ChatWindowForm( IChatFormsManager cfm ){
InitializeComponent();
this.FormClosed += new ChatWindowClosingHandler( cfm.ChatWindowClosing );
}
}
I have not had a chance to test the above code but I've used this design pattern many of times. I guess you've gotten three differnet answers to your question. lol. I hope this is helpful.
I'm listening but I only speak GEEK.
|
|
|
|
|
can u plz provide me with the chunk of code for the image
|
|
|
|
|
s_khan_876 wrote: the image
The use of the definite article implies that we know what you are talking about. We don't.
What, exactly, do you want to do? And what part of that are you needing help with?
|
|
|
|
|
...because he's using Cryptography.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
He's posted elsewhere and seems coherent... I think he's just drunk. Can we add an item to the posting guidelines that says if you're too drunk to drive you're too drunk to post?
|
|
|
|
|
Oh, no, we must welcome that posts:
let's say better post than drive when one is such drunk
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hello,
i have a webbrowser control in my c# app. if i click on a link which includes php parameter like
"http://www.mySite.com/myscript.php&var=test" the navigating events fires up.
but when i check e.Url.AbsolutePath only "http://www.mySite.com/myscript.php" is being returned.
how do I get the complete url with all parameters in the navigating event of the webBrowser control?
thanks in advance, Opaknack
|
|
|
|
|
Where can I find a comprehensive explaination of "How to store images in a Resource File and later get these images programatically?" Are there programs available for working with Resource Files? (I am new to this area of C#)
(Code Examples would be very helpful)
Joseph Stanish
|
|
|
|
|
If you are working with Visual Studio 2005 just add a resource file to the project (RESX) and the IDE will let you add whatever resources you need and provide a class to retrieve them for you.
|
|
|
|
|
Placing images in the resource file is easy, but how do I get to these images programatically?
I am creating controls using code, and based on two loop indexes I know the image file name.
For example: IMAGE0000.JPG, IMAGE0001.JPG, IMAGE0100.JPG, IMAGE0101.JPG to load four images using a loop
For x = 0 to 1
For y = 0 to 2
newPic.image =
<br />
Next y<br />
Next x <br />
<br />
<div class="ForumSig">Joseph Stanish</div>
|
|
|
|
|
I want to retrieve a row from a stored procedure specified by the primary key
how can i do that.... what would be the definition of the stored procedure..
and how would i receive them in my c# code....help needed..
The table contains columns:C_Name,C_Capital,C_Currency,C_President of type nchar.
Thanks..
Regards,
Mujz..
|
|
|
|
|
I would recommend buying a book on SQL and reading through it. The ADO.NET stuff you can probably get from the web. What you're asking for is the first example anyone is likely to learn in SQL, and it's
select C_Name, C_Capital, C_Currency, C_President from myTable where primaryKey = x
and x is obviously a parameter to the stored proc.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
can somebody tell me how to read an excel sheet. Are there some specific classes to read excel data..
Plz dont send links coz i've tried them n its not working some example would be highly appreciated.....
Thanks
Regards;
Mujz
|
|
|
|
|
Mujz......... wrote: Are there some specific classes to read excel data..
No.
Mujz......... wrote: Plz dont send links coz i've tried them n its not working
Well, the info on the web obviously works for hte people who wrote it, you need to read them again. Do you have Excel ? The microsoft interop stuff doesn't work without office.
Mujz......... wrote: some example would be highly appreciated.....
How would an example typed into this forum differ from the examples already on the web ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi
I have a large application written in C# with SQL server2000 as database
the application is running ok for 2 years now , limitation in Datagrid in C# 1.1 is the only headache facing me when mdifying this application . my quastion is regarding the upgrade to 2.0 for the full application , can 2.0 run the older 1.1 with no modifcations at all , and does the enhancement in 2.0 for the DataGrid in particular and C# in general worth migrating the application into 2.0 . and if so , we have to update the .NET framework on the users machines . is that a straight forward process .
Thanx
unitecsoft@hotmail.com
We will either find a way , or make one .
|
|
|
|
|
I moved a 1.1 app to 2.0, a big one, and didn't have any real issues.
unitecsoft wrote: and if so , we have to update the .NET framework on the users machines . is that a straight forward process .
There's no upgrade, you leave 1.1, and put 2.0 on as well. So, it's very simple, you just install 2.0
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanx Christian for your reply
That is good , but it raises few more quastions , If .NET 1.1 and 2.0 can exist together on the same development machine , what about user machine , can .NET frameworks 1.1 and 2.0 exist on the same machine ? is .NET 1.1 framework services included within .NET 2.0 ? If I have an application compiled under 1.1 can it run directly on a user machine which has .NET 2.0 , and the opposite ?
Also my main quastion regarding DataGrid in C# 2.0 , is it different / better than DataGrid in C# 1.1 , as per my experiance Datagrid in 1.1 is a headache .
Dean
unitecsoft
We will either find a way , Or make one .
|
|
|
|
|
unitecsoft wrote: what about user machine , can .NET frameworks 1.1 and 2.0 exist on the same machine ?
Of course it can.
unitecsoft wrote: is .NET 1.1 framework services included within .NET 2.0 ?
unitecsoft wrote: If I have an application compiled under 1.1 can it run directly on a user machine which has .NET 2.0
Yes. There are, however, breaking changes[^]. If you try to run a 1.1 app on a machine that has only .NET 2.0, you'll need to read this.
unitecsoft wrote: and the opposite ?
No. If you application uses ANY 2.0 specific functionality, it cannot be run under 1.1.
unitecsoft wrote: Also my main quastion regarding DataGrid in C# 2.0 , is it different / better than DataGrid in C# 1.1 , as per my experiance Datagrid in 1.1 is a headache
The new DataGridView is a completely new grid and blows the old DataGrid right out of the water.
|
|
|
|
|
Thanx alot dave
your reply is realy helpfull , let me ask you about crystal reports , is it still supported in VS2005 . I have about 200 reports written in crystal reports 9 under VS2003 , last thing I nead is to recreate them .
Crystal reports are realy powerful , only distribution with the aplication is a bit complicated from the license point of view . is there any reporting system in VS2005 different than crystal reports , and if so , is it better ?
Dean
We will either find a way , or make one .
|
|
|
|
|
crystal reports works well with VS2005.
only thing as u said u have to take care at the time of making setup and deployment.
i heard of something "reporting services" in VS2005 but didn't work in it.
|
|
|
|
|
Hi everyone,
I have a program that is written by C#,I opened it in visual studio 2005 ,when I run it in debug mode I get below error:
"Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified"
There is CrystalDecisions.CrystalReports.Engine.dll in my computer but it's version is "10.2.51014.0", how can I get Version=9.1.5000.0?I would like to know what is the reason of this error.I will be appreciate for any help .
yours sincerely ,
Orchid
|
|
|
|
|
hello!
I have 2 problems with a comboBox and a dataGrid.
The first problem is that when i'm selecting a table from the comboBox it's ok, but when i select the second or the third table it's not very good. I have too many lines and columms remaining from the first selected table...i must clear that table or datagrid.
The second problem ... i want that my selected table fit in the dataGrid.
This is my code:
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
alege_tabel = comboBox1.SelectedItem.ToString();
dataSet1.Clear();
SqlCommand sel = new SqlCommand();
sqlDataAdapter1.SelectCommand = sel;
sel.Connection = this.sqlConnection1;
if (alege_tabel == "Oferte")
{
dataSet1.Clear();
sqlDataAdapter1.SelectCommand.CommandText = "select * from Oferte";
sqlDataAdapter1.Fill(dataSet1);
dataGrid1.SetDataBinding(dataSet1, dataSet1.Tables[0].TableName);
}
if (alege_tabel == "Locatie")
{
dataSet1.Clear();
sqlDataAdapter1.SelectCommand.CommandText = "select * from Locatie";
sqlDataAdapter1.Fill(dataSet1);
dataGrid1.SetDataBinding(dataSet1, dataSet1.Tables[0].TableName);
}
if (alege_tabel == "Transport")
{
dataSet1.Clear();
sqlDataAdapter1.SelectCommand.CommandText = "select * from Transport";
sqlDataAdapter1.Fill(dataSet1);
dataGrid1.SetDataBinding(dataSet1, dataSet1.Tables[0].TableName);
}
if (alege_tabel == "Rezervari")
{
dataSet1.Clear();
sqlDataAdapter1.SelectCommand.CommandText = "select * from Rezervari";
sqlDataAdapter1.Fill(dataSet1);
dataGrid1.SetDataBinding(dataSet1, dataSet1.Tables[0].TableName);
}
}
|
|
|
|
|
use like this select command :
select childfields from childTable where fkField=validValue
|
|
|
|