|
Does anyone know what the function name is to determine if a .NET application is in design mode, or if it is compiled and running?? The eqivalent in the MFC world was AmbientUserMode(). TIA
|
|
|
|
|
Anything which derives from System.ComponentModel.Component inherits the protected DesignMode boolean property, which returns true if the component is running in a designer. Every control (including Forms) derive from Component.
:josh:
My WPF Blog[^]
|
|
|
|
|
Is there a chance to compile more assemblies to one assembly ?
|
|
|
|
|
1) If you have the source code then yes. Just bring them all into the same project and recompile.
2) If you don't have the source code then you can still KIND of do it by just writing a wrapper library that acts as a proxy to the other individual libraries.
My Blog[^] FFRF[^]
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
|
I'm trying to use a treeview control for file searching. I would like to start by the desktop, like a usual program, but I can't find the place here that information is. Environment.GetSpecialFolders seems not given me that information. Can anyone help my?
Thank you.
Hi there
|
|
|
|
|
Have you tried searching CP for explorer treeview[^]?
Obviously not because the first 5 hits are all dealing with this.
|
|
|
|
|
xadrex wrote: Environment.GetSpecialFolders seems not given me that information.
It gives:
Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
|
|
|
|
I've tried to sign my assemblies (http://www.codeproject.com/useritems/SecUtilexe.asp?df=100&forumid=256869&exp=0&select=1337472)
but it is not working. I can use assemblies from any application. Is there another solution or things in 2.0 are different?
|
|
|
|
|
|
Hello comunity,
i translate my project from VS6 to VS2005, but even when i want to run my project in debug mode i recive the follow errormessage:
"MSVCR80D.DLL Not Found...."
i have installed the new PSDK for win2003, but i work on winxp prof.
what to do to solve this???
Something else, when i run them i n release mode, works fine????? without any problems!!!
please help with that!
regards
break;
|
|
|
|
|
Release mode does not use that DLL. See if this thread can help with your Debug mode failure: link.
Best,
Jun
|
|
|
|
|
I have been searching around for info on how to do this for a bit, and haven't really come up with anything that makes sense to me.
Can anyone point me in the right direction on the best way to pull down a list of users/email addresses from an Exchange Server that I am accessing via a VPN?
|
|
|
|
|
HI all,
IN VC++.Net I am facing problem to draw a rectangle on the form
when I Press a Button.
Can Any one Help to solve me this problem.
Thanks In Advance.
Bye.....
G.Nagaraju
|
|
|
|
|
Look at System.Drawing namespace - class Graphics method DrawRectangle.
Best regards, Alexey.
|
|
|
|
|
No allex,
I have Tried with That class;
My code is
private: System::Void button1_Click(System::Object^ sender,System::EventArgs^e)
{
Drawing::Graphics ^gr;
gr->DrawRectangle(gcnew Pen(Color::Black),90,50,60,60);
}
But When I Compiled ,Compiler Giving error such that
Object Instance must be created using "new";
Showing at Graphics Oject.
Suggest me to Get rid.
Thank u
G.Nagaraju
|
|
|
|
|
Nagaraju_Focus wrote: Drawing::Graphics ^gr;
gr->DrawRectangle(gcnew Pen(Color::Black),90,50,60,60);
The error was pretty self explanitory. You created a variable to hold an instance of a Graphics object, but never instantiated one.
You have to get the Graphics object from the control that your going to draw on, like a Panel or Picturebox, or even the Form. Check out the documention of the CreateGraphics() method of the object you want to draw on.
Oh! Don't forget to delete the graphics object you created when you're done with it!
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 10:31 Friday 7th July, 2006
|
|
|
|
|
Thank U Very Much
Its working fine:
Nagraj
|
|
|
|
|
Trying to set up some switches to control debug output.
The MS docs say:
To set the level of your switch, edit the configuration file that corresponds to the name of your application. Within this file, you can add a switch and set its value, remove a switch, or clear all the switches previously set by the application. The configuration file should be formatted like the following example:
Where this file comes from or resides is not mentioned.
Do I create it myself <appname>.config?
Where do I put it? Same dir as application?
What if I want per assembly control?
Anybody?
-- modified at 17:51 Thursday 6th July, 2006
|
|
|
|
|
Project -> Add New Item.
Select Application Configuration File
When you compile your project it will name it
AppName.exe.config and place it in the same directory as your exe.
Mike Lasseter
-- modified at 22:34 Thursday 6th July, 2006
|
|
|
|
|
Perfect, great response.
Thanks
|
|
|
|
|
I'm using System.Diagnostics.Debug.WriteLine to dump info. to the Output window in VS.
I need to implement some system for assigning verbosity level and on/off state per assembly.
Any suggestions how to hook into existing infrastructure? Any notes on existing conventions (eg. should verbosity level 0 mean no filtering, or no output)?
Note: I do want to keep this debug only.
Thanks
NIK
|
|
|
|
|
You can add custom tracelisteners, which allow you to redirect your logging output to any place you like. Perhaps this article[^] will show you what you need to know about that. Once you have created your own tracelistener, you can add in whatever verbosity settings you need.
:josh:
My WPF Blog[^]
|
|
|
|
|
Hi
I am a former java/swing programmer who just started programming C#.NET. When starting to create complex gui-applications I realized that I dont know how to attach a datastructure to a ListBox component.
What I want is to use a external arraylike structure to control the content of a ListBox. When updating this arraylike structur (adding, removing, modifying, etc) the ListBox also should be updated automaticly. I have not figured out how to do this in C#.NET yet, but its really easy in java/swing. There I could just to something like:
Vector<string> structure = new Vector<string>();
JList list = new JList(structure);
and after this all operations on "structure" would also affect the JList content.
Another approach was to create a class that inherited ListModel and override some methods for fetching info about the structure.
Any good advice about how I can achive the same using C#.NET? This is basicly all I miss from java so far.
Thanks so much for the help.
|
|
|
|