Freitag, 10. September 2010

Unhandled exception Win32Exception - Error creating window handle

Unhandled exception Win32Exception,Error creating window handle - AboutMyDot.Net

Unhandled exception Win32Exception,Error creating window handle

———————————
Unhandled exception Win32Exception,Error creating window handle.,System.Windows.Forms, at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.CreateGraphicsInternal()
at System.Windows.Forms.ThreadExceptionDialog..ctor(Exception t)
at System.Windows.Forms.ThreadExceptionDialog..ctor(Exception t)
at System.Windows.Forms.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.Control.WndProcException(Exception e)
at System.Windows.Forms.ControlNativeWindow.OnThreadException(Exception e)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager. System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager. FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
————————————————
This is a very boring error, it means that all the available windows handlers are finished so your application can’t create new windows. The limit seems to be 1000 windows but as you can imagine it’s really hard to think that someone could write a program that uses 1000 opened windows. The problem is that somewhere in your code you think you have closed forms and released controls but they’re just hidden and continue to occupy memory and handlers. I had this problem with a software developed by my company, RYHAB Solutions, and we lost a lot of time to figure out where the problem was. At the end we understood what was going on.
We had in our code something like this:
  1. public sub CloseWindow()
  2. if typeof(me) is mybaseclass then
  3. me.visible=false
  4. else
  5. me.close()
  6. end if
  7. end sub
public sub CloseWindow()     if typeof(me) is mybaseclass then           me.visible=false     else           me.close()     end if end sub 
We used this sub in a base class so all the classes that hinerited by this returned “mybaseclass” when calling typeof(me). This caused all the windows to be hidden instead of closed so they occupied all the available handlers in few hours and program crashed.
I searched a lot on the web and a lot of people talked about freeing manually resources and other strange things, someone assumed that it could be a .net bug. Actually i can say that it was my fault, no strange things behind, just a programming bug. I’m sure that most of the people that have the same problem could solve it as i did just ensuring that they close their forms properly.
Don’t waste time searching for strange solutions, just check what you do with forms :)
If you have this error message in your application use the CLR Debugger provided by Microsoft. It’s a graphical tool that shows you everything appening in a managed application, opened forms, memory usage, controls, events … everything. This is really useful to understand if something you tought was closed is opened instead.
Here is the link to download the tool:
http://msdn2.microsoft.com/en-us/library/7zxbks7z.aspx
maybe it requires the Platform SDK, you can get it on Microsoft site too.

Freitag, 13. August 2010

Problem in change the size of MonthCalendar

http://www.dreamincode.net/forums/topic/67458-problem-in-change-the-size-of-monthcalendar/

I put on the form a tool MonthCalendar and I tried to chang the size ( width-length ) by mouse or from properties but it didn't accepted, it keeps the same size. How can I change the size.



The MonthCalendar Control is a fixed-size control. This means that you can not change the size of it. But rules are always meant to be broken. To change the size of it, you need to change the Minimum / Maximum Size Property. Presto Chango you got yourself a re-sizable Month Calendar.

Mittwoch, 23. Juni 2010

Why the hell does OpenFileDialog change my working directory?

FU M$!

Das war aber wirklich nicht notwendig -.-
Und ich wunder mich seit Monaten warum ich immer wieder
so seltsame Tickets vom Kunden bekomme "File xy konnte nicht gefunden werden" xD

http://stackoverflow.com/questions/930816/why-does-openfiledialog-change-my-working-directory

Mittwoch, 16. Juni 2010

Das Google Notizbuch mit Firefox 3.5 nutzen

Lang lang habe ich mich gewundert, dass mein Google Notizbuch AddOn auf einmal weg ist
und kein Update mehr kommt...
Doch nun habe ich auf maiklsnotizbuch den folgenden Bericht gefunden.

Sehr praktisch wie ich finde, da ich persönlich dieses tool als FF AddOn sehr gerne und häufig verwendet habe.
Viel Spaß damit,
keep ist real ^^



