|
Your problem hasnt much to do with C#. You should read some basic book about object oriented programming.
You cannot directly access ds1 of class Entry. For this you either need to declare the field static (which means there is only one value for the whole class and not for each instance) or access the field from an instance of the Entry class.
|
|
|
|
|
I need programmatic control device volume, location of that is :
control panel->sounds and audio device properties->device volume.
Or in the bottom right angle(volume icon).
Can i do this with .NET library? If no how do this with using WinAPI and С#?
|
|
|
|
|
I'm using Remoting with Configuration Files on the server and on the client.
I've read that after RemotingServices.Configure(filename) I can use the new operator to
get the remoted object from the server. But how does the compiler know to get the remoting object from the server and not simply creates a new object of the RemotableClass?
RemotingServices.Configure("Client.config")
RemotableClass rem = new RemotableClass();
Thanks.
|
|
|
|
|
Please advise me.
Thank You.
Sorry for bad English
|
|
|
|
|
I'm reading Inside C#. I 've just written a "Hello World" console app w/ VS.NET
I want to 'get into' the dumpbin. I then open a command prompt and change to the the folder w/ the App. It makes it all the way to:
dumpbin /HEADERS /CLRHEADER
But as soon as I append HelloWorld.exe I get a LINK 1181 error.
I then went to the "Path" and added the \bin and \VsaEnv folders (I think)
Tried it again- same error. Any ideas??? - thanks very much - this is very frustrating...
|
|
|
|
|
I have a simple HashTable defined that has a few objects in it as follows:
HashTable myHashTable = new HashTable();
Queue q12 = new Queue();
Queue q22 = new Queue();
Queue q33 = new Queue();
myHashTable.Add("A",q12);
myHashTable.Add("G",q22);
myHashTable.Add("K",q33);
How can I directly retrieve the 2nd queue (or the nth queue) in this list. Here is what
I tried that does not work
int n=1;
Queue myNthQueue = (Queue)
DictionaryEntry myEntry = (DictionaryEntry) userHashTable[n];
Queue whichQueueToPopFrom = (Queue) myEntry.Value;
string whichQueueToPopFromName = (string) myEntry.Key;
This compiles, but complains about nulls and does not work.
Any suggestions would be appreciated.
|
|
|
|
|
A Hashtable has no order. If you want to access items via key AND index you will have to search for another (hybrid style) class. I dont think there is one in the .NET framework, but I think there is one in the VisualBasic.Compatibility namespace which you can also use from within C#.
|
|
|
|
|
I typically have a small number of items in this class. Can I iterate through it and will the iteration always go in the same order if the items in the class don't change. (ie, no adds or removes)
|
|
|
|
|
|
i have been creating a program which is able to run over the internet bypassing the proxy server. is there a way for my client to connect to the server (using sockets)as well as receive/download files from the server?
thank you
|
|
|
|
|
|
did you use httpwebrequest/httpwebresponse and webproxy? is it possible to use those in socket programming?
|
|
|
|
|
Hmm. Not sure. I didn't actually go through a proxy.
Sorry
|
|
|
|
|
oh ok.. did you use webrequest and webresponse in your code?
|
|
|
|
|
|
how would you enable that, im using visual studio 2005 beta 1, .net framework 2.0 beta 1. i have the following controls set...
autocompletecustomsource = collection, it goes in an editor...
autocompletemode = suggest...
autocompletesource = custom source...
where am i going wrong? it doesn't work with those settings.
IM PROUD TO BE A GMAIL;
|
|
|
|
|
Hi, I have a collection in a control i'm making (extends collectionbase), and in all the functions i embody the code in lock(List.SyncRoot){}. for ex:
<br />
public void Add(string text)<br />
{<br />
lock(List.SyncRoot)<br />
{<br />
List.Add(new SimpleListItem(text));<br />
<br />
OnItemsAdded(this, new System.EventArgs(), List.Count - 1);<br />
}<br />
}<br />
I plan to use the control asynch like when i add items to it, so is it necessary that i use the lock thing the way i described?
|
|
|
|
|
Windows forms, C#, Visual Studio .NET 2003.
In a MDI application, we have a MDI child form that starts out maximized [window "A"]. This mdi child form has the option to open a different "editing" window as a non-modal child [window "B"].
If I set the properties "B" to be a MDI child, it will start out maximized, which we don't want. If, however, I set the properties of "B" as simply a Child of "A", then it remains a child of the MDI application (good), it remains non-maximized (good) BUT: we can no longer edit text in the text box in a "normal" fashion.
The behavior is such that you can't take your cursor and highlight all of the text in the text box. You have to click in the text box, in which the cursor will force to the beginning, then you have to use your keyboard keys such as "End" and the backspace key to actually edit the text.
Have tried various combinations of MDI Child but fixed borders and no control boxes and such, but the issue keeps coming up that in order to get the editing normal, it seems as if I MUST keep the form "B" as a MDI Child and thus it either maximizes, which I don't want, or it un-maximizes form "A" which I don't want.
Any suggestions would be greatly appreciated.
================
Thank you
Sue
|
|
|
|
|
OK. This is all normal Windows functionality:
1) If one Child form of an MDI Parent is maximized, all the children are maximized. You can't mix it so one is maximized and other are not.
2) A Child Form cannot be both a child and a parent to another form. If you attempt to do this, the results are undefined and unpredictable, which you've already noticed.
The only solution you have to both problems at the same time is to make the second child form a seperate window, with no parent. This will make the child form just like any other window with no interaction with the MDI Parent. But, I suspect you don't want this either.
In that case, there is no solution to your problem. Your requirements will have to be modified to fit within the functional limitations of Windows.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well, this has confirmed bits and pieces of information I've found, and behavior I've experienced in other programs - my own and Microsoft's.
I thank you for the explanation and it is starting to make sense. I anticipate that I will "not" be able to do exactly what I'm looking for, so I'll have to make decisions as to what is "best" for the user - not being able to edit with the mouse, or having a huge maximized screen with information only in the upper left-hand corner.
Thanks for the reply.
|
|
|
|
|
I must be misunderstanding your problem because I cant seem to see where the problem is.
Lets see if I got it straight:
1)You have a MDI application with a main MDIParent Form
2)U have a MDIChild form A maximized
3)In A u have a button or whatever that opens up a Form B through Show() or ShowDialog(this) (actually, the owner will always be the MdiParent, MdiChilds cannot own forms, but the Framework will do that for u).
If thats how it is then textboxes will work perfectly fine in Form B., U can select with mouse and whatever. Are u using normal TextBoxes or are u using your own derived classes?
|
|
|
|
|
See the 'Back' button on your IE browser, or the 'New' button in VS. They have this little arrow to the right of the text which if selected gives a drop down of related choices.
Is this an extended button? Or simply two buttons very close to each other?
Does anyone know where I can learn about how to make such a button.
Thank you.
-d
|
|
|
|
|
Well, in Visual Studio 2003, this is built in.
I believe these are the steps:
- Place a System.Windows.Forms.Toolbar on the top of your form.
- Now edit the properties, and choose the Buttons collection.
- Add a new button, and for the Style, choose Drop Down button.
- I think here you have to assign a Drop Down list into the property DropDownMenu.
Try that see if it works.
If you don't have VS 2003 maybe post what dev env you are using.
|
|
|
|
|
Yes, that is the button I'm looking for. I just don't want it in a tool bar.
I'll look at the code that is generated and see if I can adapt it for my needs.
Thank you
-d
VS 2003 is what I'm using
|
|
|
|
|
A user control with two buttons and a context menu should do it.
|
|
|
|