Archive for the “Visual Studio” Category

I would like to clarify a previous post of mine.

As stated there I will be attending Microsoft Tech·Ed EMEA 2008 – Developer in Barcelona the 10th until the 14th of November this year.

There is so much to tell about this, it will be a week PACKED with programming, no silly lessons like school, but information on a decent level.

I already made my agenda for the week (it can change though), in order for them to know how many places they must reserve for each seminar.

I mainly chose WPF and Silverlight, and User Interface. Because that is what I like, the interaction between the program and the user.

Databinding and LINQ is also very interesting, and I will be attending a seminar about that subject.

More information will follow.

Comments No Comments »

Should you ever want to install SQL Server Management Studio Express 2005 you MUST run it as Administrator.

When you try to install it on Vista (by double clicking the .exe) it extracts the files to a temp folder.

Then it launches the setup, asking you some questions. After that UAC asks you to gain Administrative access.

No problem so far, but at the end the installer notifies you of error number 29506, it cannot modify the security properties.

Solution is described here, run the installer as Administrator from cmd.

Comments No Comments »

Ik heb de afgelopen 2 dagen aan een klein tooltje gewerkt om wat tekortkomingen van de normale SendTo Email Recipient weg te werken.

De reden dat de titel begint met Outlook is dat het alleen met de volledige Outlook werkt, en dan heb ik het nog niet (NOG NIET! Dat komt nog) met een versie < Office 12 (Office 2007) heb getest.

Als je de installatie uitvoert nestelt het zich in de Send To map (Kopiëren naar in een Nederlandse Windows).

En dan kan je dat gewoon op een map doen, en hij zal alle bestanden in die map kopieren naar een nieuwe mail (recursive, dus gij opent alle onderliggende mappen, en daar in ook weer alle onderliggende mappen…).

Ook maakt hij gewoon een HTML emailtje aan, ipv een stom tekst emailtje.

Ook vraagt hij niet om foto’s te verkleinen, want met het huidig internet is dat echt niet nodig.

Hieronder vind je de code (meer is het niet, buiten wat resources), het project vind je hier (rar), en de gecompileerde installer vind je hier:

using System;
using System.Collections.Generic;
using System.IO;
using Outlook = Microsoft.Office.Interop.Outlook;

namespace OutlookSendToExtended
{
	///

	/// This class creates the mail, adds the files,
	/// and provides a function to display the emailwindow
	///
	/// Main method defined below
	/// 

	class OutlookSendToExtendedMain
	{
		#region Private vars

		///

		/// Holder for the Application entity
		/// 

		private Outlook.Application outlook;

		///

		/// Holder for the mail entity
		/// 

		private Outlook.MailItem mailItem;

		#endregion

		#region Constructor(s)

		///

		/// Constructor
		/// 

		///
array of files/folders
		public OutlookSendToExtendedMain(string[] args)
		{
			//create a new application
			this.outlook = new Outlook.Application();

			//create new emailitem
			this.mailItem = (Outlook.MailItem)outlook.CreateItem(Outlook.OlItemType.olMailItem);

			//loop over the fixed args
			foreach (string fixedArg in this.FixArgs(args))
			{
				//add the attachment
				mailItem.Attachments.Add(fixedArg, Outlook.OlAttachmentType.olOLE, 1, fixedArg);
			}

			//to be implemented
			//mailItem.SendUsingAccount
		}

		#endregion

		#region Methods

		///

		/// Enumerates over the args, expanding the folders in it
		/// 

		///
array of files/folders
		/// array of files
		private string[] FixArgs(string[] args)
		{
			List fixedArgs = new List();

			//loop
			foreach (string arg in args)
			{
				//if it is a directory
				if (Directory.Exists(arg))
				{
					try
					{
						//join the dirs and files
						List listOfAll = new List();

						listOfAll.AddRange(Directory.GetFiles(arg));
						listOfAll.AddRange(Directory.GetDirectories(arg));

						//recursive call
						fixedArgs.AddRange(this.FixArgs(listOfAll.ToArray()));
					}
					catch (Exception)
					{
						//to much exceptions to catch, catch the base.
						//what can we do? maybe talk to user.
						//thinking about this
					}
				}
				else
				{
					//it is a file, add it
					fixedArgs.Add(arg);
				}
			}

			//return the array
			return fixedArgs.ToArray();
		}

