VS 2008 - Normal Versus MDI Form (Memory Consumption)

Mar 11, 2010

I did a project (College Management) in vb.net 2008 which contains 13 forms in it. I designed the different functions in a different normal form, i.e. frmAdmission, frmSearch etc. When the project run's the main form is loaded. When user chooses a particular function say 'frmSearch' then the main form is unloaded and the form frmSearch is loaded. Now my lecturer told me to use MDI forms instead of normal forms because, normal forms takes larger memory than the MDI forms.

View 5 Replies


ADVERTISEMENT

.NET WinForm Memory Consumption?

Apr 19, 2011

I've been profiling a WinForm's application using ".NET Memory Profiler".I can't quite seem to understand how my application is growing to 1GB, then 2GB, then 3GB of usage - according to windows task manager.

The private bytes using that tool, and "Total Bytes in All Heaps" shows only as 70MB or so. At the top of my list of instances hanging around, they are mostly String, or WeakReferences to lots of little objects.

All the application is doing is showing a form that loads data from a database. I repeat the show/dispose cycle of the form about 100 times and the growth is continuous.I've tried about 3 memory profiling tools now and none of them are showing me where this enormous amount of memory consumption is coming from.

View 3 Replies

What Is The Effective Way To Reduce The Memory Consumption

Apr 5, 2011

I found what seems to be an easy and effective way to reduce the memory consumption of my vb.net app. What I need to know is how "correct" or "proper" is the method I'm using for my application and what exactly is going on behind the scenes that I should worry about? I want to release memory every time a form closes. Here is how I reduce the required memory of my program:[code...]

View 7 Replies

For Each Loop Enumerator Expression And Memory Consumption

Aug 15, 2011

According to the language specification guide for VB.NET Section 10.9.3. The enumerator expression in a for each loop is copied over into memory. If I have a list of 10000 objects that list will be in memory twice for the code below?
dim myList as new list(of bobs)
'put 10000 bobs in my list
for each x In myList
'do something
next

If I were generating the list from a linqQuery or some other such query it would make sense to generate that list at the for each loop statement thus not having the list in memory twice for example.
for each x in myList.where(function(x) x.name = Y)
'do something
next

If the LINQ query is unreadable on the for each loop, do I forgo readability and just put it on the for each loop declaration line? Should I declare the list in its own variable and just bite the bullet and have the list exist twice in memory?

View 1 Replies

Measuring Memory Consumption Of A Function That Accesses A Database?

Sep 16, 2011

I have a VB Function (in Visual Studio 2008 with .NET 3.5) that opens up a connection to an Oracle database and queries the database for information. Apparently after some trial and error, I discovered when the SQL statement is being processed and filling the dataset, it apparently is taking up too much memory trying to complete the task. I'm running into System.OutofMemory exceptions and other unpleasantness.I'm wondering, is there some sort of program out there to measure memory consumption of your SQL code that is being processed in a Visual Studio application?

View 1 Replies

Measuring Memory Consumption Of Function That Accesses Database

Aug 25, 2009

I have a VB Function (in Visual Studio 2008 with .NET 3.5) that opens up a connection to an Oracle database and queries the database for information. Apparently after some trial and error, I discovered when the SQL statement is being processed and filling the dataset, it apparently is taking up too much memory trying to complete the task.I'm running into System.OutofMemory exceptions and other unpleasantness.I'm wondering, is there some sort of program out there to measure memory consumption of your SQL code that is being processed in a Visual Studio application?

View 2 Replies

Purpose Of GET SET Property Versus Just Declaring It As Normal?

May 23, 2012

I have been wondering for a while what the difference is between the following two:

Public Property ProgressMaxValue() As Integer
Get
Return maxval
End Get

[code]....

View 2 Replies

VS 2010 HTTPListener Of Large Memory Stream Versus File I/o?

Sep 28, 2010

I have a user interface app that allows you to drag/drop in files - and it turns them into HttpListener request POST's to another EXECUTABLE that I have running - let's call it BACKEND1.BACKEND1 will be running on a SERVER when this gets ready for production use.Lots and lots of users running the UI - all dragging in files - all getting POST'ed to BACKEND1 - with the file included as a memory stream in the POST. BACKEND1 responds to the UI with a "sequential" file number assigned to the file centrally on the server.

On the SERVER is also running another EXECUTABLE - let's call it BACKEND2. It's job is to work with the DRAG'd in files.Both BACKEND1 and BACKEND2 sit on the same SERVER. At the moment I am writing the memory stream to DISK in BACKEND1 - and POSTing the FILENAME to BACKEND2 for it to work on.Would it be better to not write the file in BACKEND1 but instead include it in the POST to BACKEND2 - where it can be written to DISK?

Is having LARGE HTTP REQUEST's a burden when sent between two EXECUTABLES on the same machine?My primary goal is to have a really available BACKEND1 talking the the UI instances running out in the world. I'm concerned that doing the file i/o in BACKEND1 is "expensive" - and I don't care about the performance of BACKEND2 as much.

View 2 Replies

Minimize A Form And Restore To Normal The Form Is Being Resize?

Jun 10, 2009

when i try to minimize a form and restore to normal the form is being resize.It's resize getting extending a form when time to minimizing a form and restore it.my form is set to formborderstyle is fixedsingle and i'm using namespace. why is hapening like that...i don't know why

View 10 Replies

VS 2008 How To Unload The 'form' From Memory

Jan 21, 2010

I have many forms in my project. When the project starts to run, the form named as˜frmMawill be loaded. I had given links to load other forms from this form. When other form gets loaded I want to close this main form. To do so I used the following

View 3 Replies

How To Convert It To Normal Form

Sep 14, 2009

I get a number of something like 4.44444444444444E+24. How do I do to convert it to it normal form as 4444444444444444444444444. (I have to compare these to return true value if it's equal )

View 1 Replies

Making A Normal Form As MDI

Jul 29, 2011

I am working on a application in which I have to show different forms stacked one upon the other. Due to some restrictions, I cannot use MDI and also it has a lot of issues. I am able to get what I want but with a problem. The forms will be stacked, but they do not remain in the parent form. Lets take it by an example. The structure goes like this.

1) There is a form A (My parent form)
2) a second form "B" opens on a button click event on Form "A". (Note: B.ShowInTaskBar=False)
3) again, a third form "C" opens on a button click event on Form "B". (Note: C.ShowInTaskBar=False)

Now, when I minimize form A, it gets minimized but the Form B and C, remains as it is. I want them to get minimized at the same time. I want form B and C should remain as a child form of form A.

View 1 Replies

[2005] Today.date Versus Now Versus DateTime.Now?

Jan 16, 2009

just want to know what is the difference between these date values?Once some one told me that its difference is server date and client date but not sure which one he meant.Below is 3 type of date currently I'm using and don't know what is the difference between them.

DateTime.Now is from System.DateTime.Now
Now is from Microsoft.VisualBasic.DateAndTime
Today.date is also from System.DateTime

View 4 Replies

Load Form With Lower Opacity To Normal?

Jul 29, 2009

when i run form his opacity 0% to 100% autometic change...

View 6 Replies

Resizing In Mdi Form At Runtime In Normal Mode?

Oct 20, 2010

When I compile my solution and execute the program and set the form in window normal, it behaves strangely. The grip is apparent, the mouse changes to the appropriate icon, but I cannot change the size of the window.

View 2 Replies

Show Normal Form Over AxWebBrowser In Program?

Sep 16, 2011

How to show Normal form over the AxWebBrowser In Vb.Net.

View 2 Replies

2008 Express Edition: Attempted To Read Or Write Protected Memory, This Is Often An Indication That Other Memory Is Corrupt?

May 27, 2009

I cannot use Visual Basic 2008 at all. When I go to "new project" and choose "Windows Form Application" I get this error.I have tried multiple uninstall/reinstall with no result.A microsoft reply to this suggested that I needed: " .NET Framework 2.0 Service Pack 1 " I checked, and I did not have the .netframework 2.0 service Pack 1.
When I tried to download and install the above from Microsoft.com, the istaller said that "it was not allowsed" and I was not able to install the service pack 1.

I tried Uninstalling net framework 3.5, 3.0, 2.0 and then reinstalling .netframework 2.0 sevice pack 1; then reinstalling Visual basic 2008 express edition. At the reinstall of Visual basic 2008, .netframework 2.0 sevice pack 1 is unistalled by .net framework service pack 2.When I check the foruims for simiar problems, the formus are mostly for Visual basic 5.0, or other programs that I do not have.

Here is the programs I have installed:

Operating system: Windows XP
Microsoft .net framework 1.1
Microsoft .NET framwork 1.1 Hotfix(KB928366)
Microsoft .Net Framework 2.0 Service Pack 2

