Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.InteropServices;
namespace Experiment_VS_Graphics_FromHwnd
{
public class Form1 : Form
@blackholeearth
blackholeearth / printToPDF_printPage_example.txt
Last active December 18, 2024 14:38
print to pdf - what can i do inside PrintPage Event...
/*
i pass image into my print fucntion .. which is webbrowser HTML to Image.
to print that image you have to use that "PrintPage Event -> e.DrawImage "
*/
public static void Print(this Image image, string printerName, string printFileName)
{
if (printerName == null)
{
throw new ArgumentNullException("Printer cannot be null.", nameof(printerName));
@blackholeearth
blackholeearth / customstep_sliderrange.dart
Last active April 29, 2022 10:44
customstep flutter slider
import 'package:flutter/material.dart';
import 'dart:math';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
static const String _title = 'Flutter Code CustomStep_RangeSlider';