|
Thanks! I will try it!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hi there
I wonder how you play sounds(mp3) in C# in a good way?
|
|
|
|
|
It's possible to control WinAmp in order to play mp3s. There is some dll which allows you to do so.
Decoding mp3s is quite difficult I think and I read that you need an expensive licence to be able to access information about the internal format of mp3s. But I'm not quite sure
But WinAmp is freeware...
|
|
|
|
|
I made a ComboDataGrid (ParentControl). When the ComboBox (ChildControl) in the DataGrid has the Focus then I want to catch any Key Events from the ComboBox.
The ComboGrid should react as follows:
When the focused cell is not the ComboBoxColumn then the DataGrid should act normal, what means when the user presses Up or Down Arrows, the Focused Row chould change.
When the focused cell is in a ComboBoxColumn then it should be possible to press Ctrl+Up or Down Arrow to scroll up and down in the ComboBox.
To solve this I need any keyEvent of the ComboBox before the DataGrid. I tried with ProcessCmdKey(), ProcessKeyEventsArgs() but could not get what I wanted.
Big Thanks for all who will reply.
Stefan
|
|
|
|
|
I made a ComboDataGrid (ParentControl). When the ComboBox (ChildControl) in the DataGrid has the Focus then I want to catch any Key Events from the ComboBox.
The ComboGrid should react as follows:
When the focused cell is not the ComboBoxColumn then the DataGrid should act normal, what means when the user presses Up or Down Arrows, the Focused Row chould change.
When the focused cell is in a ComboBoxColumn then it should be possible to press Ctrl+Up or Down Arrow to scroll up and down in the ComboBox.
To solve this I need any keyEvent of the ComboBox before the DataGrid. I tried with ProcessCmdKey(), ProcessKeyEventsArgs() but could not get what I wanted.
Big Thanks for all who will reply.
Stefan
|
|
|
|
|
I am considering taking the plunge, and designing my first full fledged application in C# (WinForms). It will have a MDI and lots of menus and right click events.
What is the best way to fully plan out my design before coding? Besides the needs and must haves of the app, is there anything else i should take into consideration?
- I will be doing most of this with Visio, along with the trusty ol' pen & paper;)
Thanks,
Steve
McLenithan
Is Bert Evil?
|
|
|
|
|
Not to be silly but why not start by writing out a few use cases?
Also, if you can, try to avoid cramming all of your code into the On_Click() etc. style event methods as it tends to make the code less extensible and reusable. Invest some time into looking at using patterns like the "Command", "Mediator", "Event-Delegate/observer".
Also, look at Marc Clifton's AAL which is posted here on codeproject.
Some MS links are
http://msdn.microsoft.com/architecture/patterns/
http://msdn.microsoft.com/architecture/community/
Misc Links
http://www.cs.mu.oz.au/~moke/
And a discussion on GotDotNet
http://www.gotdotnet.com/community/messageboard/Thread.aspx?id=83782
Hey don't worry, I can handle it. I took something. I can see things no one else can see. Why are you dressed like that?
- Jack Burton
|
|
|
|
|
|
Is there a way for a server to get the client's IP address when using standard Remoting?
"If you just say porn then you get all manner of chaff and low grade stuff." - Paul Watson, Lounge 25 Mar 03 "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?" - Anon
Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
|
|
|
|
|
uh I have this form, and then I have this form called about.cs, and I have this....
private void aboutClick(object sender, System.EventArgs e)
{
***OPEN ABOUT WINDOW HERE***
}
could somebody please fill this in... Thanksssssss.
/\ |_ E X E GG
|
|
|
|
|
What exactly are you trying to do with the Click?
Do you want to close the about window?
about.ActiveForm.Hide()
Is this where you are trying to open the about window?
Form aboutForm = new about();
aboutForm.Show();
It depends on what file the aboutClick() is in.
|
|
|
|
|
THanks... all I need was to know how to open the about form. thanks again.
/\ |_ E X E GG
|
|
|
|
|
if i lauch a child form from the main one like this:
FormOpen dlg = new FormOpen();
if (dlg.ShowDialog() == DialogResult.OK)
{
// stuff
}
how can FormOpen class gain access to member variables of the main form?
is there a method like AfxGetApp() for getting a ref to the main form?
|
|
|
|
|
You could just create a constructor for FormOpen that takes a form. That way you could just do:
FormOpen dlg = new FormOpen(this);
Then you can use the mainform just like any other object in your form.
Hope this helps,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
While creating a web component I ran into a problem with setting the properties for the Designer Property Pages.
One of my Properties can only be Top,Bottom,Left, or Right.
I want these in a listbox on the property pages. I have hunted for a way to do this, but I have been unable to find anything remotely close to the subject.
|
|
|
|
|
draco_iii wrote:
I want these in a listbox on the property pages. I have hunted for a way to do this, but I have been unable to find anything remotely close to the subject.
All you should have to do is make sure your property is defined as an Enum then the property grid will take it from there.
class MyClass
{
public enum Sides
{
Top, Bottom, Left, Right
}
private Sides sides;
....
[Browsable(true)]
public Sides Sides
{
get
{
return sides;
}
set
{
sides = value;
}
}
...
} Maybe I just didn't understand the question, because it sounds like you have something similar to this already.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
I wanted to thank you so very much. That was right on target, I had something very similar, but was missing the "enum" contructions that allowed it to work properly.
Again, thank you very much, I searched for hours yesterday, but to no avail.
|
|
|
|
|
Hi!
I want to create my own control to display icons of images. My control inherits from a listbox. One row of images belongs to a group. How can I force C# to use a fixed number of columns for the items of a listbox?
Thanks
Jimmy
|
|
|
|
|
Can anyone point me in the right direction to take a group of files and ZIP them together? I am not looking for a component ... there should be something built into the .NET Framework for file compression, right?
I am struggling at finding information ... please help.
Wally Atkins Newport News, VA, USA
|
|
|
|
|
There are no compression streams built into the .NET framework. If you are looking to just combine the files into one big file, then you can just open each file and copy the bytes from them into one file. You will need to do something so that you can tell when one stops though and another begins.
Hope this helps,
Nathan
P.S. I do know of a library for .NET compression but you said you don't want it.
D2F3U wrote:
I am not looking for a component ...
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
Take a look at this GPL (open-source) zip library, called SharpZipLib[^].
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Heh, that's where I would've sent him had he asked for it... Maybe I took his quote about not wanting a component to literally. But SharpZipLib is a great library...
anyway, I think I am too bored, cause I am posting this useless message...
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
Hi, i need to create a listbox from a database, which should display the name of a field and have the row id hidden, that i can "see" to manipulate the database table.
|
|
|
|
|
There are a few ways of going about this, one is with a DataSet/DataTable the other is using a custom class.
With a DataSet:
Set the listbox's DisplayMember and ValueMember properties to the name of the fields in the DataTable (if using a DataSet prefix them with the name of the table), then set the DataSource property to the instance of the DataSet or DataTable . With a custom class:
First define your custom class
public class MyData
{
private int id;
public string theField;
public MyData(int id, string theField)
{
this.id = id;
this.theField = theField;
}
public int ID
{
get { return id; }
}
public string TheField
{
get { return theField; }
set { theField = value; }
}
} Now on the ListBox , set the ValueMember to "ID" and the DisplayMember to "TheField". Once you have a collection of MyData objects (an Array or ArrayList or something that implements IList which returns instances of MyData ) assign that collection to the DataSource property of the ListBox.
MyData [] data = new MyData[3];
data[0] = new MyData(0, "Huey");
data[1] = new MyData(1, "Dewy");
data[2] = new MyData(2, "Louie");
myListBox.DisplayMember = "TheField";
myListBox.ValueMember = "ID";
myListBox.DataSource = data; HTH,
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
hi,
if i understand this rigth in a listbox i can have a field to be displayed and a value "linked" to that field.
what i did was:
public class BaseDados
{
public DataTable doquery(string query)
{
OleDbDataAdapter DataAdapter = new OleDbDataAdapter(query, connectionString);
DataSet dataSet = new DataSet();
DataAdapter.Fill(dataSet, "Same");
DataTable dataTable = dataSet.Tables[0];
return dataTable;
}
}
and in the class of the form where is my listbox i put:
BaseDados db = new BaseDados();
DataTable table = db.doquery("Select * from autenticacao");
listBoxOrigem.DisplayMember = "email";
listBoxOrigem.ValueMember = "id";
listBoxOrigem.DataSource = table;
|
|
|
|