Form location doesn't exist (Visual Basic)

Started by
28 comments, last by cowsarenotevil 20 years, 9 months ago
In the project window (right) there should be a folder called Forms and within that is the list of forms used in your app.
Move doesn''t require the current location if you are setting both x and y, but yes, if you want to only change one you need to know the other
Advertisement
I don''t see a folder called forms, but I think it''s set up differently in .NET. I''ll try asking on a .NET forum.
-~-The Cow of Darkness-~-
Wait... I knw why it doesn't work now. There aren't default instances of the forms in .NET, so I have to make them myself. I think I might be able to figure it out now.

EDIT: article


[edited by - cowsarenotevil on July 9, 2003 8:31:41 PM]
-~-The Cow of Darkness-~-
quote:Original post by cowsarenotevil
Wait... I knw why it doesn''t work now. There aren''t default instances of the forms in .NET, so I have to make them myself. I think I might be able to figure it out now.

EDIT: article


[edited by - cowsarenotevil on July 9, 2003 8:31:41 PM]


That''s exactly what I was about to tell you... basically when you make a form in design mode in VB.NET and you give it a name.. that name is the name of the class, not the instance of the object... but I''m sure you''ve figured that out by now if you''ve read the article
Hmm... I set it up so that each form would have a "definstance", but that instance is different from the "instance"(or whatever) that appears at runtime. So I figured that I''d set it to start with "Sub Main", but when I show the definstance, it immediately dissappears. This is so hopelessly confusing. I would completely give up on this .NET stuff if it weren''t for the cool transparency settings (that I utilize heavily)
-~-The Cow of Darkness-~-
when you start with a main sub and then want to pass on execution to another form or sub or something like that you have to do something special... I can't remember what it is off hand but I'll go look for it... basically what's happening is you're showing your forms and then your program is ending because the main sub ended

EDIT: This is really freakin annoying! I used this all the time in a class I took last fall on VB.NET but I can't seem to find it anywhere... you'd think it would be a common problem among people who are used to VB6 but appearently not... it was something like System.blah.blah.blah.to.much.object.orientation.fubar.run(formname)

[edited by - TempusElf on July 9, 2003 10:23:32 PM]
quote:Original post by TempusElf
when you start with a main sub and then want to pass on execution to another form or sub or something like that you have to do something special... I can''t remember what it is off hand but I''ll go look for it... basically what''s happening is you''re showing your forms and then your program is ending because the main sub ended


Ok, I''ll look into that. There must be some way to wait until the form gets closed (or "end" gets called)...
-~-The Cow of Darkness-~-
Oh wait... I think I found it... it might be System.WinForms.Application.Run(New Form1) (ok so maybe I over dramatized the length of it) I''m not entirely sure but I know it''s some command like this... you may have to:
Imports System.WinForms 


hope this helps you
Got it. It''s "System.Windows.Forms.Application.Run(Form1.DefInstance)". Why did they have to screw up VB so much when it worked fine before?
-~-The Cow of Darkness-~-
quote:Original post by cowsarenotevil
Got it. It''s "System.Windows.Forms.Application.Run(Form1.DefInstance)". Why did they have to screw up VB so much when it worked fine before?


They did it to shut the whiners up that wanted true OO in VB. IMHO it was a waste, but I''m reserving judgment until I''ve had to write production code in VB.Net (yes, IRL, people write production code in VB. No flaming ) If it weren''t for all the complaining about VB''s hackish class setup, it wouldn''t have been rearranged so brutally. At the moment I prefer Ye Goode Olde Dayes, but like I said, I won''t know for sure which I like better until I''m used to it enough to do some serious code in it.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement