|
ellllllllie wrote: while i am making an update to my software,i display a progress bar that run in another thread?
i don't know why but in some case the value of my progress stop from increasing?
Your Question Does not make any sence. Please be specific.
ellllllllie wrote: while i am making an update to my software
I Think you want to mean , you want some update operation and you want you progress bar moving !!! isnt It ?
ellllllllie wrote: any idea
If yes, Try to use BackgroundWorker Components in C# . because Progress bar run on Foreground thread and with low priority where as your background jub run with high priority. Thats why, you are getting your progress bar Stop Increasing, because your UI is not refreshing. . So Try to understand Background worker and work with it.
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
yes abhijit jana
thats what i mean. also the form created by that thread will be totally white after a minimize action
plz i need ur help
best regards
dghdfghdfghdfghdgh
|
|
|
|
|
ellllllllie wrote: totally white after a minimize action
Because the thread is not Refreshing you UI . So Try to use BackgroundWorker .
It will resolve your problem.
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
My idea - You're not doing it right.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Pls i need help, 'm kinda new 2 this.
i make an mdi container, then a button is pressed, then i call out a form and make it a child like this:
frmOne frm = new frmOne();<br />
frm.MdiParent = this;<br />
frm.Show();
Already, in the properties of frmOne i set it's WindowState Property to Maximized but when it comes out it is normal.
pls how else can i achieve this.
thanx.
He who goes for revenge must first dig two graves.
|
|
|
|
|
Try
frm.Size = frm.MaximumSize
?
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Im trying to pass a Class I have created to a button and am having some trouble finding where to overload the call function.
Here is the buttons code.
private void btnCalcLife_Click(PumpTest pTest, EventArgs e)
{
intgrav(pTest);
lblLife.Enabled = true;
lblLife.Text = lblLife.Text + pTest.tlife + " Hours";
}
The error is taking place in my designer window
this.btnCalcLife.Click += new System.EventHandler(this.btnCalcLife_Click);
|
|
|
|
|
The event handler of your button click must take object as a first argument. That's why you are getting error.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
I changed it to several different overloads, but still getting an error. Here is what it is now
private void btnCalcLife_Click(object sender, PumpTest pTest, EventArgs e)<br />
{<br />
intgrav(pTest);<br />
lblLife.Enabled = true;<br />
lblLife.Text = lblLife.Text + pTest.tlife + " Hours";<br />
}
I think I need to change this statement but dont know what to change it too
this.btnCalcLife.Click += new System.EventHandler(this.btnCalcLife_Click);
|
|
|
|
|
Why don't you have a look at documentation of button click event? You can't add additional parameter to the event handler.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
As Giorgi said, you cannot change the parameters of the event handlers. For the Click event, you get the first object sender parameter, which is always a reference to the Button sending the event (you can cast it), and EventArgs e which is useless. Other events pass arguments (eg. location where mouse was clicked) in an EventArgs -derived second parameter.
If you create your own event, you should derive from EventArgs to create your own class for passing parameters to the event handler. But you can only do this for events you define, not for system-defined events.
|
|
|
|
|
Yea thanks for the help, I found an article online about setting up a ridiculous way to send something to a button through a wierd method but found it easier to just set up another Public instance of the class and set it equal to the class passed by the parent form.
|
|
|
|
|
Hi sir.. i am trying to create a peer-to-peer application for my practice in c#.. i was wondering if any one could tell about the concept of peer-to-peer.. only.. thank you so much in advance..
|
|
|
|
|
pdoy0708 wrote: i was wondering if any one could tell about the concept of peer-to-peer
No, nobody knows anything about it, and if they did they certainly would not create a Wikipedia page on that subject, and if they did you certainly would not be able to find it by searching with google.[^]
Good luck, you're going to need it.
led mike
|
|
|
|
|
|
The unfortunately reality is that a truly anonymous peer-peer application used to be possible through the use of Broadcast packets however the potential abuse is too high.
Read up on Tor and Onion routers for a good look at anon. Peer to Peer.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
How can i load data from a comboBox into a datagrid.Basically the comboBox has a list of venues.When you select a venue the datagrid is supposed to display timeslots that are booked and those that are not booked for that particular venue.the data for the grid is taken from three different tables.(TimeSlot[with all the different timeslots]),(Venue[with all the different venues ])and (Timetable[with all the venues that are booked and the timeslots that they are booked for]).
Any code that will hep me with this problem will be greatly appreciated.
|
|
|
|
|
Hy,I have a custom control that has a list of images. My problem is that i want to set the list at design-time. I have the images in my project resources, so why can I set an image at design-time,and not a list of images??
Please help,I am really stuck here.
|
|
|
|
|
ctoma2005 wrote: I have a custom control that has a list of images. My problem is that i want to set the list at design-time.
Does your custom control publish a public ImageList property?
led mike
|
|
|
|
|
Well i don't need an ImageList,that's a component. I just want a property that represents a list of images (List). The only thing I could think of is making the property of type Image[] and instantiate the array in the constructor, but I don't now the size of the array,that is why I need a List.
|
|
|
|
|
Sorry for the misunderstanding, I wrote ImageList,thinking of an list of images. Thanks
|
|
|
|
|
List doesn't have a control designer. Therefore, the designer doesn't know how to represent it in the designer. Roll your own collection class and define a control designer.
|
|
|
|
|
Ok,but my problem is that the control is in a class library,so how can that assembly know what resources my application has? I don't understand how can there is no way of choosing a list of images. There is a UITypeEditor for every collection,but it doesn't work for images,as images don't have a constructor. I am really confused now, I mean a list of images can be used by hundreds of controls...
|
|
|
|
|
Maybe if you can tell me how an Image Editor works,because all I really need is an Image Editor,wich lets me select multiple images (just like a listbox)
|
|
|
|
|
Hi
I try to develop an Web Application to manage films (a little bit like ImDB)
For the Edit part, I fill textboxes with a Linq query (on loading).
No problem to display the information in the different textboxes
But when I want to save changes into the database,
my textboxes are empty (according to the debugger) even if I put a value in it.
A part of my code to do this edition :
Loading :
<br />
DBMovies_ClassesDataContext db = new DBMovies_ClassesDataContext();<br />
<br />
int IdFilm = int.Parse(Session["idfilm"].ToString());<br />
<br />
var editedfilm =<br />
(from f in db.Films<br />
where f.id == IdFilm<br />
select new { Title = f.title, Title_o = f.title_original, Language = f.language, DateRelease = f.date_release, Genre = f.genre, Runtime = f.runtime, Plot = f.plot, Country = f.country }).Single();<br />
<br />
<br />
txtCountry.Text = editedfilm.Country.ToString();<br />
txtDateRelease.Text = editedfilm.DateRelease.ToString();<br />
txtGenre.Text = editedfilm.Genre.ToString();<br />
txtLanguage.Text = editedfilm.Language.ToString();<br />
txtPlot.Text = editedfilm.Plot.ToString();<br />
txtRuntime.Text = editedfilm.Runtime.ToString();<br />
txtTitle.Text = editedfilm.Title.ToString();<br />
txtTitle_o.Text = editedfilm.Title_o.ToString();<br />
<br />
Code to update values in DB :
<br />
<br />
DBMovies_ClassesDataContext db = new DBMovies_ClassesDataContext();<br />
<br />
<br />
int IdFilm = int.Parse(Session["idfilm"].ToString());<br />
<br />
var updateFilm = (from f in db.Films<br />
where f.id == IdFilm<br />
select f).Single();<br />
<br />
<br />
updateFilm.country = form1.FindControl(txtCountry.ID).ToString();<br />
<br />
updateFilm.country = txtCountry.Text.ToString();<br />
updateFilm.title = txtTitle.Text.ToString();<br />
updateFilm.title_original = txtTitle_o.Text.ToString();<br />
updateFilm.language = txtLanguage.Text.ToString();<br />
if (txtDateRelease.Text != "") { updateFilm.date_release = DateTime.Parse(txtDateRelease.Text); }<br />
updateFilm.genre = txtGenre.Text.ToString();<br />
if (txtRuntime.Text != "") { updateFilm.runtime = Int32.Parse(txtRuntime.Text); }<br />
updateFilm.plot = txtPlot.Text.ToString();<br />
<br />
db.SubmitChanges();<br />
<br />
and an exemple of my textboxes :
<asp:label id="lblCountry" runat="server" text="Country : "></asp:label><br />
<asp:textbox id="txtCountry" runat="server"></asp:textbox>
All the elements are working well
It's just the empty textboxes which ruin everything
Thank you by advance
(and sorry if there are english mistakes)
Cedric.
|
|
|
|