|
here is the code on project 2 form2 closed event :
CC13 is my frist project and i want to send image or update image in frmedit now tell me plz whats the problem image still not update:
protected override void OnClosed(EventArgs e)
{
if (this.appWorkspace.ActiveDocumentWorkspace != null)
{
appWorkspace.ActiveDocumentWorkspace.SetTool(null);
}
base.OnClosed(e);
//n send image to frmedit in cc13
CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit();
// s.mSetPicture(PictureBox, "true");
//s.VarEditImg
//s.VarEditSig
s.PicImage.Image = null;
s.PicImage.Image = Image.FromFile(@"C:\Temp\Temp1.jpg");
s.PicImage.Refresh();
s.picSig.Image = null;
s.picSig.Image = Image.FromFile(@"C:\Temp\Temp2.jpg");
s.picSig.Refresh();
//s.Con
s.Showimg();
CCI3.Myimg g = new CCI3.Myimg();
g.Showimg2();
//CCI3.Forms.frmEdit ss = new CCI3.Forms.frmEdit();
//ss.setEditPictures(@"C:\Temp\Temp1.jpg", @"C:\Temp\Temp2.jpg");
}
|
|
|
|
|
CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit();
above line in your code makes a new instance. i'm saying it again u need to get a already opened instance reference.
new keyword always make a new instance.
|
|
|
|
|
meri jan ma bhi yeh hi keh rha hon there is no any more instance Except of this yaaaar y u r not getting my point i only make object or instance one time and its that i send u
|
|
|
|
|
hello nomi
do not use f.show();
project2.form2 f = new project2.form2();
f.show();
use f.showDialog();
by using this ur form2 will be shown as dialog box so that u would no switch to form one until u finish ur work n form2 .
after u close form2 u will be back to ur position f.showDialog()
and just after that refresh ur image. and please do not do this think in
form activated event becoz there will be loading problem.
if this answere is helpfull then donot forget to mark
wasim khan
|
|
|
|
|
Well I guess a simple solution to the problem would be to declare a public event (say OnEditFormClosing) and when you create an instance of the Form2 (the Image Edit Form), register that event (Handler of the event) in Form1 (Original Form).
Now when you close Form2 (Edit Form), handle its 'Close Event' and from there Invoke the event (OnEditFormClosing), this will notify your Form1 that Form2 closed, as a result you can refresh the image in picture box may be by reloading or whatsoever procedure you adapt.
Regards
Muhammad Talha
|
|
|
|
|
I downloaded a file from the Internet which had 3500 lines in the file. My program consistantly stops around 2400 lines. I assume it must be a buffer problem. How can I have my program automatically adjust to the buffer size needed.
Stream data = webClient.OpenRead(downloadAddress);
StreamReader reader = new StreamReader(data);
String line;
// Read and display each line from the file by segment
while ((line = reader.ReadLine()) != null)
{
etc.,
}
I appreciate any help,
Michael
|
|
|
|
|
I have been trying to send my program as a gift to my sister, but when she tries to install the program it says that not all the files are their. I've copied all the files down to the very root part. /publish.
How do i make this work, I have tried unchecking Create Manifest in the Project Properties before you publish it and it still creates one.
This is a bad question and i can't really explain it any better. The last time i asked, about a year ago when i was scripting more often I was told to stop sending them to friends. Not really a good answer for what i really needed.
"Windows Client Error" is what my sister says the program is saying when you start setup.
|
|
|
|
|
I guess she does not have .NET installed. The only way to avoid this, is to use C++.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks, got to learn that language then.
|
|
|
|
|
Or you could install the .NET framework on her machine, assuming that's what you're using to build your apps in the first place.
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
In your question u didn't mention VB anywhere.
can u tell me which language u r using is it C# or VB.net or VB6
and r u making setup using visual studio or using any third party software like install shield.
|
|
|
|
|
Nouman Bhatti wrote: language u r using is
it C# or VB.net or VB6
As this is posted in the C# forum its a reasonable assumption its a .NET application - language is not important, it still need the correct version of the .NET Framework.
If by any chance its actally VB6 then you need to create an install package.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
if it is posted in C# forumn than that doesn't mean it's necessary that question is also related to C# .. go through different posts and u'll notice that
|
|
|
|
|
Sadly you are quite right
Bob
Ashfield Consultants Ltd
|
|
|
|
|
have you thought of adding a setup project to your solution. In the setup project you will be able to specify which dependencies (.net framework etc) you would like to install with your program.
Russell
|
|
|
|
|
Hi I do have an managed c++ application.
I would like to write the addin application for my application.
So I went to create the sheared add-in in visitual studio.
Select Create New Project->Extensiblity->Shared Add-in.
The wizard asks for application host name. There are Miscrosoft word, microsoft excel.. etc. How can I make my application, the one I wrote, showed in the host list in wizard?
Thanks
|
|
|
|
|
Hi!
I think you're using the wrong approach. Shared Add-ins are meant to be used in MS Office Applications _only_.
If you want your application to act as a plugin host, you'll have to design it explicitely to do so.
Try searching CP, there are several articles about the subject (although I don't know if there are any in MC++, but the concepts are the same regardless of programming language).
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi,
I create a dataset by Add New Item -> DataSet to my project, and add a tableAdapter to it.
Then I used this dataset as a dataSource of a report (crystalReport).
When I Get 'Preview data' in dataset, I see my records, but when running the application my report is empty.
I think I must Fill dataset by some code, is it true? how can do it? or problem is other thing?
Best wishes
|
|
|
|
|
I would recommend avoiding all those 'Add New Item->Dataset' and tableAdapter options, if you write actual code, you get a lot more control.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'll second that. If it's not visible on the form don't add it with the designer.
Of course, I also don't use DataAdapters/TableAdapters or DataSets anyway.
|
|
|
|
|
I remember during the class lecture my teacher said whenever you are trasferring an object through wire make that object as a Serialized. I have seen example how to make a class serialized in class and online. But i have 2 questions.
1 But why do we need to make it and why can't i just send an object and the receiving function write
whatever the object contains? Currently i am writing to a file without any seriazation i don't have any problems.
2. In xmlSerialzation how can i update only specific elements and it's sub elements rather than re-writing the entire object which may have so many elements? i.e I do'nt want to write the entire object just the changed data to be written again.
I know I have to search for that speicfic node and then write but any example shall help me alot.
Thanks
modified on Wednesday, June 4, 2008 4:57 PM
|
|
|
|
|
1 - Serialisation automates the process of representing the contents of a class as text. If you have another way of doing that, it's going to work just the same, so long as the code on both ends knows how to deal with the stream.
2 - how do you mean, exactly ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for answering but...
1. How one can utilize the benefit of represting the contents of a class as text? What about an image in xml file can that be converted to a readable text format.
2. Lets say a parent object that has many different types of child objects are written to a xml file. When a child object is changed only that to be rewritten to the xml file. I don't want to rewrite the entire parent object so i can have quick save functionality.
|
|
|
|
|
netJP12L wrote: What about an image in xml file can that be converted to a readable text format.
Not really
netJP12L wrote: Lets say a parent object that has many different types of child objects are written to a xml file. When a child object is changed only that to be rewritten to the xml file. I don't want to rewrite the entire parent object so i can have quick save functionality.
OK, you have to write the entire file, but you could write code to manage what you're describing, I think. You'd have to cache the serialised text, serialisation by default does not do that. You'd also have to track changes to know which bits to recreate.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
netJP12L wrote: trasferring an object through wire
I expect that doesn't include files.
You don't need to, but it may be good practice for when you do need to.
Also, I would always write custom serialization; the automated serialization is generally too limited.
|
|
|
|