![]() |
VB .Net Question
I've searched MSDN, Google, and Yahoo for this, asked people, but still haven't really got anything.
What I'm trying to do is figure out how to create a new line (i.e.: In C++, \n makes a new line). But can't find out how to do it. I've also searched the help document that comes with Visual Studio .NET (the one that FIRST gave us). If anyone knows how/if it is possible to do, please tell me. [Edit: Also, how would you load another form? EX: In VB6, you do PHP Code:
|
Search harder.
It's there. Typically a new line consists of a line feed function and a carriage return function. Some languages have them combined. |
Quote:
PHP Code:
|
Re: VB .Net Question
Quote:
PHP Code:
|
Re: Re: VB .Net Question
Quote:
It's PHP Code:
|
If you want to open a form named frmSetup:
Form setupForm = new frmSetup(); frmSetup.Visible = true; frmSetup.Activate(); if you want to open it as a modal dialog: Form setupForm = new frmSetup(); frmSetup.ShowDialog(); The only issue with the first method is that unless you check to see if the form is already open, you'll have multiple instance of the same form floating around. The difference between the Show() and Activate() methods is that Show() just makes it visible, but Activate() brings it to the front. Activate() only works if the form is visible, so you need to set the Visible property first. |
Quote:
[EDIT: Using the ShowDialog() doesn't cause a crash in the program (hurray!).] |
A modal dialog will keep the focus until you close it. If FormA opens FormB as a dialog, then you can only interact with FormB until you close that form. For most cases its probably fine, normally you'd use it when you need input before doing something else. You are forcing the user to commit or cancel some operation before they can continue.
If you need two forms open at the same time with the user jumping between them then you need to use Activate() or Show(). The Show() method is the equivalent of setting the Visible property to True BTW. |
Ok, my program (more specific, a dash-board program) is coming along nice. I have yet another question though. Is it possible to have 2 forms show up, and dock the 2nd one to the first (like what AIM can do with the edge of the screen).
I've got this: PHP Code:
|
Quote:
1. Traditional docking involves docking one window inside another. 2. Docking to the edge of the screen (AIM style) and docking one window to another (a-la Winamp) are two very different things. 3. RoboEmu doesn't actually use docking. I just tell it to put the Windows in the right place to start. It's up to the user to keep them that way. :) Anyways, I don't really know much VB, but from what I've been able to discern, getting a window to dock to the outside of another one is not an easy task. A quick google search turned up this: http://www.visualbasicforum.com/t54802.html |
Quote:
And sorry about he RoboEmu thing....I thought you docked the windows. |
| All times are GMT -5. The time now is 20:15. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi