Memory leak in windows web browser using VB - vb.net

I have built a basic web browser using vb, say like IE6, where I don't have tabbed windows.
I have option of creating new window.
When I open one window and navigate to the Google page, the task manager shows 33,546 K memory usage.
On opening second and navigate to gmail, it shows 54,786K.
On opening third and go to facebook, it shows 70,191K.
But when I close any one of them, say like facebook, it is only releasing around 4 MB memory and task manager shows 66,672K. on closing second, it shows 62,890K.
What I actually want to happen is when I close facebook, memory usage should go back to around 54,000K.
I am very new to programming VB, and don't even know if what is actually happening is memory leak or not. But anyway, is there anyway to make what i want happen, that windows release their maximum memory?
Do help.
I am using dispose method to close the windows. There were solutions which asked to create two separate applications and called the browser windows in parent and there take care of events and memory based on some method i wasn't able to understand.
If that's the way then can someone point me to a tutorial where I can learn how to do that?

Related

Mac Post Events to specific background windows

I am trying to create an accessibility app that will type in multiple windows at once, neither of which are owned by my app. For instance, let's say you have two Microsoft word documents open. When you hit a keystroke I want the command to go to both windows.
I have tried using Quartz events services, but it looks like it will only allow you to post to events either on a global or process level. But if two windows are running for the same process, how do I post to a specific window?
There's also the issue of the person typing in one window, while the content is being copied to the next.
Is it possible to post to a single window?
PS I know it's possible to do this in Windows
MacOS X includes a few tools which may be helpful. You should look into the Accessibility framework, Automator actions, and AppleScript. You should also be aware of application-specific solutions; in the case of Word, for example, you might look at VBA (Visual Basic for Applications). All of these tools provide ways that you can modify the content of other applications. Unfortunately, the level of support for each one varies from one application to another, and the way they're used also varies. So, it's unlikely that you'll find a single solution that works for all applications.
It's unlikely that you'll find a way to insert events directly into another process's event queue. That'd be a huge security hole, for one thing. Even if you could do that, you really wouldn't be able to target specific windows with your events. Mac applications use a responder chain that sends keystrokes to the "first responder", usually a component of the active window.

Starting an app in snapped view on an embedded system

A colleague recently asked a similar question ( How to start a MetroApp directly in Snapped mode? ), but this question is not a duplicate...
Programmatically forcing a Windows Store app to open in snapped view does not seem to be possible – by design. But can you do this or something similar on a Windows Embedded 8 machine? Similar things could include:
automatically start an app in snapped view on system start up, or
always start a specific app in snapped view
???
What we are trying to achieve:
The user logs in (on a preconfigured machine, assembled by us, possibly running Windows Embedded 8), starts our app and a snapped communication app (e.g. Skype or Lync) is (A) automatically there alongside our app, or (B) can be opened by pushing a button in our app.
Developers have the API necessary to take their app from SnapView to Fill or FullView. This is usually a less-advertised API because it could easily be abused. To that end, the reverse is not available. There is no API to move to SnapView.
I might also caution you, that unless you are sure of the device resolution, starting in SnapView (which is not possible as it is) would be a dangerously unreliable step as many (most?) displays do not support it (too small). And since you are talking embedded, I imagine this might be exaggeratedly so. Since it sounds like you might know the hardware, you can take that as a general rule, not for your circumstance.

WinRT live tile on system startup

I have a live tile working which updates how many users are online and how many lobbies are open within the app. This begins updating when my app loses its visibility (no point it updating the live tile whilst the app is running), but I want it to update when I first turn the computer on.
I have had a look around and mentions of making the app a lock screen app have popped up but that is all, no explanation how to do it.
Does anyone know how to do this and provide a nice little explanation or link of how to do so?
Many thanks,
Kevin
You should use push notifications for this kind of behaviour. This msdn link has more info:-
Using tile notifications
Choosing the right notification method to update your tile
There are several mechanisms which can be used to update a live tile:
Local API calls
One-time scheduled notifications, using local content
Push notifications, sent from a cloud server
Periodic notifications, which pull information from a cloud server at a fixed time interval
The choice of which mechanism to use largely depends on the content you want to show and how frequently that content should be updated. The majority of apps will probably use a local API call to update the tile when the app is launched or the state changes within the app. This makes sure that the tile is up-to-date when it launches and exits. The choice of using local, push, scheduled, or polling notifications, alone or in some combination, completely depends upon the app. For example, a game can use local API calls to update the tile when a new high score is reached by the player. At the same time, that same game app could use push notifications to send that same user new high scores achieved by their friends.
You're right with the assumption that you require a lock screen capability to be able to run background tasks without your app being started once. The main process would be to extract the part of your application that gets the data into a background task that is probably triggered by a timer and write some code to be on the lock screen.
When I first encountered that restriction I was kind of surprised, but in terms of battery performance this design decision makes sense: Only consume battery power if the data is absolutely worth it. If it's worth, it is also of interest having it on the lock screen.
On MSDN is a good overview about lock screen along with further reading links. It's much better than what I could type in here. Come back with problems related the implementation (which actually even better fits the purpose of SO). This blog might be useful, too.

Taking screenshots of desktop from a web application

I am trying to convert one of my earlier written time tracking apps to a web browser based app.
Some options of technology include java, flash, ... My goal here is letting a user track time for our organization while having ideally no extra installation on desktop, or least minimal, like flashplayer or jvm, etc, but the product itself should be in browser.
I have done some research and so far i can't find a way any technology, of the ones i have known, could take a screenshot of whole desktop while running inside web browser even if, say, browser is out of focus.
The best i could do was take a screenshot of the page on which that app will run. Any ideas? Possible? leads?

how to get embedded flash movie to communicate with .net winforms app

Hi I've used the shockwave flash com object to embed my flash file. I have buttons you can click on within the flash movie. Is it possible to get flash to notify my winform app which button has been pressed. It's developed using actionscript3. I'm using the latest vb.Net.
You can either use FSCommand, or use ExternalInterface. The later is better, although it may be harder to understand at first because of the format it uses, although if you've already solved the CallFunction (or SendFunction?) method argument, it's the same.
There are documentation and a sample C# project in Adobe's site, but I don't know the exact URL.
EDIT: To catch FSCommand and ExternalInterface calls there are two events you can subscribe to.
Also, you could also use sockets (either binary or XML).
That's a very open question as there would be many ways to do this depending on how your website and winforms applications are setup.
My initial suggestion would be to have your flash movie call some client side javascript on the button clicks. The javascript could post to a .Net SOAP webservice for instance which logs the button interaction to an associated database. Then your winforms application could finally check the database for the presence of new button click records.
This is just one high level suggestion based on the very high level question asked. If there's more specific information available then this can be refined.
Brian.