Skip to content

Instantly share code, notes, and snippets.

View mdelanno's full-sized avatar

Maxence DELANNOY mdelanno

View GitHub Profile
@mdelanno
mdelanno / WindowWrapper.vb
Created April 24, 2012 16:03
WindowWrapper in VB.NET
Public Class WindowWrapper
Implements System.Windows.Forms.IWin32Window
Private ReadOnly _hwnd As IntPtr
Public Sub New(handle As IntPtr)
_hwnd = handle
End Sub
@mdelanno
mdelanno / Program.cs
Created May 16, 2013 09:37
Write in an Excel cell from an application written in C#
using System;
using System.Runtime.InteropServices;
namespace WriteToExcel
{
class Program
{
const string EXCEL_PROG_ID = "Excel.Application";
const uint MK_E_UNAVAILABLE = 0x800401e3;
Imports System
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.IO
Imports System.Runtime.InteropServices
Imports System.Windows.Forms
''' <summary>
''' Permet d'extraire l'image bitmap de l'aperçu d'un fichier .dwg.
''' </summary>
@mdelanno
mdelanno / IncludeHandler
Created April 3, 2021 10:15
SharpDx : implementation of include handler
class IncludeHandler : Include
{
readonly string directoryName;
public IncludeHandler(string directoryName)
{
this.directoryName = directoryName;
}
public void Dispose()
@mdelanno
mdelanno / SLZoomTo100Percent.cs
Created November 23, 2023 07:59
Set the zoom to 100% in a SpreadSheetLight worksheet
SLPageSettings settings = document.GetPageSettings()!;
settings.ZoomScale = 100;
document.SetPageSettings(settings);