1 - Ajoutez les dépendances dans votre "setup"
2 - Ajoutez le module Crystal Reports.
3 - Sélectionnez le bon module, ici : "CrystalReports11_5_NET_2005.msm"
4 - Modifiez les propriétés du module Crystal.
5 - Sélectionnez "MergeModuleProperties"
6 - Entrez votre code de licence pour le déploiement.
Qui êtes-vous ?
Blog Archive
Labels
Saga sur le Multithreading
Membres
Faire un Don
Pages
Publié par
Johannes
mercredi 19 août 2009
commentaires (0)
Publié par
Johannes
lundi 17 août 2009
Il est agréable qu'une application mobile fonctionne de la même
façon sur windows mobile et windows CE. Sous windows mobile,
lorsqu'une application est lancée et que l'on tente de la relancer,
on récupère simplement le "focus" sur l'application existante.
Contrairement à Windows CE qui autorise les instances multiples.
Afin d'homogénéiser le comportement sur ces deux plateformes,
un code très simple permet de résoudre ce problème.
(le code compatible Windows mobile >= 3.0)
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Reflection;
using MobileTools;
namespace MobileTools
{
static class SingleInstanceApplication
{
[DllImport("coredll.dll")]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("coredll.dll")]
private static extern bool SetForegroundWindow(IntPtr hWnd);
[DllImport("coredll.dll", SetLastError = true)]
private static extern IntPtr CreateMutex(IntPtr Attr, bool Own, string Name);
[DllImport("coredll.dll", SetLastError = true)]
private static extern bool ReleaseMutex(IntPtr hMutex);
public static void Run(Form frm)
{
SingleInstanceApplication.Run(frm, frm.Text);
}
public static void Run(Form frm, string caption)
{
// On créer un mutex avec un nom qui nous sert de référence.
IntPtr MtxHandle = CreateMutex(IntPtr.Zero,
true, Assembly.GetExecutingAssembly().GetName().Name);
// Si le mutex existe déjà on récupère le focus sur
// l'application existante par son nom (caption)
if (Marshal.GetLastWin32Error() == SingleInstanceApplication.ALREADY_EXISTS)
SetForegroundWindow(FindWindow(null, caption));
else
Application.Run(frm); // Sinon on lance la forme
// On libère le mutex
ReleaseMutex(MtxHandle);
}
private const int ALREADY_EXISTS = 183;
}
}
Publié par
Johannes
lundi 3 août 2009
//Reference: Microsoft.WindowsCE.Forms
using Microsoft.WindowsCE.Forms;
///
/// Renvoie: WinCEGeneric, Smartphone ou PocketPC
///
public static WinCEPlatform GetPlatformTarget()
{
  return (SystemSettings.Platform);
}
Publié par
Johannes
vendredi 31 juillet 2009
#
# Usage : simple_cut <chaine> <separateur> <colonne>
#
simple_cut()
{
sep=`echo -e "\006"`
echo -n `echo -n $1 | tr "\n" $sep | tr $2 "\n" | head -n $3 | tail -n 1 | tr $sep "\n"`
}
Libellés :
Shell
Publié par
Johannes
using System.Reflection;
using System.IO;
namespace Tools
{
public static class PDATool
{
#region Property
public static string ApplicationDirectory
{
get
{
if (PDATool._Path == null) // On calcul la première fois le chemin.
PDATool._Path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().
GetName().CodeBase);
return (PDATool._Path);
}
}
#endregion
#region Attribut
// On conserve une le chemin pour éviter de le recalculer à chaque fois.
private static string _Path = null;
#endregion
}
}
Libellés :
C#
Publié par
Johannes
jeudi 30 juillet 2009
#include <windows.h>
void getMemoryUsage(unsigned long *total,
unsigned long *avail,
float *usage,
unsigned long *virt_total,
unsigned long *virt_avail)
{
MEMORYSTATUSEX statex;
statex.dwLength = sizeof(statex);
GlobalMemoryStatusEx(&statex);
if (total != NULL) // mémoire physique totale
*total = (unsigned long)(statex.ullTotalPhys / 1024);
if (avail != NULL) // mémoire physique disponible
*avail = (unsigned long)(statex.ullAvailPhys / 1024);
if (usage != NULL) // pourcentage d'utilisation de la mémoire physique
*usage = (float)(statex.dwMemoryLoad);
if (virt_total != NULL) // mémoire virtuelle totale
*virt_total = (unsigned long)(statex.ullTotalVirtual / 1024);
if (virt_avail != NULL) // mémoire virtuelle disponible
*virt_avail = (unsigned long)(statex.ullAvailVirtual / 1024);
}
Publié par
Johannes
#include <windows.h>
unsigned int getCPUcount(void)
{
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
return ((unsigned int)sysinfo.dwNumberOfProcessors);
}
Inscription à :
Articles (Atom)