Reading Monitor FrameRate

Advanced game related topics
SoulReaper
Enthusiast
Enthusiast
Posts: 372
Joined: Sun Apr 03, 2005 2:14 am
Location: England

Reading Monitor FrameRate

Post by SoulReaper »

Hello I have a small problem is it possible to read the exact system settings to find out what the monitor hertz setting is...

I would like to do something like this e.g.

variable=MonitorRefreshRate

I am surprised that there is not a command for this, if anyone can help i would be very very very happy as I have been banging my head on the wall here :? ouch :? ouch :? ouch!!! :roll:
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

Code: Select all

ExamineDesktops()
  Frequency = DesktopFrequency(0)
  If Frequency = 0
    MessageRequester("Display Information", "There isn't any user set desktop frequency, the standard hardware frequency is used.")
  Else
    MessageRequester("Display Information", "Desktop's frequency: "+Str(Frequency)+" Hz.")
  EndIf
Please correct my english
http://purebasic.developpez.com/
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

And here I am, as always sticked to any game development topic.
Lets see, will this do the trick for you?

Code: Select all

  ExamineDesktops() 
  f = DesktopFrequency(0) 
  If f = 0 
    MessageRequester("Display Information", "There isn't set any desktop frequency, the standard hardware frequency is used.") 
  Else 
    MessageRequester("Display Information", "Frequency of desktop: "+Str(f)+" Hz.") 
  EndIf 


The above, I took it from the PB manual.. so dont blame PB for not having this commands!!! because they exist :) You just got to use the search function either at the search or here -forums-

Should work, although I can think of a better way for doing this, maybe ill check about this later.

Read about: ExamineDesktops()

will help you as well.
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

Comtois: You damn ho sick!!!
SoulReaper
Enthusiast
Enthusiast
Posts: 372
Joined: Sun Apr 03, 2005 2:14 am
Location: England

Thankyou

Post by SoulReaper »

Thankyou both for your help, guess it was under my nose and I did not see it...

I have more learning to do and I thought I was clever :shock:
I think you Guys are great!! once again thankyou :)
Post Reply