|
|
Thanks,
But I see this link.
I tested and some properties doesn't exist from my request.
If you know a link where I can find more samples it is great even if I must to buy.
Best regards
youssef
|
|
|
|
|
Look, you're not going to find such a complex control for free! Either buy one, or read the Platform SDK and .NET Framework SDK about Windows Common Controls, Windows messages, Windows Forms, and either make your own or enhance the existing ListView or controls like the one I gave you a link for. It's not a simple project to throw something like this together and if you're just ripping off other people's source you'll never learn anything. There's plenty of examples out there to give you a good start. Learning what it all means and how to add to it is up to you.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
|
Hey
When i select somthing from the listView the selected item becomes gray. Is there any funktion that could change the color of the selcted item, maby transparent?
Or do i have to override selected in the listView?
//Jimmy
|
|
|
|
|
If ListView.HideSelection is set to false (default), the gray background is not drawn when an item is selected and the ListView does not have the focus.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Okay but it needs to be focus becourse this item i select will display info about it self in a label.
When i moves the mouse pointer over the items, the label folows the mouse and display the item. but if i click on an item then the label will dispare, and the selected item will be gray.
I whant to change so the selected color is not gray, i most have the slect mothod becourse i have a drag and drop on this items.
I want also that the label will be shown even when i click on an item.
//Jimmy
|
|
|
|
|
So set the focus to the ListView using the Focus method. The gray is because the ListView doesn't have focus when you programmatically select an item. The item is still selected even if HideSelection is true , it just doesn't show a background (i.e., it's "transparent"). You really should read the ListView class documentation for these properties and methods, and should for the rest as well.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
How can i call a Java code from C# code
|
|
|
|
|
Yes, but not easily. One way is through JNI (Java Native Interfaces), which I discuss in my article Hosting .NET Controls in Java[^] (and older article is posted here on CodeProject but doesn't include Java-calling code like the article above does).
There are also many products out there that generate proxies that allow you to call these directly. There's another article at DevX about some products, Calling Java Classes Directly from .NET[^].
A quick search on google would've turned up these and many others.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
table containing two fields one is code and another is name. i need to fetch repeated names only.(more than one occurance of name and code is not same). any one help to me. thanks in advance.
Have A Nice Day!
Murali.M
Have A Nice Day!
Murali.M
|
|
|
|
|
How about this: SELECT code, name FROM table GROUP BY code, name HAVING COUNT(*) >= 2
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Ooops, sorry, I didn't notice that you posted this in three different forums and already received a response.
Oh, and SQL questions should, by and large, be submitted in the SQL forum.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Can C# Control Serial Port?
Which class in .NET Framework is for SerialPort Communicate Programming?
thanks a lot.
|
|
|
|
|
For low level communication you can write to the virtual file "COM1".
|
|
|
|
|
Dear Corinna John
Can you explain for detail how to write to the virtual file "COM1"
in c#?
Thanks a lot!
|
|
|
|
|
Usually you open a file with the name of the serial port (COM[x]). The file doesn't exist in the file system. Whatever you write to the "file" will be sent to the serial port, messages from the device can be read from that virtual file.
FileStream fs = new FileStream("COM1", FileMode.OpenOrCreate);<br />
fs.Write(...);<br />
fs.Flush();<br />
It worked with other languages, I think it should also work with .NET
|
|
|
|
|
Can you do that with (LPT1)?
/\ |_ E X E GG
|
|
|
|
|
As far as I know, you can do that with every port.
|
|
|
|
|
Hi there
I want to open a child form from a dialog form (.ShowDialog)
and after the child form shows i want to close the dialog form.
In the Dialog form there are 2 buttons:
1) btnclose which closes the dialog form
2) btnOpenChild which opens a child form and then closes itself (the dialog form)
What should i do to get my desired result?
I have included the codes to all the forms so that it may
become easier to understand what i want to do.
I am a total newbie, so plz do bare with me!
Any help will be gr8!
Thanks in Advance
VisionTec
******************************
Form1 ( Main MDI Parent Form )
******************************
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WindowsApplication1
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnChild;
private System.Windows.Forms.Button btnDialog;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.btnChild = new System.Windows.Forms.Button();
this.btnDialog = new System.Windows.Forms.Button();
this.SuspendLayout();
this.btnChild.Location = new System.Drawing.Point(72, 112);
this.btnChild.Name = "btnChild";
this.btnChild.TabIndex = 1;
this.btnChild.Text = "open child";
this.btnChild.Click += new System.EventHandler(this.btnChild_Click);
this.btnDialog.Location = new System.Drawing.Point(208, 112);
this.btnDialog.Name = "btnDialog";
this.btnDialog.TabIndex = 2;
this.btnDialog.Text = "open dialog";
this.btnDialog.Click += new System.EventHandler(this.btnDialog_Click);
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(408, 413);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.btnDialog,
this.btnChild});
this.IsMdiContainer = true;
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void btnChild_Click(object sender, System.EventArgs e)
{
WindowsApplication1.frmChild child = new WindowsApplication1.frmChild(this);
child.Show();
}
private void btnDialog_Click(object sender, System.EventArgs e)
{
WindowsApplication1.frmDialog dialog = new WindowsApplication1.frmDialog();
dialog.ShowDialog();
}
}
}
*************************
frmDialog ( Dialog Form )
*************************
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsApplication1
{
public class frmDialog : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOpenChild;
private System.ComponentModel.Container components = null;
public frmDialog()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.btnClose = new System.Windows.Forms.Button();
this.btnOpenChild = new System.Windows.Forms.Button();
this.SuspendLayout();
this.btnClose.Location = new System.Drawing.Point(32, 96);
this.btnClose.Name = "btnClose";
this.btnClose.TabIndex = 0;
this.btnClose.Text = "Close";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
this.btnOpenChild.Location = new System.Drawing.Point(152, 96);
this.btnOpenChild.Name = "btnOpenChild";
this.btnOpenChild.TabIndex = 1;
this.btnOpenChild.Text = "open child";
this.btnOpenChild.Click += new System.EventHandler(this.btnOpenChild_Click);
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.btnOpenChild,
this.btnClose});
this.Name = "frmDialog";
this.Text = "frmDialog";
this.ResumeLayout(false);
}
#endregion
private void btnClose_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void btnOpenChild_Click(object sender, System.EventArgs e)
{
}
}
}
***********************
frmChild ( child form )
***********************
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsApplication1
{
public class frmChild : System.Windows.Forms.Form
{
private System.ComponentModel.Container components = null;
public frmChild(WindowsApplication1.Form1 parent)
{
InitializeComponent();
this.MdiParent = parent;
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.Size = new System.Drawing.Size(300,300);
this.Text = "frmChild";
}
#endregion
}
}
}
|
|
|
|
|
Well...I could not get your stuff to run (I think you forgot to paste the InitializeComponent() methods), so take this all with a grain of salt.
You could just handle the closed event on your dialog form. Change / add this to form1
private void button2_Click(object sender, System.EventArgs e)
{
WindowsApplication1.frmDialog dialog = new WindowsApplication1.frmDialog();
dialog.Closed += new EventHandler (vShowChild);
dialog.ShowDialog();
}
private void vShowChild(object sender, EventArgs e)
{
WindowsApplication1.frmChild child = new WindowsApplication1.frmChild(this);
child.Show();
}
Then just close the dialog:
private void button1_Click(object sender, System.EventArgs e)
{
this.Close();
}
Hope this helps,
Bill
|
|
|
|
|
Hi there
Thanks for the help
but i actually want the child form to load
when the user wants it to.
so i have added another button to the Dialog form.
i have updated the code on the discussions board
and also uploaded the source code to my website:
http://www.geocities.com/talhatec/downloads/WindowsApplication1.cab[^]
the code is only 14K
plz help me once again!
VisionTec ( TEC )
|
|
|
|
|
|
i am using Linux and i want to ask how can i record the sound from sound card, say 5 seconds, by using C.
is there a major difference between C and C#
suki
|
|
|
|
|
Yes. Not only are they different languagues, they run on entirely different runtimes. Currently, C# (and all .NET, since all .NET languages compile down to Intermediate Language (IL)) is barely supported on linux through the Mono project.
For more information about .NET and what you can't do on linux, see http://msdn.microsoft.com/netframework/[^].
And if you tried this in Windows, you'd best try Managed DirectX and the Microsoft.DirectX.DirectSound.Capture class.
Microsoft MVP, Visual C#
My Articles
|
|
|
|