		public void DisplayEmail()
		{
			//display the email
			this.mailItem.Display(false);
		}

		#endregion

		#region Static methods

		///

		/// Entrypoint
		/// 

		///
array of files/folders to be attached
		static void Main(string[] args)
		{
			if (args.Length != 0)
				(new OutlookSendToExtendedMain(args)).DisplayEmail();

			return;
		}

		#endregion
	}
}

Even een toelichting bij de Setup: er is een PostBuildEvent gedefinieerd, die wat doet met WiRunSQL.vbs (tooltje om de database van een MSI aan te passen).

Hij voegt DISABLEADVTSHORTCUTS toe met value 1 in de Property tabel.

Waarom? Omdat ik een shortcut maak in de SendTo folder, en aangezien Advertised Shortcuts daar niet werken, moeten we dit afzetten. Dit is de enige manier hiervoor, Visual Studio bied hier geen interface voor aan.

Meer info over Advertised shortcuts vind je hier.

Commentaar? Betere manieren? Laat het me weten bij de comments :)

Comments No Comments »

Als je een project maakt, en je wilt een kleinere database hebben in de plaats van een MSSQL database (mdf) kan je altijd overwegen een sdf (Compact edition).

Helaas kan je niet standaard LINQ to SQL klassen gebruiken dan (dbml).

Daarvoor kan je wel dit tooltje gebruiken, en de klassen genereren.
linq to sql

Hier volgt wat je in de verschillende textboxen moet invullen, kan je even gemakkelijk copy/pasten.

Title: Make &Linq classes for Database
Command: %vsspv_windows_sdk_dir%\bin\SqlMetal.exe
Arguments: $(ItemPath) /dbml:DataClasses$(ItemFileName).dbml /pluralize /context:DataContext$(ItemFileName)
InitialDirectory: $(ItemDir)

Dan ga je in je project op een .sdf staan, doe je tools > beneden ‘Make Linq classes for Database’, en dan doe je rechtermuisknop op je project > add extisting item > (alle files laten weergeven) > dubbelklik op de dbml.

That’s it, nu kan je eender waar in je project dit doen:

DataContextFuel dataContextFuel = new DataContextFuel(DataLayer.Properties.Settings.Default.FuelConnectionString);

Natuurlijk wel aanpassen voor jouw context he :)

Comments 2 Comments »

Wil je ooit Google Chrome compileren volgens deze guide: hou dan rekening met de volgende (oplosbare) issues:

Als je de Windows SDK installeert, dan zorgt ie ervoor dat je geen Intellisense hebt in WPF.

En een 2de, (en dan belangrijk voor Google Chrome te compileren): WindowsSDKVer.exe geeft niets weer (op 64-bit, op 32-bit crasht ‘m zultschijnt).

Oplossing:

Repair even de installatie van Visual Studio vanuit Configuratiescherm.

Comments No Comments »

Er is een bug:

Als je op een machine met Vista 64-bit Visual Studio 2008 met SQL Server 2008 Express wilt gebruiken, kan je niet service based databases openen / toevoegen aan een project.

Link naar het bugreport.

Voor de rest ging de upgrade smooth: detachen van de databases, SQL Server 2005 removen, en SQL Server 2008 installeren. Jammer van deze bug, en nog irritanter: sdf (compact database) ondersteund geen LINQ, ik zit dus vast aan mdf.

Ik ga dus terug naar SQL Server 2005.

Comments No Comments »

Naar aanleiding van het commentaar van whoami op mijn vorige blogpost ben ik er verder gaan kijken naar het behavior van Button.IsDefault.

