Go to Post Maybe the lesson the internet is trying to teach us is to "Think before you post, the machine is watching and never forgets..." - IKE [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-07-2003, 13:30
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
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:
*form name here*.visible true 
How do you do it in VB .NET? ]
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"

Last edited by Raven_Writer : 17-07-2003 at 13:45.
  #2   Spotlight this post!  
Unread 17-07-2003, 13:59
Jnadke Jnadke is offline
Go Badgers!
#0093
Team Role: Alumni
 
Join Date: Jan 2002
Location: Appleton, WI
Posts: 775
Jnadke is on a distinguished road
Send a message via ICQ to Jnadke Send a message via AIM to Jnadke Send a message via Yahoo to Jnadke
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.
__________________
The best moments of our lives fall in two categories: those that did happen and those that did not.
  #3   Spotlight this post!  
Unread 17-07-2003, 14:54
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Quote:
Originally posted by Jnadke
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.
Ok, thanks. I found what I wanted:

PHP Code:
System.Environment.NewLine 
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #4   Spotlight this post!  
Unread 17-07-2003, 15:48
Unsung FIRST Hero
Nate Smith Nate Smith is offline
FRC Key Volunteer Trainer
AKA: CrazyNate
no team
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Old Town, Maine
Posts: 1,029
Nate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to behold
Send a message via AIM to Nate Smith Send a message via Yahoo to Nate Smith
Re: VB .Net Question

Quote:
Originally posted by Raven_Writer

[Edit: Also, how would you load another form?

EX: In VB6, you do
PHP Code:
*form name here*.visible true 
How do you do it in VB .NET? ]
in .NET, it's a bit trickier. The catch to remember is that every form in VB.NET is considered an object. Now, I think all the code below is correct, but I don't have .NET on this machine right now to try it out...

PHP Code:
Dim frmShowMe as frmFormToDisplay
frmShowMe 
= New frmFormToDisplay
frmShowMe
.Show 
__________________
Nate Smith
nsmith@smythsoft.com
12 seasons, 4 teams, and more time logged behind the scorekeeper's table than I care to remember...
returning for 2011? only time will tell...
  #5   Spotlight this post!  
Unread 17-07-2003, 18:16
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: Re: VB .Net Question

Quote:
Originally posted by Nate Smith
in .NET, it's a bit trickier. The catch to remember is that every form in VB.NET is considered an object. Now, I think all the code below is correct, but I don't have .NET on this machine right now to try it out...

PHP Code:
Dim frmShowMe as frmFormToDisplay
frmShowMe 
= New frmFormToDisplay
frmShowMe
.Show 
Actually, you are almost correct.

It's
PHP Code:
Dim frmholder as new frmtodisplay
frmholder
.activate()
frmholder.visible true 
There's only 1 problem w/ this, if you close out of it, and try to show the frm again, it crashes.
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #6   Spotlight this post!  
Unread 18-07-2003, 09:27
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
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   Spotlight this post!  
Unread 18-07-2003, 10:26
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Quote:
Originally posted by seanwitte
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.
Welp, that explains the crashing. Thanks seanwitte. Is opening it as a modal dialog better than using the activate() one?

[EDIT: Using the ShowDialog() doesn't cause a crash in the program (hurray!).]
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"

Last edited by Raven_Writer : 18-07-2003 at 10:29.
  #8   Spotlight this post!  
Unread 18-07-2003, 10:45
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
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   Spotlight this post!  
Unread 19-07-2003, 13:36
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
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:
switch.dock dockstyle.right 
(switch is already defined). It shows and everything, but I want it to be visible (not behind the main form) when the program starts (for a more clear example, look at roboEmu (http://www.robbayer.com/software.html) program to see what I mean).
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #10   Spotlight this post!  
Unread 19-07-2003, 22:32
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Quote:
Originally posted by Raven_Writer
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:
switch.dock dockstyle.right 
(switch is already defined). It shows and everything, but I want it to be visible (not behind the main form) when the program starts (for a more clear example, look at roboEmu (http://www.robbayer.com/software.html) program to see what I mean).
A few things to start off with:
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
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #11   Spotlight this post!  
Unread 20-07-2003, 10:32
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Quote:
Originally posted by rbayer
A few things to start off with:
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
Thank you rbayer, I didn't know there was a difference (much) between Winamp-style and AIM-style.

And sorry about he RoboEmu thing....I thought you docked the windows.
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 20:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi