|
I am having trouble adding some of my existing controls to my toolbox in VS.NET. Here's what is going on:
1). I have an existing project that is a Windows Control Library with a bunch of controls.
2). I start a new solution and create an Application
3). I add the existing project with my controls to the solution, then create the reference.
4). I cannot get my tools that are in the project I added. I cannot see them in the Form Designer toolbox, but I am able to declare them in the code.
5). If I add a new control to the control library project, only the one I added inside this solution appears in the toolbox.
How do I get all my controls to show up in the toolbox? I don't want to add the compiled DLL because I still might make changes to the control library.
Thanks!
|
|
|
|
|
You can add your control with:
1. On toolbox add Tab
2. on new tab add/remove items
3. choose dll from your windows control library on tab Com Component
that's it i hope this will be help you thx
|
|
|
|
|
Hello all,
I've been looking for example code on this and have yet to find any substantial examples or discussions. Basically, I need to be able to communicate with a windows service. I want to hold objects in memory that will be accessed by other applications (the windows service will update the objects in memory periodically). I've read articles about remoting, but that doesn't seem to be the right way to go since remoting creates new instances of objects to service a request (even the singleton gets "instantiated" at point). What I need to be able to do, is have the service stop and start with the OS (like a normal automatic service) and have its data accessible at any time by other applications.
Any ideas?
Thanks in advance!
-Q
|
|
|
|
|
1. You could serialize the data into a file or DB, so your application can access the data and deserialize it.
2. With remoting, you can publish an specific instance of an object (I tried this and it worked fine for me) using RemotingConfiguration.Marshal(objRef)
Free your mind...
|
|
|
|
|
Ok, i hope this is the right place to ask this, on .. i reisntalled my system today to try to get .NET working properly .. but no luck.. the problem i have is that everything works but DirectX (Strange part is that the MS examples does not work but the managed directx tutorials here on CD works?!?!).
I get an error about a "pre-verison expired" then an unhandled exception, anyone knows what this can be and if so how to fix it? Ive reinstalled SDK a couple of times, DirectX has also been reinstalled and even with dxsetup /installmanageddx so ive tried everything i can come up with/searched the web for answers and nothing on it.
And please dont flame me, i want to try this thing out and want to see the speeds of it....
Ohh well, hope someone here got an answer for me ... :>
|
|
|
|
|
Tomas Wilhelmsson wrote:
"pre-verison expired"
If you're getting that error it sounds like your version of directx was from a beta release. The newest version out now is DirectX 9b, and you can grab the SDK from the MSDN DirectX downloads page.
James
"then when you go to bed...wait, you dont do that do you....ok....when you plug into the 'hive mind' to charge yourself, ill hack into your head"
Nnamdi Onyeyiri over MSN
|
|
|
|
|
I have all the newest stuff, ive downloaded it today so ... and i dont think MS leaves old beta links left on the directx download pages? :>
|
|
|
|
|
Tomas Wilhelmsson wrote:
i dont think MS leaves old beta links left on the directx download pages? :>
They don't, and I think DirectX 9 was a closed beta test; and since you didn't mention downloading the SDK today I assumed you used a CD you had lying around one possibly with the beta on it.
But since you don't have the beta, I'm out of ideas as to what it could be. I'm not a DirectX guru by any means so hopefully someone who is one can answer your question.
James
"then when you go to bed...wait, you dont do that do you....ok....when you plug into the 'hive mind' to charge yourself, ill hack into your head"
Nnamdi Onyeyiri over MSN
|
|
|
|
|
Ohh well, thanks for the reaply atleast :>
Sad part is that i feel that i cant trust MS to much, as i have done everything i could find about it and it STILL dont work :>
Well, have to keep on looking then :>
|
|
|
|
|
I guess they still haven't fixed it.
Here's a snippet form the dxdev nmailing list
--------------------------------------------------
We are aware of the problem and will hopefully have a fix ASAP.
A temporary workaround would be to change the date on your system to an
earlier date.
-----Original Message-----
Sent: Thursday, October 02, 2003 1:56 AM
Subject: Re: Managed DX9 expired.
>> I recently installed the final summer update to DX9. I hadn't
>> installed any of the previous betas or RCs. Right around 5pm today,
>> managed DX stopped working saying the pre-release build had expired.
>> Anyone have any news on what's up with this? My co-workers are seeing
the same thing.
I'm getting this problem as well, and I reinstalled this machine from
scratch on Monday. I was supposed to be showing a mini editor I wrote at
home in C# today as an attempt to get people here more interested in C#
for tools dev :/
Wayney
|
|
|
|
|
I'm trying to figure out:
If there is anyway other then COM Interop to access ICorRuntimeHost interface implemented by running MSCOREE directly from managed application.
Again, I'm not interested in possible solution that involves COM creation of CorRuntimeHost as it's not safe (or maybe it is?)...
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
Igor, take a look at the System.AppDomain class. The Hosting Interface.doc paper from one of the subfolders of the .NET SDK is a good read too.
If you are executing managed code, then a CLR instance is already started (for that app domain). That's probably why System.AppDomain doesn't provide methods like Start()/Stop(), contrary to ICorRuntimeHost.
RSS feed
|
|
|
|
|
Stephane,
Start/Stop is not of interest to me.
I'm trying to figure out if it's possible to change MaxThreads in .NET ThreadPool class, which is static through safe .NET facilities.
However, the only solution I've found so far is through COM Interop:
http://www.csharphelp.com/archives3/archive487.html
I don't get it: why SetMaxThreads is not exposed?: What a pain...
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
importing the COM signature seems to be the only way to go since :
- it's native code in the end
- SetMinThreads(wt,ct); doesn't seem to help much
Rotor's source code (sscli/clr/src/vm/win32threadpool.cpp) seems in debug mode to lookup the CLR config file for a "MaxThreadpoolThreads" keyword in it, and replaces the default "25 * nbCPUs" value with it, if any. I don't know at this point if the commercial CLR does it too.
RSS feed
|
|
|
|
|
I have some custom drawing code that I'm doing in my application. I made sure to use the using statement or explicity call dispose on all the brushes and pens that I'm using to make sure that I don't have any memory leaks.
My problem is that if I start the application and move the mouse around to cause the drawing to occur then I see in the task manager that I slowly eat up more and more memory, 20-60k at a time. If I don't change a single line of code but put in a GC.Collect() at the end of my drawing then I see that no extra memory is consumed.
I've left the application running for a while and I don't see the memory being released w/o the GC.Collect().
Am I supposed to just trust that everything is going ok under the covers and that at some point Garbage collection will get it? If I do this and I give someone here my application won't they assume I have a memory leak?
Thanks,
Michael
|
|
|
|
|
Am I supposed to just trust that everything is going ok under the covers and that at some point Garbage collection will get it?
Yes, I suppose you do have to trust -- unless otherwise....
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
Consider a separate GDI profiler, like this one[^].
The fact that GC.Collect() affects the amount of used handles is quite normal. Would you be surprised if you sent yourself a WM_CLOSE message that your application got finished?
RSS feed
|
|
|
|
|
I am developing an application where I am seeking the look and feel of Microsoft Outlook. I have created some forms for my different objects (contracts, suppliers etc.). I have created ContractListForm, ContractForm, SupplierListForm and SupplierForm among others.
Now, in my main form, I have a toolbar to the left and when the user clicks one of the buttons, I want to open up the correct *ListForm to the right (not in a new window).
Is this possible? If not, how should I design this?
I would like to be able to do just like in Outlook, where the user can chose to open the Inbox for instance either to the right, or in a new window.
/Ricky
|
|
|
|
|
What I did one time when I was trying to do the same thing was put a panel control where you want the form to go. The panel control, if I remember correctly, is able to "host" a form so you just create an instance of the form and add it to the panels controls.
|
|
|
|
|
I have already tried that but when i Run:
myPanel.Controls.Add(myForm);
...I get an error message something like this:
"You can not add a top-level control to a control".
(I should have written that in my first post.)
So, do you know if it still is possible any other way?
/Ricky
|
|
|
|
|
What I did was this, and it works for me:
In the constructor code for the form add:
this.TopLevel = false;
In your main form use this:
frmAddNew add = new frmAddNew( );
add.Parent = panelWorkArea;
panelWorkArea.Controls.Add( add );
add.Visible = true;
Let me know if that works for you.
|
|
|
|
|
Thank you!
That works just fine. Next, I will try to get rid of the form border. I quickly found the ways to remove the system, minimize, maximize and close buttons. I docked the form to the panel so when the panel (inside it's form) resizes, the subform follows. Perfect... but, the user still sees the window border and caption and can manually resize the form. I suppose it's very easily removed but I simply have not found the command yet. My knowledge in Windows Forms seems quite rudamentary yet.
/Ricky
|
|
|
|
|
No problem, glad it helped.
For the border, just set the border style to none and the title and resize-ability will go away.
Michael
|
|
|
|
|
You can somehow set ID numbers to the buttons on your toolbar and then catch every event from this button or something like this
private void button1_click (la la la ..)
{
ContractListForm frm1 = new ContractListForm();
this.Hide();
frm1.Show();
}
"I have not failed.
I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
|
|
|
|
|
One other approach would be to derive all your *ListForms from UserControl instead of Form. You can still use the forms designer with a UserControl. I don't think you will lose much, if any, functionality that you need, but you may have more flexibility for reusing the *ListForms and for hosting them in any type of control or form.
I've also been wondering about the best approach for something like this, so I would like to pose a general question to the group. To create the type of "Outlook" UI Ricky asks about, is it better to use Forms or Controls (such as UserControl)?
Which has more flexibility?
Which is easier for RAD UI development?
Which has more support and is more widely used?
Which is easier for integrating menus, toolbars, etc.?
In my case, I have two choices. I could use either a tabbed MDI host (like in VS.NET) with multiple forms, or I could use various host controls (including tab controls, etc.) to display my own UserControl-derived objects.
Any comments are appreciated.
Dave
|
|
|
|