473,769 Members | 3,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting Started - Pass Stringbuilder Between Forms

I'm basically a VB programmer taking my first steps in C#. I have a little
C++ experience, so I'm not completely lost.

I am having a tought time figuring out exactly how to emulate passing data
between forms like I'd do in VB. Often I'd use a module with public
variables...in VC++ I'd use member variables...

How can I do this in C#? Any hints/help appreciated. TIA
Aug 17 '06 #1
2 1265
Ed,

You can always expose a method on the new form which you can pass the
StringBuilder to. Then, your form can process it accordingly. A form is
like any other object. You can store references in it like other objects,
and save references to objects passed in through properties, methods, etc,
etc.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Ed Ardzinski" <Ed************ *******@Hotmail .comwrote in message
news:D0******** *************** ***********@mic rosoft.com...
I'm basically a VB programmer taking my first steps in C#. I have a
little
C++ experience, so I'm not completely lost.

I am having a tought time figuring out exactly how to emulate passing data
between forms like I'd do in VB. Often I'd use a module with public
variables...in VC++ I'd use member variables...

How can I do this in C#? Any hints/help appreciated. TIA

Aug 17 '06 #2
Thanks, Nicholas! That did help.
Aug 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1933
by: Jim | last post by:
I need some help getting started with a .NET web project for a commercial site. I am new to .NET and my understanding of some (but not all) of its concepts is a little sparse. I apologize for the length of this message, but hopefully it will help someone here give me the most concise and useful information, and perhaps help others out as well. :) It's been a while since I've had to design anything "real" for the web. I think the last...
0
1915
by: Jim | last post by:
This si a repost, I apologize but perhaps my original inquiry got buried under all the usenet spam... I need some help getting started with a .NET web project for a commercial site. I am new to .NET and my understanding of some (but not all) of its concepts is a little sparse. I apologize for the length of this message, but hopefully it will help someone here give me the most concise and useful information, and perhaps help others out...
5
4696
by: Tedmond | last post by:
Dear all, How can I get all the titles of all openning windows? I found a API in win32 that called EnumWindows() but it returns only the windows handles, not titles. How can I get the list just like the Applications tab in Windows Task Manager? Thanks, Tedmond
6
6936
by: kurotsuke | last post by:
Hi, I'm trying to use the GetKeyName API to get the name of certain keys (in the system language). For example the names of SHIFT and RETURN keys as well as the names of same special characters. I tried to call the API GetKeyName passing the KeyCode of the KeyUP event but got no result
1
8610
by: Flack | last post by:
Hey guys, Here is whats happening. I have a StringBuilder, a TextBox, and a TabControl with one TabPage. On my main form, I created and displayed a fairly big maze. While the app is solving the maze, it appends each step it takes to the StringBuilder. When the maze is solved, the user can click a menu item to display the results. When the menu item is clicked, I set the TextBox Text value using the StringBuilder's ToString()...
10
3168
by: m00nm0nkey | last post by:
Hello. I am trying to split a file with 334,386 lines into seperate files of 50,000 each. This is the code i am running: Dim intFragmentRawIndex As Integer Dim swRawDataFile As StreamWriter Dim intNewRawIndex As Integer Dim strNewRawDataFileName As String Dim intFragmentCallCount As Integer = 0
3
2084
by: tshad | last post by:
I have a page that I am getting a username and password as a random number (2 letters, one number and 4 more letters) I have 2 functions I call: ************************************************* Function RandomString(size as integer, lowerCase as boolean) as string Dim builder as StringBuilder = new StringBuilder() Dim random as Random = new Random() Dim i as integer dim ch as char
12
11109
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
7
4701
by: Andrus | last post by:
How to get syntactically correct signature which compiles for code template grneration ? I tried code below but it creates syntactically incorrect signature. Andrus. using System; using System.Collections.Generic; public class MainClass
0
9416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9849
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7393
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3551
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.