Das Google Notizbuch ist ein tolles Tool an das ich mich sehr gewöhnt habe. Umso trauriger stimmt es mich, dass Google es nicht weiterentwickeln will – man will wohl solche Funktionalitäten im zukünftigen Google Waves nutzen. Bis dahin steht man als Nutzer ein bisschen auf der Strasse. Als reiner Webdienst lässt sich das Notizbuch nach wie vor nutzen – die Integration als Addon in Firefox bleibt aber ab der Firefoxversion 3.5 verwehrt. Gerade diese Integration war aber eine der wichtigsten Funktionalitäten.
Glücklicherweise benötigt man nicht viel, um das Addon wieder unter der neusten Firefox-Version zum Laufen zu bringen.
Als erstes braucht man die Browsererweiterung selbst. Die kann man sich als xpi-Datei unter folgendem URL herunterladen: http://dl.google.com/firefox/google-notebook.xpi (mit Rechtsklick & „Ziel speichern unter…“).
Die xpi-Datei speichtert man ab.
Nun wird ein Komprimierungsprogramm benötigt, welches dieses Archiv – nichts anderes ist eine xpi-Datei – entpacken kann. Hier empfehle ich 7zip.
Wir öffnen die Datei mit 7zip und finden innerhalb des Archivs die Datei „install.rdf“. Diese Datei öffnen wir mit einem Texteditor und suchen die Zeile, in der wir die Versionsnummer von Firefox finden – diese ändern wir sogleich von „3.0.*“ zu „3.5.*“.
google_nb

Speichern und schliessen (auch das Archiv) und mit Doppelklick auf die xpi-Datei installieren. Fertig.
Es kann vorkommen, dass wir bei der Installation einen Fehler bekommen („…Signing could not be verified.-260″). Wenn dieser Fehler auftritt, müssen wir im xpi-Archiv im Ordern „META-INF“ die Datei „zigbert.rsa“ löschen. Das sollte das Problem beheben.

Update vom 27.07.2009: Wer sich die Arbeit sparen möchte, kann sich auch gleich das modifizierte Addon-paket hier herunterladen: Google Notebook (modifiziert für Firefox 3.5)

Mittwoch, 5. Mai 2010

StarCraft 2 kommt am 27. Juli

StarCraft 2: Wings of Liberty- Release weltweit Ende Juli 

Die jüngsten Spekulationen über den Releasetermin von StarCraft 2 haben sich als falsch erwiesen. Wie der Entwickler Blizzard jetzt ankündigte, wird der erste von drei StarCraft 2-Teilen, Wings of Liberty, erst am 27. Juli 2010 erscheinen. Bislang hatte Blizzard das erste Halbjahr 2010 als möglichen Veröffentlichungszeitraum angepeilt gehabt, nachdem das Studio Ende 2009 StarCraft 2 auf Grund der noch nicht abgeschlossen Arbeiten an der Multiplayer-Plattform Battle.net verschieben musste.

Nun soll das Spiel zeitgleich in Europa, USA, K! anada, Australien, Neuseeland, Russland, Mexiko, Singapur, Indonesien, Malaysia, Thailand, auf den Philippinen und in den Regionen von Taiwan, Hong Kong und Macau erscheinen. Auch in Südkorea, wo es zuletzt Streit um die Alterskennzeichnung von StarCraft 2 gab, soll das Spiel Ende Julu im Laden stehen.
Wie schon bei World of WarCraft wird Blizzard auch eine Downloadversion von StarCraft 2 anbieten, die am Releasetag dann durch den Erwerb eines Aktivierungsschlüssels aktiviert werden kann.

In der von Blizzard verteilten Pressemitteilung schreibt Studio-Boss Mike Morhaime, »wir haben uns so viele Jahre darauf gefreut, das StarCraft-Universum erneut zu besuchen, und wir sind sehr gespannt, da die Zeit dafür nun fast gekommen ist«. »Dank unserer Beta-Tester machen wir derzeit in den letzten Phasen der Entwicklung große Fortschritte und in nur wenigen Monaten werden wir bereit sein, Spieler aus der ganzen Welt zu StarCraft 2 und im neuen Battle.net willkommen heißen zu können
Wie bereits berichtet, hat die Standard-Edition von StarCraft 2: Wings of Liberty eine unverbindliche Preisempfehlung von 59,99 Euro. Dieser Preis gilt nicht nur für die Ladenversion, sondern auch für den Download aus dem Blizzard-Shop. Die Collector’s Edition mit Extra-Inhalten wird 89,99 Euro kosten.

Dienstag, 4. Mai 2010

Google - Linksammlung

50 verrückte Bilder auf Google Street View
Link

So sparen Sie Zeit mit Google Mail
Link

So geht´s - MP3s und Videos gratis per Google
Link


Google Ventures - Google investiert in Zukunfts-Vorhersage
Link