Ik heb de volgende testcase gemaakt:


	
		
			
			
		
		
		
	

En de volgende code backend:

using System.Windows;

namespace TestCase
{
	///

	/// Interaction logic for Test.xaml
	/// 

	public partial class Test : Window
	{
		public Test()
		{
			InitializeComponent();
		}

		private void button_Click(object sender, RoutedEventArgs e)
		{
			MessageBox.Show(sender.ToString());
		}
	}
}

Als je dit start zal je zien dat beide knoppen zijn gefocust.

Duw je dan op enter wordt de eerste knop gefocust (er wordt geen knop getriggert), en als je daarna nogmaals op enter duwt wordt er op de eerste knop getriggerd.

Gek behavior dus.

Comments No Comments »

Vroeger kon je in een Windows.Form het volgende doen:

Form form = new Form();
//voeg wat dingen toe aan form
Button enterButton = new Button("Klik hier");
form.AcceptButton = enterKnop();

Resultaat: het form klikt ‘zelf’ op de enterKnop als je op enter duwt.

In WPF is het heel anders, vanuit een ander oogpunt bekeken, namelijk niet het Form (Window) zelf, maar de knop.

Button enterKnop = new Button();
enterKnop.Content = "Klik hier";
enterKnop.IsDefault = true;

Button.IsDefault dus :)

Comments 2 Comments »

Ik heb net gemerkt dat als men Visual Studio 2008 opent als Administrator (voor het aanmaken van de website bij IIS) de scrolling functie van mijn Synaptics touchpad niet werkt. Hij heeft er dus geen toegang tot.

Synaptics Touchad enhancer openen als Administrator helpt, maar daar moet je dan een geplande taak van maken, anders doet UAC iedere keer moeilijk.

-Kristof out

Comments No Comments »

Iedere programmeur komt het wel eens tegen: een app schrijven in u devomgeving (Vista x64 hier), en dan backwards compatibilty checken met XP, Vista x32, Server 2k3, you name it.

Daarvoor heeft VMware heel leuk speelgoed voor, namelijk de virtuele debugger.

Even uitleggen:

  • Op u host opent ge Visual Studio 2005/2008
  • In VMware opent ge een XP VM
  • Via de optie ‘VMware’ in Visual Studio launched ge u app IN de VM, en deze draait dan echt in XP
  • Debuggen maar!

Helaasch werkt VMware Workstation Virtual Debugger for Visual Studio 2005 niet samen met 2008.

Of wel? (Ik denk het wel, anders waart ge dit niet aan het lezen ;) )

De stappen voor 32-bit host

  1. Ga naar
    C:\Program Files\VMware\VMware Workstation
  2. Maak daar de volgende map aan:
    Visual Studio Integrated Debugger
  3. Open het bestand Visual~1.cab in de map
    C:\Program Files\VMware\VMware Workstation
  4. Pak de bestanden ws_vsid.pdf* en ws_vsid.dll* (niet vsid_ja.dll*!)
  5. Nu is het oppassen: Als ge deze bestanden uitpakt met Winrar plaatst hij deze in een Virtual Store, om dat te omzeilen moet ge de .cab openen met de Windows geintergreerde zip-handler.
  6. Pak deze dan uit naar de map
    C:\Program Files\VMware\VMware Workstation\Visual Studio Integrated Debugger
  7. Als ge het goed hebt gedaan, vraagt Vista u om toelating (UAC)
  8. Dan opent ge een CMD als Administrator (rechtermuisknop > Run As Administrator)
  9. Plak dit erin:
    regsvr32 "C:\Program Files\VMware\VMware Workstation\Visual Studio Integrated Debugger\vsid.dll"
  10. En als laatste, plak het volgende in een textbestand, sla op als vs.reg (niet vs.reg.txt!!!), en dubbelklik erop om het te mergen met het register:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\AddIns\VMDebugger.Connect]
    "AboutBoxDetails"="For more information about VMware Inc, see their website at\\r\\nhttp://www.vmware.com\\r\\nFor customer support, call 1-800-xxx-xxxx\\r\\nCopyright (c) 2006 VMware Inc Inc."
    "AboutBoxIcon"="C:\\Program Files\\VMware\\VMware Workstation\\Visual Studio Integrated Debugger\\vsid.dll,1"
    "CommandLineSafe"=dword:00000000
    "CommandPreload"=dword:00000000
    "Description"="VMDebugger - Visual Studio Integrated Virtual Machine Debugger"
    "FriendlyName"="VMDebugger"
    "LoadBehavior"=dword:00000001

