PDA

View Full Version : visual c++ form example:)



Lionheart008
24-04-2009, 22:46
Hi all...

I have created a small visual "form" c++ example ... my first one at all in my short life ;) !

I have used visual c++ express edition 2005 :) haven't the actual 2008 version... too big for my notebook... and code blocks I don't yet understand or I have to use an extra compiler for it... no idea how to handle this... so I go the easier way with visual c++ :)

my idea was to build a "dll", or a simple library (by wizzard gui), googled for this term and have found something around this theme... but it was easier to create this little form for me ;) I wanted to know how does it all works... my knowledge was (is still!) very low about these things...

it's just a simple example for me to see what things happen when I am building such a little form dialogue... it's only a dummy form dialogue and a test for me...

I will try to follow this idea with dll to create such interesting stuff beside thinbasic or I can use it also with thinbasic... don't know... it's a lot of new things to check, but I was eager to see how I can build some day an own dll or library or new thinbasic modules... ??? (must laugh)... :D

qt: perhaps anybody can tell me how to create a simple *.dll with visual c++ (2005 express edition)... ??? Or a link to an example how to make it... ;) Something I have done wrong with the select window to create it or I can only select the win32 form icon...???

=> it's possible to make a new own thread with add-ons or plugins or libraries or dll's for thinbasic material and examples ??? And would be nice to get here also some help... ? ;)

that's all for today... Ciao, Lionheart

ps: the "checker" exe I have add as attachment ...
pps: don't know where I can place this 'thinbasic free' post.. so I did it here ;) ...

kryton9
26-04-2009, 06:23
Hi Frank, sorry I didn't get on the forums till after midnight my time Saturday Night / Sunday Morning.
The form designer in Visual Studio is really wonderful.

This page has a nice tutorial if you scroll down about creating a dll in the VS2008 express:
http://forums.techguy.org/software-development/777112-how-create-dll-visual-c.html

For Code::Blocks, you will need to setup which compiler you want to use Frank. Since you are playing with Forms, Visual Studio will be easier.
To use forms in Code Blocks you need to install a UI module, like wxwidgets or QT... not easy, so don't recommend going this route.

Michael Hartlef
26-04-2009, 20:45
Is this a post about a 3rd party tool for thinbasic? If not, please post it in a OTHER language section.

http://community.thinbasic.com/index.php?board=107.0

Lionheart008
29-04-2009, 08:23
hi michael, all...

yes, of course, if it's possible (eros or somebody else)... can you move these posts to

http://community.thinbasic.com/index.php?board=107.0

thank you, best regards, Lionheart

Lionheart008
29-04-2009, 16:32
hi, anybody has an idea how to implement here a correct formula???
same thing: have built it with visual c++ 2005 express edition ;)


private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e)
{
// some formula input like
// fahrenheit = ((celsius * 9) / 5) + 32
//
double celsius;
double fahrenheit;

celsius = Convert.ToDouble(textBox1.Text);

fahrenheit = ((celsius * 9) / 5) + 32;

textBox2.Text = Convert.ToString(fahrenheit);

}

my formula gives an error output with last 'double celsius' and more lines... ;(

ciao, Lionheart
Ps: the calculator example I add here... I have managed to make a message box :D !
pps: anybody out there how also has fun with coding in visual c ++ ???

Lionheart008
29-04-2009, 20:33
:D

ready to take off... my first running visual c++ example, calculating 'celsius to fahrenheit'.. wasn't so easy to find the solution... but I have clashed the wall ;)

I am proud of it ! :occasion:

solution looks like this one:

textBox2->Text = (((Convert::ToDouble(textBox1->Text) * 9) / 5.0) + 32).ToString();

ciao, Lionheart
this day is my friend :)

kryton9
01-05-2009, 05:01
Your program knows me Frank, it knows I am not a member of the xmen :)

Lionheart008
01-05-2009, 10:22
:D

hi kent, now I have an imagine what hard work must be to program applications like windows, thinbasic, lightwave, visual c++ and linux based other languages... :comp1:

it was a personal task for me how the visual c++ code must look like to show such a little gadget... uaargh :)

have a nice day, not everybody can take part to the x-men membership... must laugh :D

see you, Lionheart