|
I have written following code but It is not displayed on the form
pictureBox1 = new System.Windows.Forms.PictureBox();
pictureBox1.Location = new Point(Wnd[18].Left + 2, Wnd[18].Top + 2);
pictureBox1.Name = "pictureBox1";
pictureBox1.Size = new System.Drawing.Size(80, 40);
pictureBox1.Image = new System.Drawing.Bitmap("c:\\bitmap1.bmp");
pictureBox1.Show();
pictureBox1.BringToFront();
what to do ?
thanks
|
|
|
|
|
you have to add the control to the form
Form1.controls.add(picturebox1);
|
|
|
|
|
Have you forgot formObject.Controls.Add(pictureBox1) ?
|
|
|
|
|
Hi all,
The garbage collector runs in specific intervals(hope i am correct), and during this it collects all variable and dispose them when they becomes out of scope or not referred any more.
a) In a particular Method() if i am creating many variables, then is it possible to dispose them all before exiting that method ?
b)Suppose i have a method and inside this many methods, this MethodX execute till the last G() got executed and then it returns control to calling one.
MethodX()
{
A();
B();
.
.
.
G();
}
But somehow its slowing the execution, Is it possible that all methods executed independently/simultaneously/parallely?
regards,
|
|
|
|
|
Hum Dum wrote: The garbage collector runs in specific intervals
It runs whenever cleanup is required.
Hum Dum wrote: In a particular Method() if i am creating many variables, then is it possible to dispose them all before exiting that method ?
If your variables are not referred and GC ran, it will get *collected*.
Hum Dum wrote: But somehow its slowing the execution, Is it possible that all methods executed independently/simultaneously/parallely?
Are you asking how to execute these methods in parallel? If yes, you need separate threads to execute each method. I am not sure how this is related to your actual GC question.
|
|
|
|
|
A manuall call to GC.Collect is not recommended because it will do a full memmory compaction after the the collection process.. if you are using any heavy objects...Probably you can set is as null after use.. GC will get triggered only when the memmory pressure is more for a particular allocated heap. or when the allocated threashold limit is reached.
You can used threading. But only after a good analysis upon your method structure ( that whether it is taking any input from the previus one) and requirement.. Remember Threading is there to use the CPU Idle time.it will take more time if it does't have any.
|
|
|
|
|
I am doing a windows mobile application(birthday reminder) using .net C#. I am unable to retrieve the birthday info from the pocket outlook. any one got any idea??
Thanks in advance for your help...!
|
|
|
|
|
Mobile application, sounds like you should be here[^]">
|
|
|
|
|
i didnt get you
|
|
|
|
|
|
Thanks so much Deresen, i had never known there is an exclusive mobile application developers forum here..!
|
|
|
|
|
No problem, I hope they will solve your problem, because I really don't know how to solve it
|
|
|
|
|
How to remove title bar of form .
thanks
|
|
|
|
|
System.Windows.Forms.FormBorderStyle.None
जय हिंद
|
|
|
|
|
|
Yes, I'll make that for you. No problem.
I'll give you my paypal account first, you send me money (for instance 1.000 dollar) and you've got your application.
|
|
|
|
|
Deresen wrote: 1.000 dollar
Just one? Will you do my work as well?
जय हिंद
|
|
|
|
|
Well 1.000 is one thousand in The Netherlands
|
|
|
|
|
Deal cancel.
जय हिंद
|
|
|
|
|
|
My bid id $200 U.S.D......
Have a Happy Coding.....
|
|
|
|
|
Hello,
I have a form in c # and two buttons on form, i want to open word document file on click on one button and an other button click i want to open PDF file.
what should i do should i add any reference or what code is required.
please do replay
Thanx
|
|
|
|
|
|
Sajjad Leo wrote: want to open word document file on click on one button
private void btnExeDoc_Click(object sender, EventArgs e)
{
try
{
Process.Start("report.doc");
}
catch (Win32Exception ex)
{
MessageBox.Show(ex.Message);
}
}</code>
<blockquote class="FQ"><div class="FQA">Sajjad Leo wrote:</div>an other button click i want to open PDF file</blockquote>
<pre><code> private void btnExePdf_Click(object sender, EventArgs e)
{
try
{
Process.Start("report.pdf");
}
catch (Win32Exception ex)
{
MessageBox.Show(ex.Message);
}
}
8.Kelvin()
{
while (!(the machine can program itself))
Wont_stop_coding = true;
}
|
|
|
|
|
Dear your code is not working i am trying it but there is problem.
let me explain it again i want to display text file and pdf file on the button click.
i need this only.
|
|
|
|