- 【QBASIC互換!?】FreeBasic【GPL】
633 :デフォルトの名無しさん[]:2016/09/13(火) 18:59:33.33 ID:WiCEm+2O - '使用TVの物理サイズの取得、800x600 等を返す
Dim R As LPRECT Dim as HWND hWnd 'declare function GetDesktopWindow() as HWND hWnd = GetDesktopWindow() RetVal = GetWindowRect(hWnd, R): 'スクリーン座標の取得 'declare function GetWindowRect(byval hWnd as HWND, byval lpRect as LPRECT) as WINBOOL とここまではうまくいったんだが、 GetScreenResolutionString = Str(R.Right - R.Left) & "x" & Str(R.Bottom - R.Top) 画面の座標の取得がうまくいかない。 レジストリ関係関数もちょっとわからないでいる。 RegCloseKey で*.bas を検索しても見本が2つしか見つからなかったから。
| - 【QBASIC互換!?】FreeBasic【GPL】
634 :デフォルトの名無しさん[]:2016/09/13(火) 21:48:07.88 ID:WiCEm+2O - >>633 追加情報
C:\FbEdit\Projects\CustCtrl\FBEPictView\FBEPictView\FBEPictView.bas GetWindowRect で検索したら、上記ファイルに使用例を見つけることができた。 Dim R As RECT Dim as HWND hWnd Dim Astring As String hWnd = GetDesktopWindow() GetWindowRect(hWin,@r) AString = Str(R.Right - R.Left) & "x" & Str(R.Bottom - R.Top) MessageBox(TakaHWND,"Hello "+AString+"-2","Messagebox caption",MB_ICONINFORMATION) で何とか取得できたが、単位がわからぬ。
|
|