関数のオンラインヘルプ(ロシア語から日本語化)

#Include "window9.bi"
OpenWindow("",10,10,240,150)
EditorGadget(1,20,20,100,40,"Editor")
SetGadgetColor(1,50000,0,1)
ButtonGadget(2,10,70,150,30,"Editor 色を取得")
TextGadget(3,150,20,45,17,"",SS_CENTER)
SetGadgetColor(3,255,16777215,3)

Do
 var event=WindowEvent()
 If event=EventGadget Then
  Select case EventNumber
   Case 2
    SetGadgetText(3,Str(GetGadgetColor(1,1)))
  End Select
 ElseIf  event=Eventclose Then
  End
 EndIf
Loop

色の取得

 

#Include "window9.bi"
Dim As integer hwnd ,event
hwnd=OpenWindow("1",30,30,500,500)
WindowColor(hwnd, ColorRequester() )
Do
 event=WindowEvent()
 If event=EventClose Then End
Loop

色の設定

 

#Include "window9.bi"
OpenWindow("",10,10,200,600)
SetGadgetFont(,FontRequester())
ButtonGadget(1,10,10,100,20,"button")

Do
 Var event=WindowEvent
 Select Case event
  Case EventClose
   End
 End Select
Loop

 

#Include "window9.bi"

? OpenFileRequester("","C:\","Text files (*.txt, *.ini, *.doc)"_
+Chr(0)+"*.txt;*.ini;*.doc"+Chr(0))
Sleep

ファイルを開くダイアログ

 

#Include "window9.bi"
OpenWindow("",10,10,300,150)
ButtonGadget(1,20,20,60,20,"End")
TrackBarGadget(2,20,70,100,20,0,10)
SetGadgetColor(2,50000,0,1)
TextGadget(3,200,20,55,50)
SetGadgetFont(3,LoadFont("Arial",34))
SetGadgetColor(3,0,16777215,3)
Do
var event=WindowEvent()
 If event=EventGadget Then
  Select case EventNumber
   Case 2
           SetGadgetText(3,Str(GetTrackBarPos(2)))
   Case 1
    end
  End Select
 EndIf
Loop

TrackBarGadget

 

