|
A modal form is called. It's parent form has a textbox.
I want access it from the modal one, but it's impossible.
My first try was to make a new constructor, which sends the parent form object.
FrmMain (Parent)
FrmConfiguration (Child)
Child's constructor
Public FrmConfiguration(FrmMain frmMain)
When I am trying to access frmMain, the Intellisense tool doesn't show me the textbox object.
Second try with "parent" doesn't work too.
Is there a way to access the parent form and all its objects ?
|
|
|
|
|
Seraphin wrote:
When I am trying to access frmMain, the Intellisense tool doesn't show me the textbox object.
Sounds like your textbox is declared private in the FrmMain class (default accessor when created with Form Designer). Changing its access modifier to internal or public should solve the problem.
www.troschuetz.de
|
|
|
|
|
Hello gurus,
I would like to know how I can use in C# a DLL that contains C code?
The set of functions is this one:
UINT PASCAL foo1( int argc, char **argv )
UINT PASCAL foo2( int argc, char **argv )
UINT PASCAL foo4( int argc, char **argv )
UINT PASCAL foo5( int argc, char **argv )
Can anyone tell me how I can call these functions in C# while these functions are in a DLL written in C?
Best regards to all.
There is no spoon.
|
|
|
|
|
Hi there. Im doing a project on this and was wondering if ne1 out there can point me in the right direction? an excellent site? code examples are always good too! =)
thanks!
|
|
|
|
|
I think you should determine which protocols, codecs you'll use. H323? SIP? Is it a mobile network? LAN? WAN?..
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
Dont know much about this.. but done message sending over Lan TCP/ip..
I want to do this over LAN.
wat would be the difference between:
1) this and WAN?
2) this and VoIP??
Can this be extended to be used over internet(the LAN one)
How do i choose a protocol?
Thanks so much!
|
|
|
|
|
If this is an office/work project, you'll probably only use LAN and you will have a faster connection between peers like 100Mbps so sending packets to each other can be handled easier respectively. No voice-data compressing might be needed, but you'll see it when you test it.
If this system will have a few clients (and/or voice conferance), you'll definetely need to write a server application too.
And if this project will run on WAN, you'll need codecs to compress the data to improve upstream/downstream quality.
Choosing the protocol depends on your needs and abilities. For example, if you'll consider a system that talks to any cell or land phone from a desktop application, H323 can be a choice. (www.h323.org[^]) This is an open source project designed for C++ mostly but I don't know if they implemented the .NET version. You can have the server app in C++ and clients in C# (or else) with an ActiveX H323 control for the server comm.
VOIP (Voice Over Internet Protocol) enables telephone calls via a broadband internet connection. High-speed connection is a must for clear conversations. You'll need a provider like AT&T to distribute your calls internationally, if this is a professional VOIP project. (VOIP may have many different network-phonesys setups)
But through a LAN, you don't need VOIP and your local connection is all you need if it's not a telephone you're calling.
You can use sockets for voice communication between PC clients.
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
Im designing this for an office setup (LAN) so the connection will be fast (100Mbps). But would be nice if it worked on WAN too! Want it to be like IRC Chat, but with voice conferencing and possibly video too! Where can i find How to do this?
If many people use the voice at once.. then maybe compression is a good idea?
Yes i want a Server and client architecture.
I like C# or java.
Thanks again!
|
|
|
|
|
Hi,
Would any gentleman be kind enough to answer my query;
"How can I give XP look to my C# application".
Actually I was developing a payroll application and out of sudden, client asked for additional requirement ; that is, he wants my application to have XP look even when he would run it on Windows 2000, Windows 98.
Can anyone help....????
|
|
|
|
|
hi ...
this can only be acheived on non-XP systems if all controls on ur application are built by hand (don't use .Net controls).
u can find bunch of them here.
Mr.Cooper
|
|
|
|
|
For XP os:
-------------------
you should use a ".manifest" file.
1. Open notepad and paste the following code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="0.9.0.0"
processorArchitecture="X86"
name="BarryJ"
type="win32"
/>
<description></description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
2. Save the file as the core executable name with ".manifest" extension at the end. Example: MyApp.exe.manifest
3. Move the file to the directory where your application runs.
4. Set "FlatStyle" properties of each control to "System" (if has this property)
For other os:
-------------------
The only way is to create xp-similar controls by code but I would have told your client it's doable but won't worth the trouble.
<b>Radgar</b>
<i><font size=1>"Imagination is more important than knowledge." - Albert Einstein</font></i>
|
|
|
|
|
I need to start the drag operation when i just drag my picturebox...
I would to show at the place of the simple drag cursor, the normal cursor but a semi-trasparent picturebox that follow my cursor sicne the end of the operation.
How can i do?
|
|
|
|
|
I need to add a new option to Windows textbox context menu, how could i do?
|
|
|
|
|
You can do it for your app but I don't think it's possible for Windows context menu.
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
Hello,
Can anyone help me. I have 3 text boxes in my form. I wish to create .txt document which contain values(each one in new row) collected from these 3 text boxes.
I am beginner, so please help me
|
|
|
|
|
using (StreamWriter sw = new StreamWriter("File.txt"))
{
sw.WriteLine(textBox1.Text);
sw.WriteLine(textBox2.Text);
sw.WriteLine(textBox3.Text);
}
www.troschuetz.de
|
|
|
|
|
thx, but i don't know where to put that code
|
|
|
|
|
It depends. When do you want to save the values of these textboxes?
www.troschuetz.de
|
|
|
|
|
Stefan,
I want to save text and numbers which I put in text box in "data.txt" file in some directory.When I put that values in taext box and press button I want that vales to be written in that particular file(so I can run fortran file which is dependent on these values in data.txt). Also, can I somehow restrict text field to except just text or just numbers?
thank You very much Stefan for efford
|
|
|
|
|
alancatovic wrote:
and press button I want that vales to be written
You have to define an event handler for the Click event of that Button .
If your using Visual Studio select the button in the Form designer, go to the properties window, click on the yellow bolt to display available events of this button and double-click on Click . The designer creates the event handler, subscribes it and jumps to the event handler in the code file. Into the event handler you put the code, I gave you yesterday.
If you don't use an IDE, you have to insert the following code on your own:
this.button1.Click += new EventHandler(this.button1_Click);
void button1_Click(object sender, EventArgs e)
{
}
alancatovic wrote:
can I somehow restrict text field to except just text or just numbers
You can. Subscribe an event handler for the KeyPress event of each TextBox and insert the following code.
void textBoxXX_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar.IsNumber)
e.Handled = true;
}
www.troschuetz.de
|
|
|
|
|
'System.EventArgs' does not contain a definition for 'KeyChar' is showing in the error panel when I put the code
if (e.KeyChar.IsNumber)// if (!e.KeyChar.IsNumber)
e.Handled = true;
under the textbox
what now?
|
|
|
|
|
also, this happens
The type or namespace name 'StreamWriter' could not be found (are you missing a using directive or an assembly reference?)
and
The type or namespace name 'sw' could not be found (are you missing a using directive or an assembly reference?)
when I try to put this code
using (StreamWriter sw = new StreamWriter("file.txt"))
{
sw.WriteLine(textBox4.Text);
sw.WriteLine(textBox5.Text);
sw.WriteLine(textBox6.Text);
}
under my button.
Can my program be cured :=))
|
|
|
|
|
Put using System.IO; at the beginning of your code file. There should already be some similar statements e.g. using System.Windows.Forms; .
The using directive permits the use of types in a namespace without having to specify the namespace i.e. you can simply write StreamWriter instead of System.IO.StreamWriter.
www.troschuetz.de
|
|
|
|
|
No it doesn't, but fortunately the KeyPressEventArgs object that gets passed to an event handler for KeyPress event contains this property.
void textBoxXX_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar.IsNumber)
e.Handled = true;
}
www.troschuetz.de
|
|
|
|
|
"Method 'char.IsNumber(char)' referenced without parentheses
"
is showing now when I do that
|
|
|
|