Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the Origin for VB form

Status
Not open for further replies.

simonkue

MIS
Jul 9, 2002
105
GB
Sorry, but cannot search to see if this has already been asked/answered.
The origin (0,0) on a VB form is by default at top left. I wish for this to be bottom left. Anyone know how to achieve this so that 0,0 is bottom left and +ve numbers up and to the right? VB DOS had the Window command that could change this default position. I can't seem to find anything similar.
Thanks in anticipation.
 
Have a look at ScaleMode, ScaleLeft, ScaleTop etc.
These properties allow you to set up your owncoordinate system. Rum am Morgen vorkommt Kummer und Sorgen... Cheers !

Mr. Rum
 
MrRum,

I have been experimenting with the Scale properties, but these don't seem to work as you indicated. They don't allow me to define bottom left as 0,0 with +ve numbers up and to the right. Perhaps I'm not doing something right, in which case, I would be glad of further help!

Zemp,

I'm Looking at the allapi site now. Thank you for this.
 
Well simon kue, I have to be honest with you;

I never tried to do what you are trying in VB, but from what the documentation says it should be possible to create your own coordinate system with these properties....
Rum am Morgen vorkommt Kummer und Sorgen... Cheers !

Mr. Rum
 
Hello!

Try this :

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

Label1.Caption = X
Label2.Caption = Y * (-1)

End Sub

Private Sub Form_Resize()

ScaleTop = ScaleHeight * (-1)

End Sub

Mr. Rum's german's sentence has to be spelled:
"Rum am Morgen vertreibt Kummer und Sorgen... Cheers !"
But it is still not true :)
God bless you
 
Yes, you can change the coordinate system. yes, you can do it better than the methods exposed by VB. Noi, I can't give you an example - I'm nowhere near my main development machine at the moment. I provided an example of moving the origin in this forum a few months ago, but of course the search engine is down...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top