Hier volgen de stappen voor 64-bit host (praktisch identiek)

  1. Ga naar
    C:\Program Files (x86)\VMware\VMware Workstation
  2. Maak daar de volgende map aan:
    Visual Studio Integrated Debugger
  3. Open het bestand Visual~1.cab in de map
    C:\Program Files (x86)\VMware\VMware Workstation
  4. Pak de bestanden ws_vsid.pdf* en ws_vsid.dll* (niet vsid_ja.dll*!)
  5. Nu is het oppassen: Als ge deze bestanden uitpakt met Winrar plaatst hij deze in een Virtual Store, om dat te omzeilen moet ge de .cab openen met de Windows geintergreerde zip-handler.
  6. Pak deze dan uit naar de map
    C:\Program Files (x86)\VMware\VMware Workstation\Visual Studio Integrated Debugger
  7. Als ge het goed hebt gedaan, vraagt Vista u om toelating (UAC)
  8. Dan opent ge een CMD als Administrator (rechtermuisknop > Run As Administrator)
  9. Plak dit erin:
    regsvr32 "C:\Program Files (x86)\VMware\VMware Workstation\Visual Studio Integrated Debugger\vsid.dll"
  10. En als laatste, plak het volgende in een textbestand, sla op als vs.reg (niet vs.reg.txt!!!), en dubbelklik erop om het te mergen met het register:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432node\Microsoft\VisualStudio\9.0\AddIns\VMDebugger.Connect]
    "AboutBoxDetails"="For more information about VMware Inc, see their website at\\r\\nhttp://www.vmware.com\\r\\nFor customer support, call 1-800-xxx-xxxx\\r\\nCopyright (c) 2006 VMware Inc Inc."
    "AboutBoxIcon"="C:\\Program Files (x86)\\VMware\\VMware Workstation\\Visual Studio Integrated Debugger\\vsid.dll,1"
    "CommandLineSafe"=dword:00000000
    "CommandPreload"=dword:00000000
    "Description"="VMDebugger - Visual Studio Integrated Virtual Machine Debugger"
    "FriendlyName"="VMDebugger"
    "LoadBehavior"=dword:00000001

Dat is het ;) Meer niet. Testen maar!

Succes, en post maar als het niet lukt ;)

-Kristof out.

UPDATE: Icoonfix in de x86-64 reg key :)

Comments No Comments »

And shepherds we shall be, for thee my Lord for thee, power hath descended forth from thy hand, that our feet may swiftly carry out thy command. We shall flow a river forth to thee, and teeming with souls shall it ever be. In nomine Patris, et Filii, et Spiritus Sancti.

headless horseman worksheets

letters requesting endorsements

multiplication printable worksheets

form letters template

hope center for youth texas

mass ufo sightings

letter holder decorative

sample acceptance job letter

examples of written warning letters

ufo news sceptical enquierer

words used for letters of alphabet

old missing goverment plane ufo

mission statement worksheet

four seasons maui day of hope

astronaught aliens

memorial letter sent after death

scooby doo worksheets for children

payson utah ufo wierd happenings

reading worksheets grade 1

stop forclosure hardship letter

fraction worksheets grade5

berkley wellness letter

fasfa worksheets

beginning worksheets for high school readers

language arts worksheet

without hope

ertes letter a print

beef o brady's hope mills nc

letter g sign