[code]....

All the security updates and hotfixes for Widows XP.

View 4 Replies

Building A Web Browser Using The WebBrowser Control In A Normal Vb Form?

Feb 4, 2009

I'm building a web browser using the WebBrowser control in a normal vb form. I would like to add an option where the user can view the source code for the page like in internet explorer.

View 1 Replies

Form-printing Class Error - "Protected Memory Was Tried To Be Read Or Written. This Often Indicates That The Other Memory Is Damaged"?

Aug 3, 2010

I have a new problem with this same Form Printing project and I get exactly the same exception but from the different point of code:

line 538: d.PrintFunction(c, typePrint, mp, x, y, extendedHeight, ScanForChildControls)

The exception type is System.AccessViolationException and it says (after I translate it from my own language in which the message is given in my pc, into English):"Protected memory was tried to be read or written. This often indicates that the other memory is damaged"

View 1 Replies

Console Versus Blank Form Project?

Jan 21, 2011

Regarding a console application and VB forum program - In searching XML parsing examples I find several using Console.Write and Console.Write - To show my inexperience I (out of habit going through a couple preliminary examples) I created a new VB project with a blank form - I then copied and pasted the XML example using the console commands Errors - I just found the "create console application"What is the difference between a console application and the project using a blank form? Can the console commands like Console.Write work with a VB form project?If so (#2)What is the advantage in creating a console application - why not just start with a blank form and go?

View 1 Replies

VS 2008 Listview Acting Not Normal

Nov 29, 2010

I'm trying to add items to the listview, but ever time i add a icon the Listview freezeslinks a white color for a millisecond.A millisecond is not a lot, but when you add 5 items per second to the listview then all you see is a white shade blinking. I tried slowing the thread down so it takes longer for it add the items still no luck.

View 5 Replies

[VB 2008] Can't Use { } As A Normal Text In String.Format()

Mar 12, 2010

Is there any possibility to make this true?I mean we can't use { } as a normal text in String.Format()

View 4 Replies

Monitor The Power Consumption?

Sep 18, 2009

I am looking to record information about the computers power consumption over time, is there any way I could do this using vb, I can get the current voltage from the processor but do not know the current therefore can not work out the wattage. I know of application which do have power consumption recorders but I would like to create my own.

View 1 Replies

[2008] WPF Versus GDI?

Jan 12, 2009

I have thought of a new project to keep me busy for a while, and it involves a more advanced GUI, specifically I want to display a map and put objects on it or highlight certain areas for example. I've been searching the forum for a little while and ran into two options for more advanced GUI building: WPF and GDI.

View 2 Replies

IDE :: VB 2008 Versus 2005?

Sep 1, 2009

I have a book from a friend called "Teach Yourself Visual Basic in 21 Days" and so far what I have read has been very nice and easy to look at as well as understand. It also seems like it will do what it says it will do. One problem is it was published in 2006 so it uses VB Studios 2005. There is a rather large difference between 2005 and the new 2008 Express edition and I see the new 2010 beta so I wondered: "light from above, is it worth looking for the 2005 edition of Visual Basic Studios Express Edition or should I rather just look for another book and start working with this 2008 edition? I really fancy this book on the 2005 edition but seeing as it doesn't even have the XP window styles in the figures it might be a little outdated and this new 2010 edition might blow away 2008! I am so confused. Should I throw out the old and go with the new, or should I work with 2008 until IT'S time is up? Is it worth it in this new economy and fast paced evolving career opportunity?" Well, I didn't get a response form the great Computer Techie in The Sky, so I am asking you... What should I do? I understand that it might be better to learn with this new 2008 edition but even still I would imagine their are some 2005 based programs out there people use that might need updating. As a beginning programmer I don't know where to go.

View 3 Replies

Event Consumption For Concurrency In A Multicore Application?

Jan 18, 2010

Target machine 4 core AMD I have an event that is raised my the main thread of the application. The event is consumed by several different classes in the application. I want them all to run concurrently up to the max cores available and then que the rest in order.The work routine in each class is relatively small but concurrency is the goal.Considering this.

A. Create a background worker on each classes initialization and have the event handler start the worker.

B. Create a delegate to the do-work sub that is called by the event handler

A- Pros - worker is only created once and reusable so only pay creation cost once.

A-Cons could create a ton of workers that consume resources eventually.

B- Pros Smaller thread pool

B- Cons Lot of overhead

View 2 Replies

CHM File In VS 2008 Versus VS 2010?

Jul 16, 2009

I had a .chm file I used in VB2008 and I'm having trouble getting it to work for VB2010. I use the code below to reference the file.

vb
Module HTMPHelpAPI Public Const HH_DISPLAY_TOPIC As Short = &H0 Public Const HH_DISPLAY_TOC As Short = &H1 Public Const HH_DISPLAY_INDEX As Short = &H2 Public Const HH_DISPLAY_SEARCH As Short = &H3 Public Const HH_HELP_CONTEXT As Short = &HF Declare Function HTMLHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hwnd As IntPtr, ByVal lpHelpFile As String, ByVal uCommand As Int32, ByVal dwData As Int32) As Int32End Module

