|
In that case, you're going to have to handle the Resize event of your child form. In that handler, check for the windowstate property, and set it back to Normal if it is Maxmimized.
|
|
|
|
|
That's exactly what I was looking for!
Thank you very much.
Max
|
|
|
|
|
Hi,
I have been investigating y dot net applications are using more memory while startup, it has been suggested to use performance monitor instead of taskmanager.
Can u please let me know how to use performance monitor for knowing the actual memory usage.
Thanks
|
|
|
|
|
You don't need to investigate it. It's been well discussed and documented already.
Read here, http://getdotnetco.web119.discountasp.net/GdncStore/free/Articles/The%20Memory%20Mystery.htm[^] and the other links I gave you last time.
.net memory is not something you need to worry about. Just trust the CLR. Unless you are doing some serious, cutting edge, right on the metal, hardcore processing, the CLR is efficient enough for you.
Rather than measuring things like memory usage, measure things like perceived performance. If your app starts up quick enough, and responds to user clicks fast enough, why do you care about how much memory it is using. Just let the CLR handle itself.
Instead, learn how to write efficient and optimal code within the CLR environment. Learn about the dispose pattern, learn how to manage your resources and learn about the pros/cons of the different data types, structs and class, and the passing semantics (by ref/by value etc)
Simon
|
|
|
|
|
Hi all,
This is senthil. I got a project(with codes and design) from my client to upgrade.
The project is mainly developed in vb.net (from the design pages i got this information).
In the project code-behind files are separated files.
But the project is not having these code-behind files. And the pages is also running without any failure in the server (with absence of these code-behind files). For upgrade purpose i opened the pages through vb.net IDE, But the code-behind files are not founded.
How this is possible.
Is anything i need to know.
I need these help urgently....
Note* - I didnt convert/migrate the project.
And the developed .Net IDE is VS 2005.
Thanks in advance
Senthil.S
A Software Engineer
|
|
|
|
|
Simply the folder you have is a pre-compiled published version of the application where there is no codebehind files exist and everything is converted to dlls !
Sincerely Samer Abu Rabie
Imagination is more important than knowledge !
|
|
|
|
|
I'm making a login page with ASP.NET with C#.
and I know that it needs to use Session for saving information of loggined user.
so I used Session like this on "login.aspx.cs" with Login View Control.
[login.aspx.cs]
// Database query.
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Join"].ConnectionString);
SqlCommand cmd = new SqlCommand("SELECT * From User WHERE id = @ID", con);
cmd.Parameters.AddWithValue("@ID", ((TextBox)LoginView1.FindControl("TextBox1")).Text);
string name = rd["name"].ToString();
string pw = rd["password"].ToString();
string pw1 = ((TextBox)LoginView1.FindControl("TextBox2")).Text;
string id = rd["id"].ToString();
// Save to Session variables. There are a lot of components about Session. Keys, Item, Add,
//and so on..
Session["memberid"] = id;
Session["membername"] = name;
if ((string.Equals(pw, pw1)) == true)
{
FormsAuthentication.RedirectFromLoginPage(name, false);
}
....
And I made codes like this whether lggined user is same with Writer on board or not.
[Board.aspx]
public static bool IsWriter(string pdsId, string Writer)
{
string sql = "Select id From t_Pds Where boardId = @boardId And writer = @writer";
SqlCommand cmd = new SqlCommand(sql, DbConn.GetConn());
cmd.Parameters.AddWithValue("@boardId", pdsId);
cmd.Parameters.AddWithValue("@writer", Writer);
cmd.Connection.Open();
string result = (string)cmd.ExecuteScalar(); // result = ID of writer value.
cmd.Connection.Close();
// I can't use Session. When I use "Session", there are no components of Session.
// There are only two values of Session. ( SessionPageStatePersister , SessionParameter)
if (Session["memberid"] == result) //ERROR.
{
return true;
}
else
return false;
}
}
How can I use Session for saving information of User and how can I compare with Writer on Board?? Is there sample code??
|
|
|
|
|
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I log messages in my application in XML format.
<Logs>
<Log>
<Message>Please Help!!!</Messages>
</Log>
<Logs>
I want to delete the last 4 charcaters I wrote before writting a new message every time I log a message.
How can this be done.
|
|
|
|
|
Hi to all,
I have created a windows service which contains Timer control.The Service is being created and running well.I want to debug the code line by line of the service due to some malfunctioning.can any body help me regarding this.Can anybody tell how to debug the code.Hope that there will be someone to help me.
Thanks Before answering,
S G
|
|
|
|
|
Build the application for debugging.
Make sure the deployed location of the service application .EXE has the application's
debug info file (.PDB) there too.
In Visual Studio, go to the Debug menu and choose "Attach to Process...".
Adjust the settings in the dialog as necessary and find your running service process
in the list of processes. Then click the Attach button.
If you do this with the service application project loaded in VS, you can open source files
and set breakpoints, or whatever other usual debugging stuff you want to do.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark,
I tried this option, but faced some difficulties with no result.
a)Once when i attach that process to my IDE with being set break points at some
places,I see something getting debugged(running) in the application,but no stop
at that break points.
Can u please tell me in detail,how to debug,it will be good enough(PLEASE).
I am using VS 2005.
Thank u For replying,
S G
|
|
|
|
|
S G 1986 wrote: Can u please tell me in detail,how to debug
I'm not sure what else I can tell you. Those are the steps.
Did you put breakpoints on code that has already run when
the service started?
Once you've attached the debugger to the process, go to the service
control manager plugin and stop the service. Does the app stop in the
debugger? If not then you haven't attached to the right process.
If it does stop the debugger then we can narrow down the problem...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
In several articles I've read while trying to resolve a problem with a Starter Kit, I've been advised to use the .Net Configuration applet in Control Panel. In Control Panel there is exactly one Configuration applet - .Net 1.1 - and it's not compatible with higher versions. Add/Remove Programs shows that I have .Net 1.1, 2.0 SP2, 3.0 SPx (I forgot), and 3.5 SP1 installed. All apparently are supposed to have Configuration applets in Control Panel, but none exist. I've also been advised at TechNet and MSDN to run caspol and a couple other tools that are part of the .Net tools, but none of these exist on my machine.
Since the project I'm working on is .Net 2.0-based, that's the one I'm focusing on right now, though I'd like to fix the others, too. I've tried to reinstall .Net 2.0 - failed, because the app is already installed. I've tried to Repair the existing installation from the original .msi file - failed, 'please run Setup.' I tried uninstalling it, so I could reinstall the package, but that failed, too, because other programs depend on this package. So, I can't repair it, I can't reinstall it, and I can't remove it, and it doesn't work. I'm stumped.
Now what?
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Hi.
I'm working on some code to extract colors from an Image. I have this part done (http://test.roob.dk/dk/tests/colors.aspx[^]) Is there any way, to group colors into known colors / nuance (ex. red, orange, brown, blue)?
I would like to be able to find images with eg. red colors. At the moment, I'm converting colors into nearest web color. This will give me 256 unique colors. I can do this by finding images based on numeric R, G and B values + fill percent rate, which is not 100% reliable.
Thanks in advance
Carsten Petersen, Denmark
|
|
|
|
|
hello
i have acrystal report
in section1 and section 4 i have textbox
i want from the application by acode in run time to write in it atext
thats that to change textbox1.tex in run time
the report is connect to dataset but not to database
your help please
|
|
|
|
|
hello there,
iam a bit new to programming
i need to aquire the user names that are on my network from the server files...how can i do that !
i have been reading alot and came up to DirectorySearcher and other stuff but iam really confused and cant understand a thing
can someone explain a bit ?
|
|
|
|
|
Look at my Thread up above [^]
It has sample data of how to pull data from Active Directory.
If you have any questions let me know and I will try to answer.
|
|
|
|
|
Hi ,
Need some clarifications on the memory usage in dot net.
I did a small application with only button controls in th ewindow using WPF. It took around 80 MB when seen in task manager, but the similar application in MFC takes much lower memory.
Can anyone explain what is making the .Net WPF application to take this amount of memory usage.
Thanks
|
|
|
|
|
MFC does buttons without any decoration. Those are the old buttons that don't require much processor-power when drawing. You can use the same WinAPI's from .NET if you want those buttons.
MFC was built when the buttons were gray, simple and dull. WPF is a different kind of beast, and it needs to load a decent drawing-library to support all the modern kind of buttons. A WPF-button can have all kinds of effects that the old buttons didn't have. Thus, the newer ones look better, but that comes at a price
I are troll
|
|
|
|
|
I have been digging in my bookmarks, found this post[^] from "The Old New Thing".
It doesn't go all the way up to the WPF button, but it gives a nice impression of the complexity involved.
Sidenote; not everyone needs the graphical power that the WPF provides. You might want to read this article[^] to decide what the best option would be
I are troll
|
|
|
|
|
.net works very differently to traditional compiled applications, and you have to remember that and don't carry forward assumptions you have from working with MFC to your .net work.
When a .net app runs it loads up the CLR, parts of the framework and a lot of background stuff. This stuff is used within your apps process to provide all the .net managed services. What you have to remember is that much of this stuff is actually only loaded once for the system, no matter how many .net apps you have running, but task manager still includes this stuff in the working set for each app so it effectively duplicates the number of times it is reported.
The other thing you have to remember is that because .net is a managed language it's memory is treated very differently. the CLR reserves blocks of memory for your .net app even if you aren't using them (This is to provide various efficiency improvements when you do start using memory). Also, the CLR garbage collector will generally only run if there is pressure on the OS to get more available memory, this means that you are saving CPU cycles by not running the GC unnecessarily, so often it will look like your app is using a lot of memory, when in reality most of that memory is unused and ready for collection but just hasn't actually been collected yet. When the OS does require more memory, the GC will run and gather up anything unused by your app.
There's an article here that talks about some of these points (it's quite old and based on .net 1.1 I think but it's points are still relevant):
http://www.itwriting.com/dotnetmem.php[^]
You can also read more about the GC here:
http://msdn.microsoft.com/en-us/library/0xy59wtx.aspx[^]
Simon
|
|
|
|
|
Hi friends,
Please help me how to connect SQL Server 2000 and ASP.NET Website Administration Tool.
Problem is :
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Unable to connect to SQL Server database.
Venkata Narasa Reddy Kunam
v.narasa@gmail.com
9949948355
|
|
|
|
|
Please Check you connection string which you are using to connect with you database.In connection string you must specify database user ID and password.
|
|
|
|
|
Hello:
I have a WebBrowser control in a .NET Form. I am loading HTML code into WebBrowser.DocumentText from an external source on a local intranet system. The HTML mimics code that appears elsewhere on the intranet, and includes links to images. (The HTML is located in a database and sometimes is not *complete* HTML code. Loading the code from a live site is not an option.)
My issue is that some of these images are on parts of the intranet that require NTLN authentication. IE will handle these pages just fine--however, when I try to load them from inside the WebBrowser control, the authentication ("Connect To") form opens up asking for username and password. If the enduser puts in their username and password, the images load--otherwise, they do not.
My question: Is there any way I can utilize or extend WebBrowser (or any other Windows Browser library) so that the authentication form does NOT appear, and the images load form their source, as they would in IE? I could just parse the code to have the images removed altogether, but that would take away from the overall intent of the project.
Thanks in advance.
|
|
|
|