|
on my "treeView1_AfterSelect(...)
I have this
************************
if(nodeSel=="Node One selected")
{//Object created
MTO a = new MTO();
//MTO method called
a.mtoModel();
}
THis class id defined like this
**********************
class MTO
{
private TextBox textBox1 = new TextBox();
private Panel panel1 = new Panel();
public void mtoModel()
{
MessageBox.Show("Test", "node")
textBox1.Text = " ";
textBox1.Location = new System.Drawing.Point(80,16);
textBox1.BackColor = Color.FromArgb(245, 160, 75);
panel1.Controls.AddRange(new Control[]{textBox1});
}
}
When I select the node 1 , the message is displayed (node one selected) but hte components are not created in the panel. Any ideas?
|
|
|
|
|
sorry, it calls the right message
"Test"
|
|
|
|
|
this.Installers.AddRange
(new System.Configuration.Install.Installer[]
{this.serviceProcessInstaller1,this.serviceInstaller1});
this is all one line.
what is the meaning of curly brackets there ?
(not exaclty relating to Installer but in general C# syntax because
I see that type of code quite often used in different cases and I
fail to understand it.
|
|
|
|
|
This means that a new array with the values this.serviceProcessInstaller1 and this.serviceInstaller1 is created.
You could also write it like this:
System.Configuration.Install.Installer[] tmpArray = new System.Configuration.Install.Installer[2];
tmpArray[0] = this.serviceProcessInstaller1;
tmpArray[1] = this.serviceInstaller1;
this.Installers.AddRange(tmpArray);
|
|
|
|
|
Ok, we're declaring an array with square brackets "[]" and initialising it with the items withn the curly brackets "{}"
Regards.
modified 17-Jul-19 21:02pm.
|
|
|
|
|
I have a button that when clicked, it populates a panel control with radio buttons and textBoxes controls.
Is there a simple way to reset (clear) the panel instead of removing each control at a time?
|
|
|
|
|
|
tell me one thing plz,i am working on voice chat project, in this case which approch is better (for audio or vedio)
1> using win32 API
2> DirectSound
and one more thing ,our windows uses win32 APIz or DirectSound,thanks
|
|
|
|
|
|
thanks for ur reply, plz tell me windows uses win32 APIz or DirectX for audio purposes ?, and other person should have installed directsound to use my application or my exe file will not bother?.thanks
|
|
|
|
|
Hi
pakFari wrote: plz tell me windows uses win32 APIz or DirectX for audio purposes
Windows uses Win32-API. Dx was introduced as an API for games and multimedia-appz in the middle of the 1990s.
pakFari wrote: and other person should have installed directsound to use my application or my exe file will not bother?
DirectX is included in windows since Windows98. In windowsXP sp2 DirectX 9.0c and .NET 1.1 framework (in the english version, but not in the german ) is included, so everyone should run your application.
André
'A programmer ist just a tool which converts caffeine into code'
|
|
|
|
|
thankyou very much,in my system DirectX is installed but i could not add the reference of Microsoft.DirectX, it gives an error, i search in my system but could not find the DirectX.dll.plz tell me the way to add the reference of DirectX dll, once again thankx for ur reply
|
|
|
|
|
Is the DxSDK and managedDirectX successfully installed on your machine?
'A programmer ist just a tool which converts caffeine into code'
|
|
|
|
|
hi,i am using windows xp with service pack-2, i think DirectX should already exist in my system, but anyhow i installed DirectX 9 from CD. but he problem is still there.
|
|
|
|
|
|
Hi!
This may be a rookie question, but the truth is I can't do it: how do I use a C++ class in a C# project?
I have a C# project that works just fine, but I need to use a class implemented in a C++ project. I simply added the C++ project to my solution but I keep getting bulding errors. Is this the right thing to do?
|
|
|
|
|
Is your C++ class written in Managed C++? Only classes written in MC++ are accessible from C#.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello,
I'd like to know if its possible to repeat an image instead of streching it for a specified width/height (rectangle).
I tried to see if a DrawImage(...) method allowed me to do that, but to no result.
Thanks IA.
|
|
|
|
|
I'm working on a ASP.Net and C# project and want to send email through exchange server and
I only have a mailbox folder name (like "User 1") which exists on exchange server. If I send
email to "User 1" through my MS Outlook it works fine but I don't know how to obtain email
address of "User 1" from exchange server from my ASP.Net, C# application.
Can anyone post sample code or give some direction to resolve this issue.
Any help will be appreciated.
sdh01
|
|
|
|
|
I m Displaying an instance of independent form as modally mean with ShowDialog() method in the child of a Prent Form. i want to make the displayed modal Showdialog Form notmoveable(normally we move a dialog box with help of mouse click and drag the dialog changing its location). I want to keep the location of the dialog fix. Or in other word i want to limitize its location within a specied Area. How to achieve this purpose. Please help me.
Thnx in Advance.
ParentForm p;
ChildForm c;
IndependentForm inf;
Parent Form Loads(){
c.show();
}
// now there is an instance of independent form that gets displayed when we click a button on theChildForm Instance;
on click(.. ...){
inf.ShowDialog(this);
}
// Now the problem is i want to limitize the or fix its location{Location of inf.ShowDialog(this)} making it not dragable or only dragable within specied coordnates;
|
|
|
|
|
I also have same requirement...
sejal
|
|
|
|
|
Hi,
I have made a windows application in C#. The problem is that when i maximize the form, the controls on the form dont resize. How can i make them resize when i maximize or resize the main form?
|
|
|
|
|
Give the Anchor property a value, In the side that you want it to be fit to.
"Praying." Is this only what I can do for him ?
|
|
|
|
|
Hi,
i need to work with an unmanaged dll and in each function i want to use i have a struct as parameter. The layout of this struct is given in a c header file, but i'm not sure how to get this working in c# Here is apart of the struct:
<code>
struct _stEgControl
{
struct _stEgData *pstEgData;
wchar_t *pszCommName;
void *pvEgVideoBufferAddress;
void *hEyegaze;
}
</code>
Question 1:
this struct inside my struct is rededined by me in a class with the same way. I'm not sure if this i right:
<br />
[MarshalAs(UnmanagedType.LPStruct)]<br />
public _stEgData *pstEgData;<br />
Question 2:
there is no wide character in c#. can i use a char?
Question 3:
how i have to work with this void* ? How do i manage this in my class ?
could it be in this way:
<br />
[MarshalAs(UnmanagedType.FunctionPtr)]<br />
public void *pvEgVideoBufferAddress;<br />
Thanks for help.
Frank
|
|
|
|
|
when i write the following line an error occur “ type or namespace does not occur”
using Microsoft.DirectX;
using Microsoft.DirectX.DirectSound;
plz give me the solution I will be thankful to u
|
|
|
|