|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
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:
Last edited by Raven_Writer : 17-07-2003 at 13:45. |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||||
|
|||||
|
Quote:
PHP Code:
|
|
#4
|
|||||
|
|||||
|
Re: VB .Net Question
Quote:
PHP Code:
|
|
#5
|
|||||
|
|||||
|
Re: Re: VB .Net Question
Quote:
It's PHP Code:
|
|
#6
|
|||
|
|||
|
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. |
|
#7
|
|||||
|
|||||
|
Quote:
[EDIT: Using the ShowDialog() doesn't cause a crash in the program (hurray!).] Last edited by Raven_Writer : 18-07-2003 at 10:29. |
|
#8
|
|||
|
|||
|
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. |
|
#9
|
|||||
|
|||||
|
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:
|
|
#10
|
||||||
|
||||||
|
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 |
|
#11
|
|||||
|
|||||
|
Quote:
And sorry about he RoboEmu thing....I thought you docked the windows. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Any pratical use for Microsoft Visual Studio .NET Pro | Kyle Fenton | General Forum | 11 | 28-01-2003 16:59 |
| White Paper Discuss: VB .NET Dashreader custom control source | CD47-Bot | Extra Discussion | 2 | 19-01-2003 19:32 |
| Dashreader.dll: A Visual Basic .NET user control to read the dashboard port | Ameya | Programming | 4 | 12-01-2003 23:40 |
| Chief Delphi Site Question | Mike Bonham | General Forum | 1 | 16-02-2002 22:18 |
| VB Program to monitor robot variables | DanL | Programming | 7 | 15-02-2002 22:35 |