FindGfxMode.htm 1.7 KB

123456789101112131415161718
  1. <html><head><title>Command: FindGfxMode </title><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><link rel='stylesheet' href='../css/commands.css' type='text/css'></head><body><span class='Command'>&nbsp;&nbsp;FindGfxMode (width,height,depth) &nbsp;&nbsp;</span></p><span class='header'>Definition:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>Returns the mode number of a graphic mode meeting your criteria.</td></tr></table><span class='header'><br>Parameter Description:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>width = width, in pixels (i.e. 640)<br>
  2. height = height, in pixels (i.e. 480)<br>
  3. depth = color depth (i.e. 16, 24, 32)<br></td></tr></table><p class='header'>Command Description: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>Use this command to determine which of the user's graphic card mode supports the parameters you supply. You can get a full detailed list of the video card modes - see <a href='CountGFXModes().htm'>CountGFXModes()</a>.</td></tr></table><p class='header'>Example: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>; FindGFXMode example<br>
  4. <br>
  5. ; change values to see different mode numbers<br>
  6. mode=FindGfxMode(800,600,16) <br>
  7. <br>
  8. ; If there is a mode, tell user<br>
  9. If mode > 0 Then <br>
  10. Print "The mode you requested is: " + mode<br>
  11. Else<br>
  12. Print "That mode doesn't exist for this video card."<br>
  13. End If<br>
  14. <br>
  15. ; Wait for ESC press from user<br>
  16. While Not KeyHit(1)<br>
  17. Wend<br></td></tr></table><p><b><a target="_top" href="../index.htm">Index</a></b></p></body>
  18. </html>