when i use tabcontrol,i find that there is no property for the tabpage to visible or unvisible.i want make tabpage1 to visible but tabpage2 to unvisible,but beacause there some progress need controls on tabpage2,so i can remove tabpage2,i just want to make it unvisible.how can i make that?
SolidBrush Brush = new SolidBrush(Color.Black);
Point point1 = new Point(4, 4);
Point point2 = new Point(50, 4);
Point point3 = new Point(4, 4);
Point point4 = new Point(4, 100);
Point point5 = new Point(50, 4);
Point point6 = new Point(50, 100);
Point point7 = new Point(4, 100);
Point point8 = new Point(27, 120);
Point point9 = new Point(50, 100);
Point point10 = new Point(27, 120);
I am using mid form in a windows forms application. Every time I am loading new child windows memory is going up(it’s ok). When I close them memory is not coming down. I am disposing child windows as they close.
Why is this happening ?
What is the solution for this problem ?
What are the best practices for memory management.
If you are using task manager to detect memory usage, what you are seeing is the programs working set and not the atuall memory usage.
You say you are using the Dispose method as you close windows. But do those child windows use any resources that are not automatically disposed?
Contrary to popular belief, .NET's automaticall memory management does not imply immediate 100% resource cleanup. Some resources have to be cleaned up manually to decrease memory footprint at any given time since the garbage collector funtions in a non-deterministic way.
Task manager show the program's working set, not the actual memory consumption at a given time. You can see this bi minimizing and then restoring your application. Task Manager refreshes the value and usually the new value is much less than the original one.
Although it is not a recommended practice, you can try forcing a garbage collection through GC.Collect().
How to Create a new Access database using C#?
i want create a new access database.i don't kown how to write the SQL expression.
and i want to kown is there other way to create a new database not use SQL language.beacause i kown there is ADOX in ado2.5 and it can create database.but i can't find anything can create database in ado.net.
The only other technique I know, and have used before, is to embed a blank database into the assembly and write it out to file using a binary stream whenever a new database is needed. I know, its ugly and bad, but it works. Though if you want to be able to create for different Access versions you'd need to embed each one, which is even more ugly and bad.