|
I have a C# console application that makes a reference to a managed c++ dll. This managed c++ dll is in the same solution. I have added the reference by clicking add reference, clicking on the project tab and selecting the managed c++ dll project. When I build this application it is ok, but when the console is loading, I get a System.IO.FileNotFoundException, cannot find the {the name of the managed c++ dll} or one of its dependencies. I am clueless, since the managed c++ dll has also been copied to the same directory as the console application .exe, which is bin/Debug.
|
|
|
|
|
|
Yes, it was because one of the lib files in the additional dependencies of the C++ project was not in the target directory of the C# pj. Thanks
|
|
|
|
|
hiii every bodyyy i am so depressed
i notice that my application memory usage increase as i use it
but thet memoryy decrease when i minimize the app and maxmize it again
what is the secret i want my app memory to be released without needing to minimze it and maxmize it again
tafatifo
|
|
|
|
|
It's not a problem. What your seeing is the Garbage Collector finally getting around to collecting and freeing objects and releasing memory. It's pretty lazy about it, so have some patience.
The GC will jump in and do a collection if it needs to, like if memory starts running low or you or another outside app allocates an object that is large enough to cause a collection to free up memory needed for the new object.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Check your OnPaint event, when you minimize your application, the event handler for that event would never be called, however when you maximize it, the eventhandler would be called consistently. Check to see if you're doing anything in the function that handles that event that uses up a lot of memory. If that's not the case let me know.
|
|
|
|
|
thank you
but this is not the problem as when my form get maximize again after a minimization the memory usage still small
my application consist of a main form that has main menu
each menu item open a new form
every time i close that form and reopen it from the menu item the memory usage increase
i tried to use dispose but the memory doesn't return to it's initial state
open the child form too more times make the memory usage very very big
NOTE:- i have images on my form for the controls
but i think after closing that child form the application memory usage should return to it's initial state
|
|
|
|
|
Hi,
I have a readonly textBox on my windows form, when the user clicks on the textBox I display a monthCalendar control, then in the DateSelected event I populate the textBox with the selected date. My only problem is that the user might decide that the date is not necessary and want to remove it from the textBox. I have tried looking at the hitTest method of the calendarControl but the hitTestArea is always returned as nowhere.
Does anyone have any idea of how I might be able to remove the date from the textBox??
Thanks in advance.
Gavin Jeffrey
|
|
|
|
|
This is really just a UI design issue, you could simply add a small button with a Text property of "Clear" which would then clear the value from the TextBox .
- Nick Parker My Blog | My Articles
|
|
|
|
|
How about a Button "Clear Date" or something similar besides your TextBox whose Click event handler simply clears the Text property of your TextBox .?
www.troschuetz.de
|
|
|
|
|
We apparently posted at the same time, however I must have beaten you by mere seconds.
- Nick Parker My Blog | My Articles
|
|
|
|
|
|
Thanks guys,
Well this seems to be my only option - I was hoping to find a "cleaner" solution since my form is already so cluttered. I have searched endlessly but i can't seem to find any other way besides a button. Looks like i will have to go with the button. Thank for the help.
Gavin
|
|
|
|
|
Another option that comes to mind is using a ContextMenu. For example this could be displayed after right-clicking your TextBox and contain the MenuItem "Clear Date". After clicking the MenuItem the TextBox is cleared.
Never you really worked with ContextMenus so I can give no further help. But I think it's worth a try and shouldn't be that complicated
www.troschuetz.de
|
|
|
|
|
Does anyone know if you can turn off the automatic vertical and horizontal scrollbars on a DataGrid? There seems to be no AutoScroll property.
Thanks!
Mark
|
|
|
|
|
Try something like the following:
[DllImport("user32.dll")]
static extern bool EnableScrollBar(IntPtr hWnd, int wSBflags, int wArrows);
private const int SB_BOTH = 3;
private const int ESB_DISABLE_BOTH = 0x3;
EnableScrollBar(dataGrid.Handle, SB_BOTH, ESB_DISABLE_BOTH);
- Nick Parker My Blog | My Articles
|
|
|
|
|
I am looking to use COM+ transactions in my C#/VB back office application.
I have a form that collects client company details, address, contacts (the usual)
I have create components that allow me to add each of the above to the database in its own transaction, but I want them all to participate in the same transaction. The com+ components will be hosted on a remote server.
From my c#\vb form how do i get these to participate in the same transaction, any help would be appreciated.
|
|
|
|
|
Hi all,
did anybody experience problems after installing .NET 1.1 SP1?
First thing I noticed is that the text of goupboxes that are in an other groupbox is messed up(seems like the wrong font), when using visual styles.
The other thing is that I now get weird exceptions from the Windows.forms stuff, e.g.
Error creating window handle. at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
or
Object reference not set to an instance of an object. at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
or
Object reference not set to an instance of an object. at System.Windows.Forms.WndProc.Invoke(IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
Does anybody have similar problems?
This ServicePack really sucks!!!
Best Regards
-------------------------------------------
The light at the end of the tunnel has been switched off temporarily due to budget problems...
|
|
|
|
|
I haven't had any problems with it.
You didn't mention when you installed it, so forgive me for the is-it-plugged-in level question, but have you restarted your computer? Installing the service pack and running a .NET app without restarting first can cause all sorts of obscure exceptions in the framework.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Haven't had any problems like your having. Actually, I haven't had any problems at all! It's actually fixed a couple of problems that I ran into with the Garbage Collector and VERY large object allocation.
Are you overriding WndProc in your app? What are you doing in your override?
What are you doing in the Load event of your Form? Also, are you checking to see if your controls actually have handles before doing anything with the handles?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
These problems occur on different computers. But they only appear if you install the .NET ServicePack.
For e.g. the "Error creating window handle" message occurs sometimes when my form calls the ShowDialog method.
But why should there be a problem now. It works fine if the ServicePack is not installed!
Well, ProjectManagement decided that our Software won't officially support the .NET Service Pack...
Best Regards
-------------------------------------------
The light at the end of the tunnel has been switched off temporarily due to budget problems...
|
|
|
|
|
i want to make a panel slide like the .net toolbars? can ne 1 give me some great looking code;) thanks?
|
|
|
|
|
i've implemented this by using Timers
Basically, the idea is something like this:
- Event is fired (Button click lets say)
- Start Timer
- On timer tick, resize/move control
- Once control reaches appropriate size stop timer
You can tweak the speed of your timer intervals to get a decent animation going.
I am sure there is a better way to do this using DirectX.
Jon G
www.Gizmocoder.com
|
|
|
|
|
Hi there, i have a trie to invoke a method via reflection from Events.dll (the method that tries to create an instant of the class containing the method also resides in Events.dll)
invoking method is :
private void execute(string actionname,string[] parameters){
Assembly a = Assembly.LoadFrom("Events.dll");
Type[] ts = a.GetTypes();
Type t=a.GetType("IOW.NET.Events.StartProgram");
MethodInfo runmethod = t.GetMethod("run");
object obj=Activator.CreateInstance(t);
runmethod.Invoke(obj,parameters);
}
Class StartProgram looks like this:
namespace IOW.NET.Events
{
public class StartProgram: Event
{
public StartProgram(){}
public void run(object[] parameters)
{
//do something
}
}
}
My Programs interrupts working when i call
runmethod.Invoke(obj,parameters);
any ideas where the error is? i just can´t find it.
Events.dll is in the right directory, otherwise it would give me an error when i load the assembly from file.
i can also read all types from the Assembly-object without problems.
thanks for any hints
best regards
jkersch
|
|
|
|
|
jkersch wrote:
any ideas where the error is? i just can´t find it.
I would suggest you put a check for null values along the way. Also, in particular, there is a overloaded method for creating a MethodInfo object that allows you to specify the BindingFlags via a bit mask, that could be your problem.
- Nick Parker My Blog | My Articles
|
|
|
|