473,404 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Converting Borland C++ app to C# (question about Button type)

I'm trying to convert a Borland C++ app to C#

Borland C++ has 3 types of buttons:
TButton, TBitBtn and TSpeedbutton

TSpeedbutton has 'Down' and 'GroupIndex' properties.

The 'Down' state is useful for controlling the button up/down
state from say a timer event.

The 'GroupIndex' allows a group of SpeedButtons to act like
radio buttons. A value of 0 switches this feature off.

C# doesn't seem to have anything like this.

Does anyone know how I can access these features?

-JB
Dec 19 '06 #1
5 2762
Hello Jungle,
>Borland C++ has 3 types of buttons:
TButton, TBitBtn and TSpeedbutton
These are controls that Borland created themselves, they are not part of
the .NET framework.

The standard Button control in the .NET Framework can show an image, but I
don't think it has an equivalent of the Down or GroupIndex properties. You
might want to look into one of the available third party control packages,
there's an abundance of these and most can probably satisfy your
requirements.
Oliver Sturm
--
http://www.sturmnet.org/blog
Dec 19 '06 #2
Hi,

It's not C# it's the framework that do not have those classes.

Do you need those extra features?

Otherwise just use the "regular" Button , you will need to rewrite some more
code though (but I see no way to avoid that anyway)
--
Ignacio Machin
machin AT laceupsolutions com

"Jungle Boy" <jungle.boy(AT)btconnect.comwrote in message
news:2I*********************@bt.com...
I'm trying to convert a Borland C++ app to C#

Borland C++ has 3 types of buttons:
TButton, TBitBtn and TSpeedbutton

TSpeedbutton has 'Down' and 'GroupIndex' properties.

The 'Down' state is useful for controlling the button up/down
state from say a timer event.

The 'GroupIndex' allows a group of SpeedButtons to act like
radio buttons. A value of 0 switches this feature off.

C# doesn't seem to have anything like this.

Does anyone know how I can access these features?

-JB


Dec 19 '06 #3
Hello JB,
The 'Down' state is useful for controlling the button up/down
state from say a timer event.
The 'GroupIndex' allows a group of SpeedButtons to act like
radio buttons. A value of 0 switches this feature off.
C# doesn't seem to have anything like this.
True, there isn't a one-to-one mapping in these features between OWL
(Borland C++) or VCL (Borland C++Builder) and C#/WinForms.

However, .NET's ToolStrip container and its ToolStripButtons have a property
called Checked (and the linked CheckedState property) that is essentially
the same as your TSpeedButton's Down property. Yes, the button doesn't go
"down", but instead changes color, which is the modern Windows convention to
the older 90s convention/visualization used by Borland C++.

Now, GroupIndex is something I think you cannot do without coding, at least
from the top of my head. However, creating a group of ToolStripButtons that
would act as a group is almost trivial. In fact, you might wish to inherit
your own buttons from ToolStripButton, which could have this feature
implemented "built-in".

Hope this helps.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Dec 19 '06 #4
Jungle Boy (AT) wrote:
I'm trying to convert a Borland C++ app to C#

Borland C++ has 3 types of buttons:
TButton, TBitBtn and TSpeedbutton

TSpeedbutton has 'Down' and 'GroupIndex' properties.

The 'Down' state is useful for controlling the button up/down
state from say a timer event.

The 'GroupIndex' allows a group of SpeedButtons to act like
radio buttons. A value of 0 switches this feature off.
Can't you use RadioButtons and set their Appearance property to Button?
If you put them inside a GroupBox, doesn't that give you the
functionality you need?

Dec 19 '06 #5
Thanks for all your suggestions.
I'll give them a try.
-JB
Dec 19 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Vladimir Perkic | last post by:
Hi everybody! Does anybody know why Borland C++ 5.5 reports errors at line: CreateWindow ("button", "One", WS_CHILD| WS_VISIBLE| BS_PUSHBUTTON, 20, 8, 75, 25, hwnd, (HMENU)IDBT_ONE, hInst,...
5
by: Steven O. | last post by:
First, sorry if by some chance I am not posting to the correct newsgroups, these seemed to be the most applicable to my question (see disclaimer at end of post for further comments....). Started...
1
by: Nimmi Srivastav | last post by:
There's a rather nondescript book called "Using Borland C++" by Lee and Mark Atkinson (Que Corporation) which presents an excellent discussion of overloaded new and delete operators. In fact there...
11
by: Chris Online | last post by:
Hi all, I'm using C++ Builder5. I want to get data from an edit-box and send it to a development kit. The dev-kit can only receive char and no char* here's a part of my code: char* Data_byte...
1
by: Andreas Horneff | last post by:
Hi @ all, I've got a problem with serial communication in Borland C++ Builder. I've already found a lot of stuff about serial communication in the internet, but it dosen't work. What I want...
1
by: jeromeg | last post by:
Hi to all, I am working with Borland c++ 6 on XP I use a form which is not MODAL. In this form, users can type characters in a TEdit component. But when they type some characters which are...
17
by: Fabry | last post by:
Hi All, I'm new of this group and I do not know if this is the correct group for my question. I have a DLL with its export library (.lib) wrote in Borland C++ 6. In borland everything is OK and...
3
by: Delfry | last post by:
Hello! That's the my (I guess quite lame) question: I use a Speedbuttons formed in a group and I cant figure out how to make them change their appearance once they are pressed. I mean there are...
9
by: ssubbarayan | last post by:
Hi all, I am trying a program to convert floating point values to a byte array and printing the same to the screen.The idea behind this is we already have an existing function which can do byte...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.