Single Instance Application Manager

יום שבת, פברואר 13, 2010

Some .Net applications are required to run as single instance process (at startup, each process “ensures” that he’s unique). This requirement may come from licensing issues, technical and/or other reasons. Quick search in Google will provide a variety of solutions, most of them are based on WindowsFormsApplicationBase object from VB.Net, usage of Mutex object and other techniques. I don’t like mixing VB with C#, and also Win-Forms solution isn’t “pure” enough for WPF applications. So I wrote my version of “Single Instance Manager”… This post will provide short description about this small project and links to download the...

Daily Tip: How to Activate Minimized Window (Form)

יום חמישי, דצמבר 24, 2009

This solution can be used in WPF and in WinForms (with some improvements). Many times UI programmer needs to activate window, the activation can be done by using “Activate()” function in window. The problem is that this function will not show window if it is minimized. In that case you can use this workaround: using System; using System.Windows;  namespace Test {        public partial class MyWindow...

“Class2Table” Exporter

יום רביעי, ספטמבר 30, 2009

“Class to Table” = “Entity to SQL” Recently, I deal with UML design in EA, also I design DB Entities for DBML (Linq2Sql). In regular way, programmer creates DB table and imports it into VS solution as entity class for DBML. But, sometimes we need to create DB table from existing class. I’m pretty sure that there are some free tools that can do this job, but as many code freaks I prefer to develop my own tools (mostly without looking for existing solutions). I want to share my community contribution at with small application that allows generation/creation of DB tables...

דרוש מתכנת דוט-נט למשרה מלאה

יום ראשון, אוגוסט 9, 2009

  לחברה דינאמית וצעירה דרוש/ה מתכנת/ת לעבודה במשרה מלאה דרישות התפקיד:שליטה בסביבת פיתוח 2.0 .Net – חובה שליטה בשפת תכנות #C – חובה ניסיון מעשי ב- WinForms 2.0 – חובה הערות:היכרות עם שרת MS SQL 2005/8 – יתרון הכרות עם שפת VB.Net – יתרון הכרות עם סביבות פיתוח .Net 3.0/3.5 – יתרון יכולת למידה/עבודה עצמאית – יתרון נא לשלוח קו"ח לדוא"ל: העבודה מעניינת, באווירה כפרית של קיבוץ “גליל ים” הנמצא במרכז הרצליה. פרטים על החברה ניתן למצוא באתר:  

Daily Tip: How to import 3D model to WPF in couple clicks

יום ראשון, מאי 24, 2009

Import 3D Model to WPF from any 3D Editor Many 3D editors can export 3D scenes as OBJ files, these files can be easily imported into WPF project and being used to build complex 3D scenes.See how easy to import 3D scene from 3D editors (for example Blender or 3ds Max): Blender:  3ds Max:  After the export we get two files “scene_objects.obj” (contains definition of scene objects) and “scene_objects.mtl” (contains definition of objects’ materials). Now we can add these files to WPF project: Blend:Open/cerate WPF project and add OBJ and MTL files into objects’ tree.  Open target window, drag and drop added OBJ file...

Daily Tip: How to import 3D model to WPF from Blender

יום שלישי, מאי 5, 2009

In resumption to my previous post “How to import 3D model to WPF from 3D Max” I want to present the “XAML exporter for Blender” (Blender is an open-source cross-platform 3D designer). if(Blender.Name == Blend.Name) {      Debug.WriteLine(“Wiiiiii !!!! :)”); } This post will guide you how to use this feature thru simple example. Software requirements for this guide: Blender 2.48a or later, Microsoft Expression Blend 2.0 (Final Release). ...

Mouse-Wheel-Helper for Silverlight (upgraded)

יום שישי, אפריל 3, 2009

Recently I’ve required to add Mouse-Wheel support in some of our Silverlight projects. Quickly discovered that unfortunately this feature isn’t supported in built-in events of Silverlight (at least in versions 1.0 and 2.0). After short search I found this post with sample code that solves this problem by attaching handlers to mouse events on html page. I made some changes in “MouseWheelHelper” class and added “UIElementExtender” class that extends classes that derived from “UIElement” class in order to provide Mouse-Wheel support. Here small example that uses “MouseWheelHelper” and “UIElementExtender”:(use mouse wheel to zoom-in/out, also you can change image by pasting new...

Daily Tip: How to import 3D model to WPF from 3D Max

יום שלישי, מרץ 31, 2009

I want to present very useful feature “XAML exporter for 3D Studio Max”. This feature contains number of MAX-Script files with code that allows exporting 3D scenes from 3D Studio Max to XAML files. “Max2Xaml” Project on Codeplex website: I’ll try to present a simple guide for this feature with some useful example. Software requirements for this guide: 3D Studio Max 2007 or later (I use 3D Studio Max 2009), Microsoft Expression Blend 2.0 (Final Release). SDK and Framework requirements: Microsoft .Net...

Curiosity killed the Programmer

יום שלישי, ספטמבר 23, 2008

Inspired by "Google Chrome" web-browser I tried to create some small application and called it "Casper Browser". I tried to check the approach of using multi-process architecture for web-browser and for .Net applications in general. At the past I built a couple multi-process applications in .Net, but these applications were GUI-less and shared functionality by using ".Net Remoting" mechanism. The main problem while building this small test-project was to get "Main-Form" from another process and to put it in main application's GUI (as new tab in tabs' container). I knew that "Process" class contains pointer (IntPtr -> MainWindowHandle) to...

פתרון תרגיל קבלה בדוט-נט

יום שישי, יוני 13, 2008

ב- 26.05.2008 פרסמתי פוסט עם מודעת דרושים, שבה נאמר שאנו מחפשים מתכנת לעבודה בחצי משרה (פרסמנו מודעה גם באתרים כמו ג'וב מאסטר). כפי שניתן לראות בתוכן המודעה, אין דרישות מיוחדות למועמד, מלבד שליטה בסביבת פיתוח דוט-נט ו- MS Visual Studio 2005, העבודה מתאימה גם לסטודנטים ללא ניסיון מעשי (מספיק רקע מקורסים של דוט-נט, ויהיה נחמד שידע גם VB6). מאז פרסום המודעה יצא לי לראיין מספר מועמדים לתפקיד. בחלק ראשון של הראיון היו שאלות אישיות ועל רקע טכני, בחלק שני המועמד נדרש לבצע תרגיל זה: תרגיל: יישום לקליטה והצגה של שחקני כדורגל   הנך נדרש/ת לבצע תרגיל לבניה של יישום חלונאיב- MS Visual Studio 2003/2005/2008, שפת התכנות...