|
You do know that J# is a dead product, right? MS will support it until 2015(?), but there will be no further development on the language and you won't see it in future versions of the .NET Framework or Visual Studio.
|
|
|
|
|
Dave Kreskowiak wrote: do know that J# is a dead product
Yep, and never even bothered to look at it
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi,
AFAIK Java uses the array-of-array notation, as in arr[i][j] .
And IIRC they don't have indexers nor properties: in your statement, datagridview1
is presumably a DGV, not an array, but the indexer capabilities of C# allow you
to access its internal data as if the object itself were an array.
And properties represent code (a getter and/or setter method) that shows up as if
it were a data member.
So in the end you may well end up writing something like datagridview1.GetValue(i,j)
for a class that then needs to have a GetValue() method.
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.
|
|
|
|
|
Dear all,
Here iam working on windows based application.
Requirement:
Under one button click i need search all the drives(Folders under drives also) for a file type(eg;.jpg,.mp3)
Can you please help me out with some code. or some
Proper way to approach. Its very urgent please....
Thanks in advance.
suresh.
Sursh
|
|
|
|
|
premsuri wrote: Its very urgent please....
It's always urgent. Oh wait, you've got for full stops. That makes all the difference.
Write a recursive function to walk the directory structure - it's not hard.
|
|
|
|
|
and of course that recursive function looks like :
<br />
private void LoopFolders(DirectoryInfo myFolder)<br />
{<br />
if ((myFolder != null) && (myFolder.Exists))<br />
{<br />
foreach (DirectoryInfo mySubFolder in myFolder.GetDirectories())<br />
{<br />
Console.WriteLine(mySubFolder.Name);<br />
LoopFolders(mySubFolder);<br />
}<br />
}<br />
}<br />
in case you didn't figure that out yet
|
|
|
|
|
I have created a computer program that the user will download. Is there anyway to make money off of the program without charging for the program (advertising, etc).
Thanks!
|
|
|
|
|
Not really, no. Advertising doesn't pay much and users hate it. Unless you wrote the next Napster ( in terms of being something everyone will want ), I'd say forget it.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
They could download the app free but pay you for source.
|
|
|
|
|
Source? What does that mean? (Its not Open source, is it?)
|
|
|
|
|
If your app requires internet access, you could add a WebBrowser control and get some Goolge AdWords there. You wouldn't get a lot of money, but something is better than nothing.
|
|
|
|
|
I began with a textbook Form example (Petzold's Directory TreeView Form)that uses icon resources and modified/experimented with it to begin the C# learning process.
There are icon resource files used in the project and they have their property "Build Action" set to "Embedded Resource". My attempts at placing the icons in their own folder failed. It seems they must be in the solution's root directory? I suspect this observation is because: "I don't know diddly yet!"
I am now trying to transform my modified Petzold code into a DLL. I need to learn how to wrap up the resources so that they are contained in the DLL.
I've been able to create and use the DLL ... but only when I "copy" the icon resource files into the \bin\release directory.
What are the steps I should take so that the resources become a part of the single *.dll file?
When I double click the "Properties" folder in the SolutionExplorer and then select "Resources" ... I am prompted to create a default resources file. Here I can add Icon files and text files. Awesome if that was all that was needed to have the resources become part of the DLL file!! But my DLL does not "find" those resources. Again, I seem to have to copy them into the \bin\release directory for them to be found.
Please teach me or point me towards a good tutorial or textbook that covers the usage of resources in a DLL.
Thanks for all help and suggestions.
-- Tom
|
|
|
|
|
If you add a resource file controled by .net you can access the images in code using the resource file name. For example if you add an image (MyImage.jpg) to a resource file (MyResources.resx) you will be able to access it like below (check your compiler warnings and click enable strongly typed resources if you see it).
Image myImage = MyResource.MyImage;
However, I suspect you may be having problems with the namespaces of your code. To access resources you must correctly know the namespace. You can embed resources just like you mentioned by changing the build options in properties. If you do this you would need to do the following to access the image. Note that the resource name includes the full namespace which will by default include any sub folders used to store the image.
Assembly assemblyExecuting;<br />
Stream streamImage;<br />
Image imageMine<br />
<br />
assemblyExecuting = Assembly.GetExecutingAssembly();<br />
streamImage = assemblyExecuting.GetManifestResourceStream("MyNameSpace.Folder.FileName.jpg");<br />
imageMine = Image.FromStream(streamImage);<br />
streamImage.Close();
|
|
|
|
|
hi
can any body help me how to populate a DGV combobox column with datas from a datatable.
<br />
DataGridViewComboBoxColumn comboboxColumn; <br />
comboboxColumn = _createComboBoxColumn();<br />
comboboxColumn.HeaderText = "Item";<br />
dataGridView1.Columns.Insert(0, comboboxColumn);<br />
<br />
BindingSource s = new BindingSource();<br />
s=dtItem.Columns["Item"].ToString();<br />
comboboxColumn.DataSource = s;<br />
<br />
thank you in advance
ssk
senthil
|
|
|
|
|
you should try it by creating a DataTable Object which can be databound().
|
|
|
|
|
Hi Experts
I want to share MSDN in LAN so that othere client syetem can access it without installing on there systms (same like accessing iis site in workgroup from server to client). Can any budy tell me how to do that ?
The Stifler
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
Hi, how i can save the data in my datatable or dataset or datagrid into a
excel file?
thanks
|
|
|
|
|
|
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?
|
|
|
|