カテゴリー 全332件

GetCursorPos

GetCursorPos
マウスカーソル位置を取得

2007-10-04 20:20:46
win32api

Simple OLE Browser

Simple OLE Browser
RubyでWin32OLEを使う時に参考にする。

2007-10-04 20:20:05
ruby

GetPixel

GetPixel
カーソル位置のRGB値取得

2007-10-04 20:19:05
win32api

マウス周辺を拡大表示

マウス周辺をリアルタイムで拡大表示する

2007-10-04 20:18:16
win32api

vrubyでのドロップファイル位置

vrubyでのドロップファイル位置
APIの戻り値とかを参考にしたい。

2007-10-04 20:16:58
ruby

exeのパス

久々にハマったのでメモ
require 'Win32API'
class Win32API
  GetModuleFileName = Win32API.new("kernel32","GetModuleFileName","IPI","I")
  def self.get_exepath
    buf="0"*260
    len = GetModuleFileName.call(0,buf,buf.length)
    return buf[0,len].tr('\\',"/")
  end
end

exe = Win32API.get_exepath()
if exe =~ /ruby[0-9]*.exe/i then
  MYSELF_PATH = __FILE__
else
  MYSELF_PATH = exe
end

$exe_path = File.dirname(MYSELF_PATH)

2007-10-03 23:18:32
ruby

昔はやったおもちゃの名前

会社で話題になったのので(自分で振った?)
ポッピンアイ
アメリカンブレス(スナップ・ブレスレット)

2007-09-27 13:39:17
other

Mozilla ActiveX Control

Mozilla ActiveX Control

2007-09-20 23:05:03
win32api

iniファイルの書き方

INI ファイルを使った設定
長いことDelphiやってないから忘れてる…

2007-09-19 21:28:06
win32api

RubyでWorking areaを求める

Working area
require 'Win32API'

def get_desktop_area()
  function = Win32API.new('user32.dll', 'SystemParametersInfoA', ['L','L', 'P'], 'L')
  spi_getworkarea = 48
  structure = ' ' * 4
  function.Call(spi_getworkarea, 0, structure)
  left, top, right, bottom = structure.unpack('L4')
end

puts get_desktop_area

2007-09-19 19:18:28
ruby

↓個人開発したアプリ↓