I then call it from my menu using this:

vb
Private Sub HelpToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HelpToolStripMenuItem1.Click HTMLHelp(IntPtr.Zero, "PE Files Help.chm", HH_DISPLAY_TOC, 0) 'Dim sHelpFile As String 'Dim sStartupPath As String 'sStartupPath = Application.StartupPath.ToString 'sHelpFile = Replace(sStartupPath, "in", "hlp") & "PE Files Help.chm" 'Me.hlpHtmlLocal.HelpNamespace = sHelpFile End Sub

I had found the commented out portion online and tried to get it to work, but nothing will bring up the file. Do I need to have it loaded into VB.Net somehow or point to it or does it need to be in a certain location?

View 1 Replies

VS 2008 .net2.0 StringDictionary Versus Control.Tag?

Jul 21, 2009

I am having trouble. My string dictionary saves a controls.tag value then saves another value to that key(controls.tag)for example I store to my string dictionary like this:

vb.net
StringDictionary.Add(txtSAP_Phasing.Tag, "YES")

How can I match the values even if they are not the same case.my problem is im trying to match each controls.tag with the proper key in the dictionary.But the dictionary saves the string of the txtSAP_Phasing.Tag value as all lowercased, and the Tag value is actually all uppercase... and this is causing my IF THEN statement to not trigger when I try compare the two strings.

View 5 Replies

ToolStrip On A Databound Form - Toolstrip Buttons Don't Receive Focus In The Normal Way ?

Mar 24, 2009

I really want to make use of the toolstrip and databinding but these two technologies keep conflicting with each other. I think the root cause is something to with the fact that the toolstrip buttons don't recieve focus in the normal way.

I invite you to try the following:-

1. Create a form and put some text boxes a tool strip with a save button on it.

2. Write a query or sproc to get a datatable back and bind your text boxes to the field in the datatable.

3. In the code behind your Save ToolStripButton put some code that makes an arbitrary change to a field on the dataset (it doesn't matter whther this field is bound to a text box or not). eg:-
m_DataTable.Rows(0).Item("CommissionRatePerc") = "0.0000"

4. Put a breakpoint in the save and run the form.

5. Make some changes in the text boxes. Do not leave the last text box but rather click save while a text box whose contents you have edited still has focus.

6. When your code hits the breakpoint, query the value of the data table field that is bound to the text box you were editing when you clicked save - it will still contain the unedited value. Unless you do something about it that unedited value is going to get saved back to your DB.

We did get around this problem by explicetely setting the focus to another control on the form before saving. That worked most of the time because it prompts the text box to flush it's value back to the datatable (nb EndEdit does not work, although you'd have expected it to). However, and this is the reason I suggested you add a line of code that changed a value in the underlying datatable in step 3, if you change a value in code in this way before the value from the text box get's flushed back then it doesn't seem to matter what you do, the user's current edit is simply lost. They will still show in the text box, though, leading your user to believe that the change has been committed when it hasn't. Our final solution is that we never ever change a value in the adtaset in the code behind our toolstrip buttons. That's working but it's a pretty big restriction.

View 15 Replies

VS 2008 - Default Date Versus Null Field

Aug 26, 2011

I have the following
If Trim(txtConfirmationDate.Text) <> "" Then
sqlinsert2.Parameters.AddWithValue("@CONFIRMDATE", CDate(txtConfirmationDate.Text))
Else
sqlinsert2.Parameters.AddWithValue("@CONFIRMDATE", VB.vbNull)
End If
Unfortunately, it writes "01/01/1900" to the database. How do I get it to just leave the field as NULL?

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved