![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Hi guys....
I decided to have it a go...but stopped right in the 1st line of code... Im trying to create a custom control using Shap-Develop... So I create the graphical control and now must do the code... 1st- what is the constructer syntax like? I have .. mycontrol obj = new mycontrol Is this correct? I2nd- Now I need to accept some args, 4 Strings and 1 Image name, how do I implement this? Thanks guys....
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
||||
|
After beeing stuck for most of the afternoon, i decided to re-install vs2005 and try in it to build my dll....
As before designing the control grafic is easy but the rest... HELP!!! OK, putting it simple.... I'm trying to build a 4 Label, 1 image user control, wich args will only be the text for the labels and the image file name, all other props are locked.... please help...I don't want anyone doing it for me, I want to understand what i'm doing....
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
||||
|
Thanks agraham....
Do i need to declare the args before the constructer? If so where?
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
||||
|
Ok, You are beeing very helpfull....
Now the dumber question... Do i need to worry about the font setting in the control properties? And one last but perhaps the more inportant to me... I'm also ading a button to the control...(It's an About Panel) shhh.....how do I implement dispose with the button click event?
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
||||
|
If you are interested in coding for the .NET Framework and don't already know about Lutz Roeders' .NET Reflector then you should.
http://www.aisto.com/roeder/dotnet/ This superb utility lets you examine almost all of the .NET Framework in the language of your choice, VB.NET, C# Delphi etc. and see how Microsoft has coded it. You can also look inside the B4PPC dlls and other .NET exes to see how they are built and what they do. Download it and in case it is not obvious press the spacebar or invoke Tools -> Disassemble to see the code for the selected assembly. There are various add-ons, of variable quality, available via a link on the download page. I like FileGenerator which will produce a VS 2005 project file set, although actually getting it to compile without errors may be a battle! |
|
||||
|
Quote:
I'm not sure what you mean but normally in .NET code you don't need to ever implement a disposal function as the .NET Garbage Collector will remove an object when there are no further references to it. Disposal is normally only needed when your code has acquired resources from outside .NET (like mallocing memory or interacting with non-managed dlls) that need to be explicitly freed. Doing this is unsafe code that should be avoided if at all possible as you are then losing the safe coding advantages of the .NET Framwork. |
|
||||
|
Calling the control will pop-up( eventaully) a Panel containing the refered fields and, beiing all of them just output fields, i need to implement a way of hidding/disposing the control...that's why I added the button, but how to implement the Hide or, preferably, the dispose upon button click?
BTW-Thanks for the link, great tool...
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
||||
|
Ok, I'm/was getting confused with the amount of files created with the basic project, but i'm starting to get a hold of things...
So I implemented 1 constructer and 1 method(?) called DLLVersion...Anad build the solution.... I tryed it out and it works....well...sort of...my constructor is there and my method along with a LOT of other things that I dont know what they are, and that i didn't create....What am i doing wrong?
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| creating chm files | Ricky D | Questions & Help Needed | 2 | 10-15-2008 11:03 AM |
| Creating process-real!!! | Byak@ | Code Samples & Tips | 6 | 10-06-2008 02:59 PM |
| Creating SIP | spectra9 | Questions & Help Needed | 2 | 05-21-2008 03:32 PM |
| Creating code faster | pmu5757 | Basic4ppc Wishlist | 0 | 04-13-2008 12:33 PM |
| Creating additional libraries | Nycran | Questions & Help Needed | 3 | 11-07-2007 05:51 AM |