|
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.
|
|
|
|
|
Data binding in .NET is implemented as a set of properties on the control that you set: DataSource, DataMember, and DisplayMember. If your list/collection type supports two-way notifications (namely, it implements the IBindingList interface) then changes made to the data source will be reflected in the GUI automatically. Search CP or MSDN for examples of how to use data binding.
:josh:
My WPF Blog[^]
|
|
|
|
|
Thanks for the start.
I have tried making a ListBox, a List (System.Collections.Generic) and do:
listBox1.DataSource = listdata;
where listdata is that generic List. The listBox show the listdata content, but when updating the listdata (listdata.Add("something")) it wont update in the ListBox. I am really sorry for the newbie questions. I find alot of guides on databinding when dealing with databases, but for a simple List its little or nothing.
|
|
|
|
|
List<t> does not implement IBindingList, so programmatic modifications to the list won't propogate to the control. Use ObservableCollection<t> if you need that functionality.
Josh
:josh:
My WPF Blog[^]
|
|
|
|
|
Hi
I used a BindingList and got everything to work. I am having a hard time seeing what collection-classes I should use for different tasks, but I probably will use List for everything non-gui related and BindingList for gui stuff unless you have something to say on that :p
Thanks so much for the help!
|
|
|
|
|
Hi ,
I hv a application(exe),i am running it simultanesouly 2 or more times..when many instance of an application is in open state, i want to different name for different instance in task manager...
|
|
|
|
|
The name you see in Task Manager is the .EXE filename. No, you can't change it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Like Mr. Kreskowiak said, the .exe filename cannot be changed in the task manager.
|
|
|
|
|
Hi friends,
first sorry about my english
My problem is to get the full quallified CodeTypeDeclaration of an Component to add some new methods, enums and comments.
In Framework 1.1 i do this witch the RootDesignerSerializer an it works fine. Now in Framework 2.0 Microsoft sets the RootDesignerSerializer to obsolete an puts the TypeCodeDomSerializer instead.
Here is my new implementation :
My base component :
[DesignerSerializer("MyTypeSerializer, MyAssembly, Version=2.0.0.8, Culture=neutral" , typeof(TypeCodeDomSerializer))]
public class MyComponent:Component
{
private void InitializeComponent() {}
}
My serializer :
class MyTypeSerializer: TypeCodeDomSerializer
{
public override object Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
{
IComponent cmp = null;
cmp = base.Deserialize(manager, declaration) as IComponent ;
return cmp;
}
My custom Component :
public partial class MyComponent1 : MyComponent
{
....
private void InitializeComponent(){...}
}
Now if i get to deserialize MyComponent1 an error occurs like this ......
The method MyComponent.InitializeComponent could not found.
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
Did anyone knows how to De- / serialize an Component with the TypeCodeDomSerializer so i can modify the this Type.
Note that am allready at deserializing MyComponent1, but in this case i dont wanna make changes to the object returned from base.Deserialize(manager, declaration). I will modify the CodeTypeDeclaration after base.Serialize(manager, root, members).
So i hope anyone can help ....
Thx Kai
(I know about my bad english ... sry, again)
|
|
|
|