vowel print letter practice sheets

letter de scrambler

sample letter to credit reporting agencies

hope cestrone

fables arnold lobel worksheet

ghetto bubble letters

hope dream wish

paranoid personality disorder hopes

annual lease value worksheet

fourth of july independence day worksheets

physics themed movies worksheet

ufo contact from pleiades

alphabet soup wall letters

legal resident aliens

scale drawings worksheets furniture

dressage movements ten letters

cognitive behavioral depression worksheet

funny letter from boy scout

city of hope uae

september hope

ufo clode encounters diamond

phoenics printables

atom printable

printable brackets 2009 basketball

stand-ins printable

printable marriage certificates

free printable travel games for kids

printable english garden

free printable coupons for cesar canine

reading printables for halloween

printable divine office bookmarks

printable applebees coupon

printable english skill sheets

printable taget

printable map pacific islands

star printable

geoboard printable

printable volleyball line up sheets

free printable coloring pages sport

printable diego button

free printable online maths crossword puzzles

printable humorous fiction stories eighth grade

printable blank bracket forms

new years printable

printable novelitys

printable computer monitor calendars

thomas printable

asia printables

printable gothic stationary

printable summer memory game

digital audio cd-r injet printable hub

free printable last will and testament

clip art printable business check

printable timeline

printable millimeter scales

free printable christmas letterheads

free printable quizes

caterpillar printables

tornado photos printable

printable question mark sign

estimation printables

printable offer

printable pet vaccine record

earthweek printable

printable frame

tj maxx printable coupon

free printable dollhouse miniatures

autozone printable

kenken printable

third grade printable worksheets

printable daytime sequencing worksheet

printable callanders

printable elevation maps

winnie the pooh printables page

picasso printable

anime printable

barn printables

printable calenda

hpc mmal card printable version

olympia sports store printable coupons

printables money for kids

printable teen devotional

kinder printable

kids math problems printables

punctuation printables

free printable worksheets for books

employment printables

printable ohio state buckeye logo

free printable activities about chi

printable coloring pages of fish

free printable colorful calenders

printable julian date calendar

printable walmart application

printable country songs

printable cardboard

printable picture of car racing flags

printable story groundhogs day

free printable dragon pictures to color

proctor gamble printable coupons

printable frames for scrapbooking

target 10 off printable in-store coupon

free printable first then

free printable 5-day planner

soup and hand printable coupon

printable facts mardi gras

printable radiation signs

printable map pikeville ky

chinese new year printables for kids

printable manuscript writing sheets for abcs

printable coupon for atkins morning bar

printable pattern of a rose

a printable redneck diploma

kindgergarten printables

naming objects printables

printable alphabet dot to dot

printable tanglewords

lowes printable coupon wow

printable coloring mandalas pages

printable picture of niagara falls

starbucks frappuccino 4 pk printable coupon

printable soduku

michael jacksons printable photos

domino printables

printable ant activities

conservation printables

kohler printable coupons

printables art

printable ncaa

brown bear brown bear printables

pharmacy coupons retail printable

disney printable pumpkin patterns

printable cooking border writing paper

printable invitations

printable t-shirt

printable fruit

printable fantasy football draft sheet

printable ab workout

nebraska printables

free printable graduation cards

printable advanced english grammar exercises

printable list sms and text lingo

printable good manners pictures for kids

bible character word search printable

printable address albels

printable golf gift certificate template

print custom printable coupons

free printable pre-algebra worksheets

printable label

printable coloring pages of water

religious easter printables for kids

printable preschool biting activities

printable piano worksheets

printable do not enter signs

printable coupons gander mountain

printable superbowl square pool grids

jonathan mccoy n-word printable

party city printable coupon april

printable notepaper

fchristian printables

free printable business card templates

taco johns printable coupons

colorwheel printables

hidden picture printables

printable layouts

printable travel checklist

printable coloring pages of spongebob

printable brain

ups printable logo

printable camo

printable sign in sheet

pentominoes printables