|
No problem at all. The secret to becoming a successful developer is being resourceful and not giving up. Glad I could help.
My posts may include factual data, educated guesses, personal opinion and dry humor. They should not be treated as an official Microsoft statement. Sites of Interest: MSDN Events | US ISV Team Blog
|
|
|
|
|
Jared Bienz [MSFT] wrote: The secret to becoming a successful developer is being resourceful and not giving up
Its not. The secret is caffeine and pizza. Plenty of it.
|
|
|
|
|
Caffeine and Pizza inherit from Resource, don't they?
Luc Pattyn [Forum Guidelines] [My Articles]
this months 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
|
|
|
|
|
Luc Pattyn wrote: Caffeine and Pizza inherit from Resource, don't they?
They do. And best of all, they are Disposable - although the Garbage Collection is a bit unpredictable.;)
|
|
|
|
|
Jared Bienz [MSFT] wrote: You should probably have a Console.ReadLine at the end or the window will close before you see the results (if debugging in Visual Studio).
I actually find that:
Console.ReadKey(true);
Is much better, as soon as you press any key (apart from a select few, NumLock, for example) it will close. The 'true' part means that it will not send the input to the buffer, so you won't actualy see the letter or number you pressed on the screen.
My current favourite word is: PIE!
I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for.
-The Undefeated
|
|
|
|
|
Ah, much better. Thanks for pointing that out. I'm going to use that from now on in my SequentialWorkflow console demos!
My posts may include factual data, educated guesses, personal opinion and dry humor. They should not be treated as an official Microsoft statement. Sites of Interest: MSDN Events | US ISV Team Blog
|
|
|
|
|
Please help me to find a good and simple Remoting tutorial.
I have 6 mnth exp in c# (So now you know my level of understanding).
Thanks in advance.
v
|
|
|
|
|
Try this[^]. You can find it easily enough by using Google[^]
|
|
|
|
|
Petes article above is a great place to start. You might also want to dive into the .Net Remoting Overview[^] section on MSDN. Specifically there's a good article titled Building a Basic .NET Framework Remoting Application[^]
I'd also like to make sure you're aware of Windows Communication Foundation (WCF). You may have a business reason for using Remoting so I wanted to provide those resources, but if this is a hobby project or you’re starting new product development you really should consider using WCF instead. .Net Remoting will be around for a long time yet, but Microsoft is no longer developing that technology and WCF is the recommended platform for all new communications development.
WCF will still let you do the same things that Remoting will (cross-process communication, fast binary encoding, singletons, serialization, etc.) but it will also let you do so much more. A WCF service can be hosted in-process like a Remoting service can, but it can also be hosted, activated and load balanced on an IIS server. WCF allows the same service instance to be contacted over a binary TCP channel, a SOAP web service channel, a named pipe or even a message queue -- all without changing a single line of code. How a service behaves, how security is applied and how a service communicates can all be described in code or alternatively in an XML configuration file without needing to recompile the application. You can even use WCF to write P2P applications!
If you'd like to check out WCF I recommend you start with http://wcf.netfx3.com[^] or the Windows Communication Foundation[^] area on MSDN.
I hope you find what you're looking for, and happy coding!
Jared
My posts may include factual data, educated guesses, personal opinion and dry humor. They should not be treated as an official Microsoft statement.
|
|
|
|
|
Jared
I'm glad you brought this up, and am kicking myself for not mentioning it myself. Something that you didn't mention, but I think is a big plus, is that WCF also outperforms remoting (in all the cases I've encountered so far). Added to that, the fact that you can change transport mechanisms (within certain limits) without too much trouble, and this is indeed a very powerful way to go forward. There are certain things I would have liked to see present in WCF, but on the whole I really like it (enough that all of my clients are now getting WCF solutions instead of the alternatives).
|
|
|
|
|
Do a search here at CP and there are plenty of good articles.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello to all,
I have a dialog box that for now I want to inject the user name and password directly,
I added the values to main and passed to the correct place in the program.
the only problem is the dialog opens and waits for someone to press the "OK" button to proceed.
I want to make the box close by performClick() it self or some other alternative to achieve the same result.
I want this:
if (frmLoginUser.ShowDialog() != DialogResult.OK)
{
return;
}
to exist, but automatically press it's own OK button without any value passed to Dialog.
thank you very much for the help.
|
|
|
|
|
You don't need to click a button to set the dialog result. So you could just add in this.DialogResult = DialogResult.OK and then close the form.
My current favourite word is: PIE!
I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for.
-The Undefeated
|
|
|
|
|
thanks man that's right,
How come I didn't think of that guess to mixed up with other stuff,
sorry for disturbing you on such a small matter
have a great day.
|
|
|
|
|
This is my first attempt at inheritance, and it seems to be working okay, but I want to be able to assign a back color to visual show that the sub-item has been selected (new property I gave it). I used the Reflector to see how the code is done on the original ListViewSubItem, but I can do it the same as, as they assign the back color to the SubItemStyle, and I can't get to that since it's protected. Is there any other way to do what I want, or am I out of luck? Thanks in advance.
Tim
|
|
|
|
|
|
Thanks you! This has been bugging me for a couple of weeks. I don't know how I missed that property of the ListViewItem, but it seems to be what I'm looking for.
Tim
|
|
|
|
|
I have 2 classes
class Attribute<t>
{
string attributeID;
T[] values;
}
When instantiated, it holds several int's, decimals or strings
2nd class should hold several DIFFERENT Attributes. Here I am getting problem:
class Node
{
ArrayList attribArray;
AddAttribute(Attribute<t> inAttrib)
{ attribArray.Add(inAttrib;}
}
It compiles, but I cannot find a way to get stored Attributes
runtime
Example: I need a list of values from 2nd attribute in
my attribArray
Any thoughts, please
|
|
|
|
|
public class Node : List<attribute>{} //No code needed.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: public class Node : List{} //No code needed
System.Collections.Generic.List<t> requires 1 type argument
I need to keep several _diffrent_ Attributes
|
|
|
|
|
hi,
1.
when retrieving an item from an ArrayList you need to cast to the original type.
string str1="aha";
ArrayList list=new ArrayList();
list.Add(str1);
string str2=(string)list[0];
2.
when storing different types in a generic, you need to specify a common type
(it could be object or any common ancestor of your types).
3.
since an ArrayList is not an array, I would not call one instance attribArray,
I would suggest either attribList or attribs.
Luc Pattyn [Forum Guidelines] [My Articles]
this months 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
|
|
|
|
|
>1.when retrieving an item from an ArrayList you need to cast to the original type.
I know that. Two issues though: (a) where to get information on the type of stored Attribute
(b) how to succesfully unbox object to Attribute<int>, Attribute<string> etc.
>2.when storing different types in a generic, you need to specify a common type
(it could be object or any common ancestor of your types).
I thought that adding an onject to an ArrayList does it automaticaally (I mean conversion to the Object type)
>3.
I am not going into this
SO, I am still in limbo. Thank you for trying to help me
|
|
|
|
|
Hi,
1.
you can retrieve an object from any ArrayList, then check its type, e.g.
object obj=list[0];
Button btn=obj as Button;
if (btn!=null) btn.PerformClick();
2.
ArrayList does not care about the types of objects it is holding.
A generic collection such as List<T> is different:
- it will only accept objects of type T (or derived from T)
- it will automatically return objects of type T, without needing a cast
(making it both safer and faster).
Luc Pattyn [Forum Guidelines] [My Articles]
this months 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
|
|
|
|
|
Luc Pattyn wrote: 1.you can retrieve an object from any ArrayList, then check its type, e.g.
object obj=list[0];
Button btn=obj as Button; // gives either a real Button or null
if (btn!=null) btn.PerformClick();
(a) my objects are Attribute<int>>, Attribute<string> etc. Should I try to cast all variety?
(b) to my great surprise, when I did your line 1 it did return an object with type name
"<assemblyname>.Attribute`1". Here 1 stays for 1 parameter. Moreover, FullName showed this parameter type like String.string in my case
Oh, Mighty Reflection,, the problem is solved
2. I cannot use List<T>, can i? My objects are all different types
thanks
-- modified at 6:35 Thursday 29th November, 2007
|
|
|
|
|
I am creating a windows application using vb .net 2005 (i don't mind c#) and sql server 2005.
i want to print a local (embedded) rdlc report without showing it.
is it possible?
if not, then how do i print the report (displayed in reportiviewer) without showing print dialog.
Thank you.
|
|
|
|