|
It's easier (and faster) to do the work on the RDBMS than trying to filter a DataSet . Just use a query like this:
SELECT DISTINCT *
FROM Customers AS C
JOIN Orders AS O ON C.ID = O.CustomerID
WHERE O.Paid = 1
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
I've been coding in C# for a few months now and one thing that my books never mention is how I should organize my projects in Visual Studio. For instance, on my current project I made an Mp3 player that uses the Speech API to take commands. Should I make 3 seperate projects in VS, one for all the forms (windows app), one for the Speech Code (class library), and one for the mp3 code (class library)? Or should I have just made one project and put all the code in seperate files?
I'm sure there isnt one answer for this, and alot of it comes down to personal preference, but any tips would be much appreciated
|
|
|
|
|
Are there components in your MP3 app that you could use in other applications too?
If so, maybe start by pulling that code into a separate assembly.
Also if you are making enterprise server apps, it's probably a good idea to logically break up your solution into smaller components to facilitate a physically-tiered design.
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
my svg article
|
|
|
|
|
Am building a bootstrapper/app loader that is basicaly a stub that gets an
assembly from a URL, like http://remotehost/code/startup.dll.
I want to iterate thru all the dependancies behind startup.dll and pre-load em (reason is to use in the install to pre-load large assemblies, or to provide some nice dialog progress when loading)
The problem is that some dependencies are in the GAC and others are located
on the webserver. Using assembly.load finds all the GAC and application dir
assemblies, but not the assemblies on the webserver.
If I use Assembly.LoadFrom then dependencies that are in the GAC won't be found and the dependencies behind startup.dll loose thier versioning/strong names since we pass it a string of the assmebly name and not a AssemblyName token.
What I need is a smart Assembly.Load that can bind and probe locally and remote.
Any ideas for a solution?
-- Ingram
Assembly assem = Assembly.LoadFrom(@"http://remotehost/code/startup.dll");<br />
<br />
LoadAllReferences(assem, new ArrayList());
private static void LoadAllReferences(Assembly asm, ArrayList loaded)
{
Console.WriteLine("----------- "+asm);
foreach ( AssemblyName asr in asm.GetReferencedAssemblies() )
{
Console.WriteLine(asr.FullName);
}
Console.WriteLine("----------- **");
foreach ( AssemblyName asr in asm.GetReferencedAssemblies() )
{
if (loaded.Contains(asr.FullName))
{
Console.WriteLine("### already loaded "+asr.ToString());
}
else
{
Console.WriteLine("**** " + asr.ToString());
Assembly asmRef = Assembly.Load( asr );
loaded.Add(asr.FullName);
LoadAllReferences( asmRef, loaded );
}
}
}
This is a revisited question, see Google,
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&safe=off&threadm=uteRFS89
BHA.1748%40tkmsftngp04&rnum=11&prev=/groups%3Fq%3Dloading%2Bassemblies%26sta
rt%3D10%26hl%3Den%26lr%3D%26ie%3DUTF-8%26safe%3Doff%26selm%3DuteRFS89BHA.174
8%2540tkmsftngp04%26rnum%3D11[^]
Ingram Leedy
You can't depend on your eyes when your imagination is out of focus.
--Mark Twain
|
|
|
|
|
Not the answer you are looking for, but the 1st thing you wanna do is check what is loaded already so those can be filtered out.
Also, a reference in one assembly mite not be applicable to your type and will still work AFAIK. Remember .NET only loads when the assembly is required at runtime.
ANyways hope you find your solution
Who is this miscrosoft, and what devilish plans have they for us?
|
|
|
|
|
Yo hey what's up?
I was skimmin over some of the asynchronous socket examples on MSDN and happened to notice all the call backs were static.
I am not to familar on how this IAsyncResult stuff works but from what I understand they work on another thread receiving data from a client as one example. If a server is receiving data from 2 clients and the everything is already hooked up aka meaning all the call backs.
client1.BeginReceive(state.buffer,0,StateObject.buffersize,0,new AsyncCallback(ReadCallback),state);
client2.BeginReceive(state.buffer,0,StateObject.buffersize,0,new AsyncCallback(ReadCallback),state);
and ReadCallback is static then the are sharing the same instance of it.
But if the instance is already doing work ie. receiving data from one client.
How can it recieve data from another client.
I guess what I am saying is how can 2 threads share one instance of a method.
Thanks for any help or insight on this...
scan
|
|
|
|
|
scan wrote:
I guess what I am saying is how can 2 threads share one instance of a method.
The "ReadCallBack" funtion seems to act as a recursive function (anyways from the examples I have seen) running till done, and normally recursive functions are static in nature (and good in design IMO).
Who is this miscrosoft, and what devilish plans have they for us?
|
|
|
|
|
HI,
Good Morning.
I would be very glad if any of you can help me out of this. I'm a beginner in C# and I've to do this for my project.
I have an MDI form which in turn consists of some SDI form. One of them is a Windows form developed in C#, which consists of some controls like Command Buttons. Another SDI form is a Flash file (.swf). Now I've to establish communication between these two. For example, if I clik on a command button, I've to animate the .swf file, which involves transfer of some data. This is the beginning of the process and still needs to be enhanced.
If any of you need any clarification on this, please mail me to vas@aim.co.kr.
Thanks and Regards.
Srinivas Kadiyala.
|
|
|
|
|
Srinivas Kadiyala wrote:
Now I've to establish communication between these two.
The only way to do that is via XML I would think. That and obviously using the Flash activeX control.
Who is this miscrosoft, and what devilish plans have they for us?
|
|
|
|
|
Hi,
Thanx a lot for the reply.
Now I would something like this :
Suppose I would press a command button in the form. Then it would change the value of a variable and put it in XML. Then I would retrieve the value from the XML and pass it on to the Flash ActiveX control and do some animation in the .swf file and vice versa.
Is it OK? Is this possible? Can you suggest some enhancements to this design? Please give your valueble feedback since I'm new to both .NET and Flash.
Sorry for the trouble.
Cheers...
|
|
|
|
|
Hello All,
I am getting frustrated now....
How do I store cursors and retrive them from a .NET assembly dll?
The resource file support does not seems to extend to cursors. I am
building components not an application and wish to add several cursors
to the component or resource only dll.
Any help?
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Could you help me how can I create listbox (and controls) without client edge / border / static edge ?
Wiizi
|
|
|
|
|
set the BorderStyle property to BorderStyle.None
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
How would you go about doing such a thing? any suggestions?
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
What are trying to do? You can serialize it...If its a struct, then you Marshal it and read the bytes...
Who is this miscrosoft, and what devilish plans have they for us?
|
|
|
|
|
well it could be a struct, it could be a class, or it could be a string. the infor has to be made into a byte[] so it can be sent off through a socket.
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
Then Serialize it thru the BinaryFormatter. Your class will need the Serializable attribute.
Who is this miscrosoft, and what devilish plans have they for us?
|
|
|
|
|
Hi All,
I'm having a problem with the width of the columns in a datagrid. How do I get the columns in a datagrid to "auto expand" to the width of the data in the columns? I've messed around with the PreferredColumnWidth property, but it doesn't give the right results.
Any Ideas?
|
|
|
|
|
Hi
How can i draw grayed image from ImageList ?
Dennny
|
|
|
|
|
use the System.Windows.Forms.ControlPaint.DrawImageDisabled method.
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
I tried to remove scrollbars of a MDI parent form by setting AutoScroll to false. However when a MDI child form is outside the range of MDI parent form. The scrollbars is appeared again. As a result, I can't find a way to design an MDI parent form as EXCEL. Can someone kindly give me an idea of this problem? I will appreciate very much.
******************************************************
Nigel H. Lin
Ph.D. Student
Department of Computer Science and Information Engineering
Tamkang University
Part Time Lecturer
Kuang Wu Institute of Technology and
St. John's & St. Mary's Institute of Technology
--------------------------------------------------------------------
Email Box : nigel@mail.topwise.com
******************************************************
|
|
|
|
|
I am afraid this behaviour is by design.
|
|
|
|
|
Thank you for your kind reply.
I really appreciate for your prompt reply.
I just wonder how Microsoft can write an program like EXCEL.
In Excel, they also use MDI method to design their program; however I didn't see the scrollbars when the MDI child is over the range of a MDI parent form.
Is there really noway to solve this problem? Or can I use any WIN32 API to get rid of the auto scrollbars of MDI parent form?
******************************************************
Nigel H. Lin
Ph.D. Student
Department of Computer Science and Information Engineering
Tamkang University
Part Time Lecturer
Kuang Wu Institute of Technology and
St. John's & St. Mary's Institute of Technology
--------------------------------------------------------------------
Email Box : nigel@mail.topwise.com
******************************************************
|
|
|
|
|
Nigel H. Lin wrote:
Is there really noway to solve this problem? Or can I use any WIN32 API to get rid of the auto scrollbars of MDI parent form?
Unfortunately no. Although you can get the window handle of the MDI container, and call an interop WIN32 function to change the window style and by the way remove the scrollbar(s), the fact is those are going to be back soon automatically because that's what the implementation of the Form class does (actually most of the layout logic is implemented there and in the ScrollableControl class it derives from).
I am afraid that if you want such thing in your app you have to write your own MDI container. Interesting topic by the way, and source code you can ultimately share with us!
Hint : derive your class from System.Windows.Forms.Control, instead of System.Windows.Forms.Form.
PS : Unlike what you say, I don't know what might be wrong with a scrollbar displayed as soon as a MDI client goes off the client area. That's safe, and it allows to reach it. Without a scrollbar, how would you get it back ?
|
|
|
|
|
Thank you for your reply.
Actually, the reason for me to design such a MDI form without scrollbars is that it really doesn't look good when I first first load 2 of my MDI child forms into my MDI parent form. I tried to fit those two MDI child forms vertically and each of them occupies half height of the range of MDI parent form; however scrollbars came out and destroy the outlook of my program. I think you are right about having scrollbars is safe. I know it could be hard and difficult to accomplish this task. I just hope to find out the easy way for me to do this.
PS: I really appreciate your prompt reply. I might try what you suggested me to do.
******************************************************
Nigel H. Lin
Ph.D. Student
Department of Computer Science and Information Engineering
Tamkang University
Part Time Lecturer
Kuang Wu Institute of Technology and
St. John's & St. Mary's Institute of Technology
--------------------------------------------------------------------
Email Box : nigel@mail.topwise.com
******************************************************
|
|
|
|