|
|
The code of WMSplitter studied:
the Input pin read data by StreamOnAsyncReader::Read,which is derived from IStream,
then sample is sent to the Output pines by WMFDemuxFilter::OnStreamSample,which is derived from IWMReaderCallbackAdvanced and IWMReaderCallback.
I don't know what things being done during the data from IStream::Read to IWMReaderCallbackAdvanced::OnStreamSample.
Can I debug it step by step?
Hi,Markliu-codeproject
|
|
|
|
|
hi,
I have one MDI form which has one webbrowser control.
Now I load/show a new form which is MDI's child form.
i.e.
Dim frmDetail as New FrmScreenDetails()
frmDetail.MdiParent = Me
frmDetail.Show()
Now what happens is my child form (frmDetail) is sent back because of my webbrowser control i.e. resides on MDI form.
Can we have something like my child form displays topmost compare to MDI's controls?
Thank You
|
|
|
|
|
frmDetail.Show()
Try frmDetail.ShowDialog()
- Stop thinking in terms of limitations and start thinking in terms of possibilities -
|
|
|
|
|
thanks buddy but i want something like user can minimize mdi from. If i use showdialog, it will not allow me to have any event on mdi form as child form is modaled !!!
|
|
|
|
|
Hi All
I have a list Proces with PNaam,PNr,PAankomst and PStatus. This is show'n in listbox1. ListBox2 is a list of Burst with lengte and soort. This is of each Proces. Processes can have more Bursts but one Burst can only have one Proces.
I have next two listboxes beside each other. In listbox3 I wanted to show PNaam sorted by PAankomst. In Listbox4 I wanted to show PNr, PAankomst, lengte and soort of that one Proces. (The user has to select one PNaam in listbox3 when I read the properties of that PNaam)
I've got a class ProcesKlasse with members PNaam,PNr,PAankomst and PStatus. I've got a BurstKlasse with lengte and two inherented subclasses IOBurst and CPUBurst with each a member soort.
I don't really know where to put the code. Also I've tried to search on internet but all the sugestions doesn't match...
In Form.cs I've tried
[code]
Proces.Sort(delegate(Proces p1, Proces p2) {return p1.PAankomst.CompareTo(p2.PAankomst);});
[/code]
but it can't find the PAankomst (it was private in ProcesKlasse, but even when it's public, I can't reach it)
Also I've tried this in ProcesKlasse
[code]
public List<string> SortedList(List<procesklasse>)
{
for (Proces.PAankomst // can't go further :s
}
[/code]
Is there someone who can give me a hint?
Thank you!
Anneke
|
|
|
|
|
Hi Anneke,
1.
There is some confusion I am afraid. It would help if you gave real names to the
listboxes for starters. Furthermore it seems to me you have a ProcesKlasse type (a class),
and a list of such items, that you call Proces.
This is confusing, and you are not helping yourself doing it this way. The better
approach would be to call the Proces thingies "Proces", and the list of Proces items
something like ProcesLijst. The list could actually be a List< Proces>
assuming you run .NET 2.0 or better; or else an ArrayList.
2.
You could sort a ProcesLijst by calling its Sort method and feeding it an object that
knows how to order two Proces items. That requires some class implementing the IComparer
interface, which is quite easy to do. It would just hold one method, something like:
public int Compare(Proces p1, Proces p2) {
return p1.Aankomst-p2.Aankomst;
}
BTW: the Proces arguments above are my Proces class, not your Proces list!
And that is why I don't have any trouble getting to their Aankomst member.
The above should put you on the right track.
Groeten!
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi
It's not only 2 objects that I have to compare but a whole list. In this list there's a member PAankomst which I have to compare with all the other objects in the list, also with their PAankomst.
I've read that IComparer is only for when we have to compare two objects.
Now I don't really find a method to compare a member in a list with other members in the same list.
I've tried with IComparable<> and then the method CompareTo but it wouldn't work.
Any suggestions?
|
|
|
|
|
Hi Anneke,
your original code tried to sort a list; that is where you need an object that
implements IComparer so you can specify your specific sort order. The Sort method
holds all the code to iterate through the collection as often as needed to get it
sorted, you only have to tell it what your sort order is by offering an IComparer object.
On the other hand, if you need to FIND an object in a collection, you have to do that
yourself, probably using a loop (such as foreach); you could still use the IComparer
object inside the loop, but you don't have to do it that way.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
hello for every one
i think this is a tough question cause even people in the J# forum couldn't solve it
without getting into unnecessary details here is the problem
ID Item
101 pencil
102 pen
assume we have a datagridview just like above and it is not bound to a database , how can i get ID values(101,102) into code variables so that i can use them. and if possible how can i make sure that id values would be unique and of course not null ?
thanks in advance
|
|
|
|
|
ahh sorry mate but I have a question for you, why would anyone wanna do such a thing????
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
man i don't know what to say, i do not want to waste ur time trying to understand my mproject logic it is just a question if u have the answer please give if u don't ....
iam waiting for u experts
please help
thanks in advance
|
|
|
|
|
well the way you put it no buddy would even bother thiking about wasting his/her time on u even if they know the thing.
you can insert unique values in a datagridview without binding it to a database. but you have to bind it to a DataTable inside a Typed DataSet. You'll have to make a field and set its identity and auto increment properties for yourself. I hope you wont be asking how to do that and get a FREE note from some expert who is feeling to much obliged to offer his/her services to a guy like you for free,
mr.me wrote: how can i get ID values(101,102) into code variables
as far as getting the IDs from a gridview is concerned... it really a matter of traversing the right cells in the gridview. You can use a for loop cant you?
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Rocky# wrote: well the way you put it no buddy would even bother thiking about wasting his/her time on u even if they know the thing.
it is just an simple example to make it easey for you and me
in fact iam not an expert and i need help. yes i admit that this is my first time dealing with gridviews, to let u know i have done my best trying to solve it ,searching MSDN , viewing articles and walkthroughs , J# forum. i still hope other people may help me out
the way u talk is very tough and i think that because of two possibilties
1.u r really expert but with a big head or a very big loser.
|
|
|
|
|
mr.me wrote: the way u talk is very tough
and what do you think about that
mr.me wrote: man i don't know what to say, i do not want to waste ur time trying to understand my mproject logic it is just a question if u have the answer please give if u don't ....
is that really a polite way to talk...
mr.me wrote: 1.u r really expert but with a big head or a very big loser.
well I aint got any thing to prove to u, if the thing I told you helped you, its nice otherwise it doesnt make any differnce does it.
by the way experts dont mind helping but what they do mind is spoon feeding someone. All I was asking was what you have done as far as the researching goes, if you had explained that a little bit more you would've had to listen to all that. but any way...
good bye
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
ok i'am sorry
we waste a lot of lines - and time - while i was looking for 1 line of code
|
|
|
|
|
hi all,
how to we set report heading at run time for crystal reports in windows application.
regards
os
|
|
|
|
|
Create a Page_INIT eventhandler for the Crystal Report
In that handler you can recreate the Header
|
|
|
|
|
Hi all,
I am not able to refresh the datagridview Control when i click on on callback button the gridview is populated with the callbacks and when i click on another button fresh calls it gives me ffresh cals but the datagridview is appending that data not refreshingg
i tried that dataset is nothing
Thanks
|
|
|
|
|
Hi,
first of all,
you have a Datagridview which is databound(), then you manually add data and after that you click a button.
What should this button do?
Just refresh() the data in the grid?
The grid is attached to a dataset, the dataset should acceptchanges() from the datagridview. ohterwise the original dataset is shown.
After the dataset is refreshed, should the added data be stored in the database?
|
|
|
|
|
I need some help with a Problem in a DataGridView.
I have a DataGridViewComboBoxColumn bound to a list of Strings to select from.
If I select one of this items, it should be removed from the other cells dropdown
lists (in the same ComboBoxColumn). So that only the not selected Items are available to choose from.
(If I simply shorten the bounded list, I get a "DataGridView ComboBox Cell Value not valid" error.)
This sounds very easy, but in fact I spended several hours and could not solve this simple
task so far!
Can anybody help me?
Thanks!
Update:
I also tried to use a Datatable as Datasource, but when I remove an Item from the Datasource it has also the effect that it disappears from the cell it was formerly selected.
Update2:
Ok, I just tried it again and got a working solution myself.
Instead of binding the whole ComboboxColumn to a DataSource, I bind every cell for itself to a Datasource( or list). I use the CellBeginEdit event to Update the cells DataSource with the available Items.
This seems to work well
modified on Saturday, March 15, 2008 4:29 AM
|
|
|
|
|
I have a combobox bound to a BindingSource, in turn bound to a DataTable of Agent Names. Everything is handled by the VS 2008 designer, i.e. I have no custom data binding code, nor do I have any code that sets anything on the combobox. Yet, when I start my project, I get the following error:
InvalidArgument=Value of '0' is not valid for 'SelectedIndex'.
Parameter name: SelectedIndex
|
|
|
|
|
Brady Kelly wrote: I have no custom data binding code, nor do I have any code that sets anything on the combobox.
Well normally I would offer some advice about things like understanding the technology you are working with rather than thinking one can just drag and drop their way to quality software products but I'm pretty sure you and I have had that conversation and you rejected it, yes?
led mike
|
|
|
|
|
This has sweet nothing to do with me not understanding the technology, but only an idiot would just quietly accept it if one of his tools exhibited repeatable, anomalous behaviour. It is as much a desire of mine to understand my tools as well as to have them behave not only as expected, but also as indicated by the documentation.
|
|
|
|
|
It might be that your combo does not have any data in it (count = 0) and so throwing an exception when you try to set the SelectedIndex to 0 (which is item 1 on the combo).
Maybe you should check the data source to see if it actually returns some values...
|
|
|
|