#Include "Window9.bi"
? ShellFolder( "Select Folder", "C:\")
sleep

ShellFolder

 

#Include "window9.bi"

Dim As integer hwnd,event
hwnd=OpenWindow("1",300,10,200,200)
Var HIMAGE=Load_image("C:\WINDOWS\system32\oobe\images\merlin.gif")
ButtonImageGadget(1,10,10,80,80,HIMAGE, BS_PUSHLIKE Or BS_AUTOCHECKBOX)

Do
 event=WindowEvent()
 If event=EventClose Then End
Loop

 

#Include "window9.bi"

OpenWindow("",10,10,400,300)
CalendarGadget(1,10,10,220,220)
ButtonGadget(2,250,100,130,20,"日付を取得")
TextGadget(3,250,140,130,20,"",SS_CENTER)
Do
 var event=WindowEvent()
 If event=eventclose Then End
 If event=eventgadget Then
  If eventnumber()=2 Then
   SetGadgetText(3,Str(GetStateCalendar(1)))
  EndIf
 EndIf

Loop

CalendarGadget

 

#Include "window9.bi"

OpenWindow("",10,10,300,100)
ComboBoxGadget(1,10,10,100,80)
FileComboBoxItem(1,"C:\*.*")
  
Do
var event=WindowEvent()
 If event=eventclose Then End
Loop

ComboBoxGadget

 

#Include "Window9.bi"
If OpenWindow("",10,10,300,300) Then
 ComboBoxImageGadget(1,10,10,100,100)
 Var hhim=Load_image("1.ico")
 AddComboBoxImageItem(1,"one",hhim,-1)
 AddComboBoxImageItem(1,"two",Load_image("1.png"),-1)
EndIf

Var event=0
Do
 event=WindowEvent()
 If Event=EventClose Then End
 If event=eventgadget Then
  If eventnumber()=1 Then

  EndIf
 EndIf

Loop

ComboBoxImageGadget

 

#Include "window9.bi"

OpenWindow("",10,10,300,100)
StringGadget(1,10,10,100,20)
ButtonGadget(2,120,10,130,20)
GadgetToolTip(1,"文字列ガジェット")
GadgetToolTip(2,"ボタン")

Do
 var event=WindowEvent()
 If event=eventclose Then End
Loop

 

#Include "window9.bi"
Dim As integer event
OpenWindow("1",300,10,300,300)
GroupGadget(1,10,10,260,240,"Group")
ButtonGadget(2,100,100,60,30,"button")
TextGadget(3,150,150,60,30,"Text")
SetGadgetFont(1,LoadFont("arial",15))
SetGadgetColor(1,255,50000000,3)
Do
 event=WindowEvent()
 If event=EventClose Then End
 If event=eventgadget Then MessBox("メッセージ","これはボタンです")
Loop

ButtonGadget

 

#Include "window9.bi"

Dim As integer hwnd,event
hwnd=OpenWindow("1",300,10,190,150)
IpAddressGadget(1,10,50,150,20)
SetIpAddress(1,"255.10.1.1")
Do
 event=WindowEvent()
 If event=EventClose Then End
Loop

 

#Include "window9.bi"

OpenWindow("",10,10,300,100)
ListBoxGadget(1,10,10,100,80)
FileListBoxItem(1,"C:\*.*")
  
Do
var event=WindowEvent()
 If event=eventclose Then End
Loop

 

#Include "window9.bi"

Var hwnd=OpenWindow("こんにちは",10,10,500,500)
Var Style= LVS_EX_FULLROWSELECT  Or LVS_EX_GRIDLINES Or LVS_EX_SUBITEMIMAGES
Var LLIISS=ListViewGadget(1,10,10,310,300,Style,,,32)
AddListViewColumn(1, "列 1",0,1,100)
AddListViewColumn(1, "列 2",1,2,100)
AddListViewColumn(1, "列 3",2,3,100)
For aa As Integer=0 To 15
 AddListViewItem(1,"item "+Str(aa),Extract_Icon(GetSystemDir & "\SetupAPI.dll",aa),aa,0)
 AddListViewItem(1,"item "+Str(aa+18),Extract_Icon(GetSystemDir & "\SetupAPI.dll",aa+16),aa,1)
 AddListViewItem(1,"item "+Str(aa+36),Extract_Icon(GetSystemDir & "\SetupAPI.dll",aa+32),aa,2)
Next
Do
 Var event=WindowEvent()
 If Event=EventClose Then End
Loop

 

#Include "window9.bi"

Dim As HMENU hMessages,event

OpenWindow("",10,10,400,400)

hMessages=CreatePopMenu()
MenuItem(1,hMessages,"メニュー 1")
MenuItem(2,hMessages,"メニュー 2")

Do
 event=WindowEvent
 If event=EventMenu then
  Select case EventNumber
   Case 1
    MessBox("","メニュー 1")
   Case 2
    MessBox("","メニュー 2")
  End Select
 ElseIf event=WM_RBUTTONDOWN Then
  DisplayPopupMenu(hMessages)
 EndIf
 If event=EventClose Then End
Loop

 

 

#Include "window9.bi"

Dim As HMENU hMessages,MenName,MenName1,event

OpenWindow("",10,10,400,400)

hMessages=Create_Menu()
MenName=MenuTitle(hMessages,"ファイル")
MenName1=MenuTitle(hMessages,"ヘルプ")
MenuItem(1,MenName,"メニュー 1")
MenuItem(2,MenName,"メニュー 2")

Do
 event=WindowEvent
 If event=EventMenu then
  Select case EventNumber
   Case 1
    MessBox("","メニュー 1")
   Case 2
    MessBox("","メニュー 2")
  End Select
 EndIf
 If event=EventClose Then End
Loop

 

 

#Include "window9.bi"

Dim As Integer hwnd,hwToolBar

hwnd=OpenWindow("",10,10,200,200)
CenterWindow(hwnd)
hwToolBar=CreateToolBar(,TBSTYLE_FLAT)
ToolBarStandardButton(hwToolBar,1,STD_FILEOPEN)
ToolBarSeparator(hwToolBar)
ToolBarSeparator(hwToolBar)
ToolBarStandardButton(hwToolBar,2,STD_CUT)
ToolBarSeparator(hwToolBar,-1)
SetParent(CheckBoxGadget(10,26,2,20,20),hwToolBar)
SetParent(ComboBoxGadget(11,62,0,50,100),hwToolBar)
For a As Integer=1 To 5
 ToolBarSeparator(hwToolBar)
 AddComboBoxItem(11,Str(a),-1)
Next
ToolBarStandardButton(hwToolBar,3,STD_COPY)


Do
 Var ev=WindowEvent
 If ev=EventClose Then
  End
 ElseIf ev=EventGadget Then
  Select Case EventNumberToolBar
   Case 1 To 3
    MessBox("","ツールバーの数  "  & EventNumberToolBar)
  End Select
  If EventNumber=10 Then
            MessBox("CheckBox","CheckBox")
  EndIf
 EndIf
Loop

 

 

'===============================================================================
' Minirechner.bas
' Erstellt am 20.03.2014
'===============================================================================

#Include "Window9.bi"

Dim As Integer event

Enum
  'Gadgets:
  Text_a
  String_a
  Text_b
  String_b
  Text_c
  String_c
  Button_Plus
  Button_Minus
  Button_Mult
  Button_Div
End Enum


Sub OpenWindow_Main()
  'Fenster
  
  CenterWindow(OpenWindow("ミニ計算機", 0, 0, 270, 150))
  TextGadget(Text_a, 20, 20, 80, 20, "数 1")
  TextGadget(Text_b, 20, 50, 80, 20, "数 2")
  TextGadget(Text_c, 20, 80, 80, 20, "結果")
  StringGadget(String_a, 110, 20, 80, 20, "0")
  StringGadget(String_b, 110, 50, 80, 20, "0")
  StringGadget(String_c, 110, 80, 80, 20, "0")
  ButtonGadget(Button_Plus, 200, 20, 20, 20, "+")
  ButtonGadget(Button_Minus, 230, 20, 20, 20, "-")
  ButtonGadget(Button_Mult, 200, 50, 20, 20, "*")
  ButtonGadget(Button_Div, 230, 50, 20, 20, "/")
  
End Sub


Sub Rechne(RZ As String)
  'Zahlen auslesen, rechnen, Ergebnis anzeigen:
  
  Dim As Double a, b, c
  
  a = Val(GetGadgetText(String_a))
  b = Val(GetGadgetText(String_b))
    
  Select Case RZ
  Case "+"
    c = a + b
  Case "-"
    c = a - b
  Case "*"
    c = a * b
  Case "/"
    c = a / b
  End Select
  
  SetGadgetText(String_c, Str(c)) 
  
End Sub


' Hauptprogramm:

OpenWindow_Main()

Do
  event = WaitEvent
  Select Case EventNumber
  Case Button_Plus
    Rechne("+")
  Case Button_Minus
    Rechne("-")
  Case Button_Mult
    Rechne("*")
  Case Button_Div
    Rechne("/")
  End Select
Loop Until event = EventClose

End
ミニ電卓


'===============================================================================
' MausMaler_win9.bas
' Erstellt am 14.03.2014
'===============================================================================

#Include "Window9.bi"


Dim HWND As hwnd
Dim As Integer Farbe = &HFF0000, x1, y1, x2, y2, LBDown = 0, event

Enum
    MenuItem_Farbe
    MenuItem_Ende
End Enum


Function Open_Window() As hwnd
    
    Var HWND = OpenWindow("マウスで線画", 0, 0, 640, 480)
    CenterWindow(HWND)
    Var hMessages = Create_Menu()
    Var MenName = MenuTitle(hMessages, "メニュー")
    MenuItem(MenuItem_Farbe, MenName, "色")
    MenuItem(MenuItem_Ende, MenName, "終了")
    
    Return HWND

End Function


HWND = Open_Window()

Do

    event = WaitEvent()
    
    Select Case event
    
        Case EventMenu
            Select Case EventNumber
                Case MenuItem_Farbe
                    'Farbauswahl:
                    Farbe = ColorRequester()
                Case MenuItem_Ende
                'Ende:
                    End
            End Select
        
        Case EventLBDown
            'Maus gedrueckt: Zeichnen neu beginnen
            WindowStartDraw(HWND, 0, 0, 640, 480, 1, 0) 
            LBDown = 1
            x1 = MouseX
            y1 = MouseY
            PixDraw(x1, y1, Farbe)
            StopDraw
                                                
        Case EventLBUp
            'Maus losgelassen: Zeichnen unterbrechen
            LBDown = 0
                        
        Case EventMouseMove
            
            If LBDown Then
                'zeichnen, so lange Maus gedrueckt:
              WindowStartDraw(HWND, 0, 0, 640, 480, 1, 0) 
                x2 = MouseX
                y2 = MouseY
                If Farbe = &HFFFFFF Then
                    'Weiss: breite Linie zum Loeschen
                    LineDraw(x1, y1, x2, y2, 10, Farbe)
                Else
                    'normale Linienbreite
                    LineDraw(x1, y1, x2, y2, 0, Farbe)
                End If
                x1 = x2
                y1 = y2
                StopDraw
            End If
        
    End Select
    
Loop Until event = EventClose

End
マウスで線画

 

ヘルプファイル:ダウンロード:helpWindow9JP20140906.zip
のスクリーンショット

日本語ヘルプ・ファイル


関数のオンラインヘルプ(日本語)