electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » DIY Hardware and Software » Developers' Corner
Array of ComboBoxes in .NET
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Wed May 19, 2010 4:19 am    Post subject: Array of ComboBoxes in .NET Reply with quote  Mark this post and the followings unread

Someone was looking for a "simple" way to dynamically build an arbitrary number of ComboBoxes in .NET and use them in an array. Be glad to answer any remaining questions.

I will note that one either has to have a single event handler and a switch in the handler method to process individual combos as is done here (to demonstrate how to do it that way) or one must create an event method for each combo and assign a handler for it.


form1.JPG
 Description:
 Filesize:  44.91 KB
 Viewed:  356 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

form1.JPG



CSharpCBXarray.JPG
 Description:
 Filesize:  130.42 KB
 Viewed:  361 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

CSharpCBXarray.JPG



_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
v-un-v
Janitor
Janitor


Joined: May 16, 2005
Posts: 8932
Location: Birmingham, England, UK
Audio files: 11
G2 patch files: 1

PostPosted: Wed May 19, 2010 5:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Why don't you use Mono instead of .NET?

Mono is cross platform. dotnet is afaik, a closed framework.

http://www.mono-project.com/Main_Page

_________________
ACHTUNG!
ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS!
DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKSEN.
IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS.
ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
Back to top
View user's profile Send private message Send e-mail
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Wed May 19, 2010 5:59 am    Post subject: Reply with quote  Mark this post and the followings unread

v-un-v wrote:
Why don't you use Mono instead of .NET?

Mono is cross platform. dotnet is afaik, a closed framework.

http://www.mono-project.com/Main_Page


.NET actually is an open platform but M$ is not likely to advance it that way for $$$$ reasons.

1) I did not think Mono mature enough when I looked at it a year ago. And in Mono's case migration is a relatively trivial exercise. As my projects are open source that can be done by anyone at the time of their choosing.

2) Mono Tools for Visual Studio cost $99.00 and AFAIK only works with M$ VS-Pro at $799.00 and my goal was to creat a project that one could engage at no cost and M$'s C# Express fits that bill. MonoDevelop is free but doesn't make me want to leave VS...yet.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
v-un-v
Janitor
Janitor


Joined: May 16, 2005
Posts: 8932
Location: Birmingham, England, UK
Audio files: 11
G2 patch files: 1

PostPosted: Wed May 19, 2010 8:16 am    Post subject: Reply with quote  Mark this post and the followings unread

bachus wrote:

1) I did not think Mono mature enough when I looked at it a year ago.


Hmm, Unity don't appear to think so.

http://unity3d.com/

bachus wrote:
As my projects are open source that can be done by anyone at the time of their choosing.


Just as long as you've paid $$$ for a copy of Windows? Wink

_________________
ACHTUNG!
ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS!
DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKSEN.
IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS.
ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
Back to top
View user's profile Send private message Send e-mail
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Wed May 19, 2010 8:24 am    Post subject: Reply with quote  Mark this post and the followings unread

Bachus! Thank you.

I am the culprit here...

First, what this has to do with electronic music:

I design digital synthesizers for FPGAs. These synths do not have physical front panels. Instead, I have been writing patch editors in VB.NET using the _free_ Visual Studio Express Edition from Microsoft (and yes, it's legitimately free, not a hack/crack job). This version of VS.NET has everything I need to make this happen, so I have no need to deviate from .NET.

Some of the patch editors require many repetitions of the same controls arranged in rows. For example, I have a sine synth that has 32 sine oscillators. I wrote a patch editor that has slider controls for level, portamento, fine tuning, etc. It was painful to add each of the 32 sliders (trackbar object) one at a time. Also, each slider has a label display below it that indicates it's numeric value. I was looking for a way to describe the rows of slider/label pairs without having to add and align each one (hours of work) and also have access to the event handlers (in this case, I think I can manage the functionality with a single handler with a "pointer" to the exact object I need manipulated).

I will look at the Bachus code and attempt to translate it into VB.NET (I can read much of C#, just not good at writing new code, I'm much more familiar with VB.NET).

Thank you for starting this thread, Bachus!

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Wed May 19, 2010 4:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

v-un-v wrote:

Just as long as you've paid $$$ for a copy of Windows? Wink


If the interest is in running on multiple platforms rather than simultaneously developing on multiple platforms that is simply not relevant because only one person with a windows set up can produce the executable for Linux--and as even you know, only one of those is needed for every one to have one. Wink

And if someone is set on parallel development -- no problem. They can take the source and load it into MonoDevelope. They just won't have that ever so sweet VS studio IDE.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham

Last edited by bachus on Wed May 19, 2010 4:13 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Wed May 19, 2010 4:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

JovianPyx wrote:
This version of VS.NET has everything I need to make this happen,


Yup, the free express editions of the .NET languages have virtually everything the Pro edition does. They just left out the automated testing facilities and advanced debugging. Over the past year I've spent more time using the express edition of C# than the VisualStudioPro version to convince my self of that. AFAICT it's the best piece of free software on the planet.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Wed May 19, 2010 4:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

bachus wrote:
AFAICT it's the best piece of free software on the planet.


I have to agree, I didn't want to download it at first thinking it would be dinky winky. A friend convinced me to give it a try, it's powerful. And for me, the output executable is fast.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use