Form location doesn't exist (Visual Basic)

Started by
28 comments, last by cowsarenotevil 20 years, 10 months ago
I''m making a rather simple program as a break from my large game that probably won''t ever work properly, and I decided that it would be easier to use Visual Basic. So far everything has gone smoothly (which isn''t saying much because it''s hardly started) but I now am stuck. Thid tells me that I should be able to move the form at runtime with code, but when I make an attempt the location, left, and top members are nowhere to be found. Keep in mind that I have basically no expierience using Visual Basic but I''m fine with C/C++. Oh, and don''t tell me to rewrite the whole thing in some other language. I''ll just ignore you.
-~-The Cow of Darkness-~-
Advertisement
How did you try so far, codewise?

Grant Palin
Grant Palin
And what version of VB?
uh how about Form1.left...
quote:Original post by cowsarenotevil
Oh, and don''t tell me to rewrite the whole thing in some other language. I''ll just ignore you.


friendly little bovine
I''m using VB .NET, and have attempted Form1.left Form1.top, and Form1.location with no success. Thanks.
-~-The Cow of Darkness-~-
Heh, i''m just glad to hear someone being semi-rabid about using vb, instead of NOT using it.

On another note, here''s code copied and pasted from one of my vb 6.0 projects that moves its forms about.

frmLogin.Left = 2970
frmLogin.Top = 3120
frmLogin.Show

That''s actually done from within another form... but still.
quote:Original post by Anonymous Poster
quote:Original post by cowsarenotevil
Oh, and don''t tell me to rewrite the whole thing in some other language. I''ll just ignore you.


friendly little bovine


I just don''t want the common reply of: "VB sucks and can''t do anything. You should reprogram the whole thing in C, even though it would take several hundred lines just to initialize the window the way you want it."
-~-The Cow of Darkness-~-
Oh, and Form1.activeform.left appears to work, but it''s not a pretty sight when form1 goes out of focus
-~-The Cow of Darkness-~-
Try maybe...

me.left =
inside a routine in the form itself?

This topic is closed to new replies.

Advertisement