[Help] Application to Refresh screen and Change resolution

Just bumped into this question.Is it possible to make applications tha

Page 1 of 1

2 Replies - 1018 Views - Last Post: 16 November 2009 - 04:28 PM Rate Topic: -----

#1 gokujames  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 28
  • Joined: 03-November 09

[Help] Application to Refresh screen and Change resolution

Post icon  Posted 15 November 2009 - 11:44 PM

1st question:
ok i wanted to develop a application to Refresh the screen.[Simple F5 would work !!] but is it possible.If yes i need to know how to go about it?

second question:
I want a button to start at X:0 Y:0 then on loading the form want the button to move diagonally on the form [ on reaching end the process should repeat ]

third question:
I want the application that displays current resolution.The supported resolution by monitor and then give user the choice of selecting one.

I want you to give Ideas and Code!!!
I don't understand where to start?

Is This A Good Question/Topic? 0
  • +

Replies To: [Help] Application to Refresh screen and Change resolution

#2 bigbug  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 97
  • Joined: 27-October 09

Re: [Help] Application to Refresh screen and Change resolution

Posted 16 November 2009 - 04:15 PM

View Postgokujames, on 15 Nov, 2009 - 10:44 PM, said:

1st question:
ok i wanted to develop a application to Refresh the screen.[Simple F5 would work !!] but is it possible.If yes i need to know how to go about it?

second question:
I want a button to start at X:0 Y:0 then on loading the form want the button to move diagonally on the form [ on reaching end the process should repeat ]

third question:
I want the application that displays current resolution.The supported resolution by monitor and then give user the choice of selecting one.

I want you to give Ideas and Code!!!
I don't understand where to start?


This will answer your third question quite nicely:
LabelRES.Text = ("Resolution is - " & My.Computer.Screen.WorkingArea.Height & " X " & My.Computer.Screen.WorkingArea.Width)



bigbug
Was This Post Helpful? 0
  • +
  • -

#3 LeisureProgrammer  Icon User is offline

  • N00by VB.NET Developer
  • member icon

Reputation: 110
  • View blog
  • Posts: 588
  • Joined: 06-September 09

Re: [Help] Application to Refresh screen and Change resolution

Posted 16 November 2009 - 04:28 PM

To press F5:
   My.Computer.Keyboard.SendKeys("{F5}")


This should get you started for your 2nd question:

Button1 is a button, timer1 is a timer, form1 is a form.
 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
		While 2 <> 1 'this is an infinite loop
			movebutton()
		End While
		

	End Sub

	Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
		Timer1.Enabled = True
		Timer1.Interval = 500 'make this number larger for it to go slower
	End Sub

	Private Sub movebutton()
		While Button1.Top <> 400 And Button1.Left <> 600 'change the numbers in this line to however large your form is - You can use me.width/me.height if your form is a square.
			Button1.Top += 1
			Button1.Left += 1
		End While
		Button1.Top = 0
		Button1.Left = 0
	End Sub


This post has been edited by LeisureProgrammer: 16 November 2009 - 04:38 PM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1