|
If I understand you correctly this should solve your problem:
1. Copy non-referenced dll to your project's directory and add it to project using Add -> Existing Item -> browse to dll.
2. When it is added to project, right click in it on Solution Explorer -> Properties and Set Build Action -> Content (ClickOnce problem) && Copty to Output Directory -> Copy Always (autocopy) in Properties Window
3. If you now right click on your project icon in Solution Explorer -> go to project Properties -> Publish -> Application Files, you should see your dll in list with status Include(Auto).
Hope this solves your problem, if not -> give more details and I'll answer .
Cheers!
|
|
|
|
|
I tried your solution, but when debugging, the second dll file (office 2007 dll) is not copied to the Debug folder, only the first one (office 2000 dll) is copied. If I remove the reference to the first dll than the second one is copied. So it seems that only one of the dlls can be in the compiled result. I assume Visual Studio detects an Assembly name or something and this name is the same in both dll files.
I managed to get both dll files in there by adding them both manually and setting build action to "None" and Copy to Output Directory to "Copy Always". The problem is that when debugging, the program crashes with an error that the second dll file could not be found.
I'm out of options at the moment.
Hope you can help me.
|
|
|
|
|
Hello everyone,
I have a Windows Application with all sort of controllers such as ListView, TextBox, Buttons, ComboBox and so on. I undrestand that I should dock the controllers so once the user changes the Window Size the Windows Application doesn't get ugly anf messed up and still useable.
I was wondering if anyone can take a moment and explain if there are any particular order that I should follow since whatever I am doing there is always one or two controller running over another ones.
Thank you very much and have a great weekend.
Khoramdin
|
|
|
|
|
I'm really not sure of your question, this article might help though: Working With Anchoring And Docking
If not, let me know.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Hey
I need to be able from my ASP.Net to add a static a-record for some websites
So how do I do that ?
Examles
Adding
"testside" 10.2.6.244
"sales" 10.2.6.244
"tech" 10.2.6.244
It is for a Windows 2003 DNS, I have have all the security right, and are able to do impersonation if thay should be a problem..
|
|
|
|
|
Research this: DNS WMI Provider.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I have project and store the name of this project forms in a database table,
the start up form will show the other project form in a tree view and store the description of that forms and its names
on mouse double click i want to create instance of a form in the selected node with out knowing the name of that form not hard code
also i dont know how to use the system.reflication
please can any one help me
Hosam Taji
|
|
|
|
|
Can I ask why the duplication ? What if a form name changes within the project, the database will be wrong. Why do you need to use reflection at all, if you know the names of all the forms, to store them in a database table ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
what if i have more that 1000 forms in my project do i have to write code for each form in its name to call it, also my project is multilengual and the user can change the form descritpion and loacation in the tree throw a spechle forms so that why i use the database !!!!
i do all these in other languge like oracle developer and know i am trying to do so in C# windows application to let my team enter the information about the forms in the database and then the startup form will call these forms automatic
Hosam Taji
|
|
|
|
|
hi
is there any free component or class to co convert Html to PDF and support Unicode charrecters
with regards
MHF
|
|
|
|
|
Hi every one
i have a form name sotred in string parameter
i want to create object from that form and show this form
thx
hosam taji
|
|
|
|
|
public Form CreateFormThroughName(string formClassName)
{
switch(formClassName)
{
case "FormA":
return new FormA();
case "FormB":
return new FormB();
}
}
try it!!!!!
|
|
|
|
|
First Thx You For Your Help But This is not exactly what i want
Realy i want something like this not return new formClassName
thx A gain
|
|
|
|
|
Perhaps you need to explain it better?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
do you know the names of all form in advance?
|
|
|
|
|
Yes Thats Exactly What I Want How To Use The Refliction in this case
Hosam Taji
|
|
|
|
|
simply ask thanks if it works
|
|
|
|
|
You could use reflection, or if the collection of names is known, use the approach that was given by someone else. Personally, if I had a known collection, I'd be storing an enum, not strings.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
This The Code
Form frm = new Form();
Assembly LocalApp;
string man = treeView1.SelectedNode.Name;
MessageBox.Show(man);
LocalApp = Assembly.LoadFrom(man);
???
|
|
|
|
|
hosam Taji wrote: Assembly LocalApp;
string man = treeView1.SelectedNode.Name;
MessageBox.Show(man);
LocalApp = Assembly.LoadFrom(man);
I don't know what any of this means ? I mean, what's in the treeview ? Form names, found via reflection ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
This is off the top of my head and doesn't include any error checking.
Assembly asm = System.Reflection.Assembly.LoadFrom ("myAssembly.dll");
Type t = asm.GetType ("MyNamespace.MyForm");
ConstructorInfo constructor = t.GetConstructor (new Type[] {});
MyNamespace.MyForm form = constructor.Invoke (null) as MyNamespace.MyForm; /ravi
|
|
|
|
|
I'm guessing I've done something stupid but...
I'm new to Drawing2D, but I want a simple user control that is basically blank but will display (draw) a line when I click a button on a form.
I have a method DrawLine() in the control to draw the line using this.CreateGrapics() etc.
I have a button, on the form that implements the control, which calls control1.DrawLine().
The line DOES draw...briefly...but then vanishes?
I've tried stepping through, and the control draws the line as expected but then seems to lose it immediately.
I've overridden OnPaint, but not sure what to put in it other than base.OnPaint(e).
Any help very gratefully received.
|
|
|
|
|
BlueChippy wrote: I've overridden OnPaint
Great
BlueChippy wrote: but not sure what to put in it
Basically you need to draw onto the graphics object that's passed in through e.Graphics, instead of calling CreateGraphics ( which is only useful for temporary stuff that you want to disappear the next time you call Invalidate().
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
In OnPaint you should do the actual drawing. Whenever the control needs to be redrawn, the Paint event is used.
If you draw anything outside of the Paint event, it will just be drawn on the screen at the location where the control happens to be. Whenever the control needs to be redrawn it will redraw the screen and wipe out whatever you drew.
Also, in the Paint event you get a graphics object that is clipped to the coordinates that should be redrawn. This ensures that you don't draw outside the area that you are supposed to. If another window is partially covering your control, that is handled by clipping in the graphics object. If you create your own graphics object for the screen it will not be clipped, and you risk drawing over other windows.
---
single minded; short sighted; long gone;
|
|
|
|
|
So, my OnPaint() should call the DrawLine() method?
In which case, how do I get the button on the form to call the OnPaint() of the control? Will control1.Refresh() do it?
Sorry for the stupid questions! lol
|
|
|
|