|
Thanks a lot...
That worked...I have written a class derived from label...
|
|
|
|
|
Hi all,
I have this code that loads-up some plugins(dll files), and I'm having trouble executing them.
Every plugin has a ExecutePlugin(string Commands) method defined.
So when I wan't to execute all of my plugins from my main program I have this code:
foreach ( Type DllType in Plugins )
{
ICowPlugin Plugin = (ICowPlugin) Activator.CreateInstance ( DllType );
Plugin.ExecutePlugin ( "Plugins rox" );
MessageBox.Show ( Plugin.PluginName );
}
and strange is that the MessageBox.Show(Plugin.PluginName); indeed shows the name of the plugin, but code inside of ExecutePlugin() is aparently not executed.
I have a simple MessageBox.Show() inside the plugin's ExecutePlugin and the message box is not shown
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Try debugging your application. Put a breakpoint on the Plugin.ExecutePlugin statement, as well as on the first statement in the implementation of ICowPlugin.ExecutePlugin . As long as all your assemblies are compiled with the DEBUG preproc def (i.e., a Debug build) and loaded into your solution, you should have no problem determining if the method is actually executed (and it should be if no exception is being thrown, which doesn't seem to be the case since the next statement is executed) and if something is going wrong inside the method. An exception might be thrown in the implementation that you're also catching and returning from, so maybe you're not getting the results you want. Debugging this method will help determine the cause of the problem.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi, Im relativlly new to C#, so I dont really know what to look for.
THe method aparently works just fine and is "error-less" becouse when I compiled the plugin the compiller didn't return me any warnings or errors.
THe ExecutePlugin inside the plugin looksliek this:
public void ExecutePlugin ( string Commands )
{
MessageBox.Show ( Commands, PluginName );
}
and liek I said I cen get the PluginName property inside my main programm, but the messagebox dosen't show ...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I am just starting out with C# and want to know how can I tell what kinda of project the code was started from by looking at the code. and by project I mean when you create a new project, from the wizard....
Thanks
Ralph
|
|
|
|
|
Mostly, look at the class that's generated. If it extends System.Windows.Forms.Form , is most likely a Windows Forms property. If it inherits from System.Windows.Forms.UserControl is a user control project. If it just includes a static Main method and not much else, it's probably a console application. If you have a bunch of web forms (.aspx files) then you've got a web project. The best thing you can do is just start playing around with the different types and see what's generated, as well as read some of the articles in the .NET Framework SDK. There's also samples and tutorials out there.
Also, don't forget that CodeProject is a great resource and has many articles that often go in-depth into the technologies they target such as Windows Forms or ASP.NET.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I have to change my report at runtime
how to I can do it?
(I use CrystalReport 9)
please help me.
|
|
|
|
|
Define "change". If you mean change the layout, the ReportDocument has a property, ReportDefinition , that gets you the collection of sections, etc. I'm not sure how much of this you can change at runtime, but you might be better off asking in the Crystal Reports forums at http://support.businessobjects.com/forums/default.asp?ref=devzone_main[^].
If you mean to change the data source on which to report, see the ReportDocument.SetDataSource method. Designing your reports to use disconnected DataSet objects (especially strongly-typed ones that you can build report defintions from) makes reusing your reports on different systems and with different database easy!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi
We have an MDI application, where we would like to limit the possible locations of the MDI child forms.
Is it possible to set up some kind of borders that limit child location to some part of the client area?
Currently we simply move the form back inside the borders if it dragged outside of the borders. Unfortunately, this has some sideeffects (e.g. client form can be moved far outside the borders before the moved event is raised)
BTW: Is it possible to disable the scroll bars that appears on a MDI parent?
Thanks, Mads
|
|
|
|
|
Yes, you can fix the Child form location MDI form.
You have to set the following properties in Child form
Form Location
Form Border = none
Control box= false
MaxBotton=false
MinBotton=false
Window Startup position=normal
Regards,
Amal
amal_forum@hotmail.com
|
|
|
|
|
Thanks for your reply - but wouldn't that make the form unmoveable? What we want is to be able to move the form around within a limited area.
|
|
|
|
|
You can set the child form boundry in Child form MOVE event.
Regards,
Amal
amal_forum@hotmail.com
|
|
|
|
|
Hi, I want to ask if there is in .NET an similar technology to the Java Applet/Servlet. And if such a thing exists pls help me with some documentation resources.
Thanks a lot.
|
|
|
|
|
refer the following URLs
www.gotdotnet.com/team/compare
http://java.oreilly.com/news/farley_0800.html
Regards,
Amal
amal_forum@hotmail.com
|
|
|
|
|
I wrote an article a long time back on another site that I'm working on porting to CodeProject as a new series. See http://www.devhood.com/Tutorials/tutorial_details.aspx?tutorial_id=388[^] for more information about hosting .NET controls in a web page. If exposed as COM control correctly (which the articles covers), you can even script them and handle events.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
|
How to read the current selected or clicked grid cell value as well as the whole row to which that cell belongs ?
Appreciate your help.
MSG: Life is whole learning experience.
|
|
|
|
|
Overriden CurentCellChanged event or :
dg[dg.CurrentCell.RowNumber,dg.CurrentCell.ColumnNumber]
Mazy
No sig. available now.
|
|
|
|
|
Thanks, Got it ..
Here it's:
.
.
MessageBox.Show((datagridBrowse[i,j])ToString());
.
.
Many Thanks 44.
Life is whole learning experience..
|
|
|
|
|
hi
i am currently writing an application where the user can save as much as he wants
those are splitted in A[] and B[] (String[])
a contains A name and B contains a path related to the name of A
i want that A will be shown in a listbox (all A's) and when you click on it i want a messagebox showing A and B together (the right one, e.g. A[5] and B[5]; not A[4] and B[2] or so)
i am open for all ways of saving, but i do not have an own idea how i can make this
thx
|
|
|
|
|
You can create a serialize class and encapsualte your class there and store your data in a XML file,for working with XML there are lots of projects in this site. Or if you do not want to store it in a XML,you can store that class in dat file.
Mazy
No sig. available now.
|
|
|
|
|
1) You can use a ListView instead of the ListBox, and store the path (B) in the .Tag property of each ListViewEntry. When you click a name (A), you can read the path from the Tag property:
for(int n=0; n
|
|
|
|
|
I have a windows application which has a lot of controls placed all over the screen. I have developed it in screen resolution of 1024 X 768.
The problem is that when the resolution becomes more, the controls occupy lesser space on the screen with lot of free area. If the resolution decreases, each control requires more space on the screen and many controls go out of the screen with scroll bars being displayed.
Is there a way of dynamically resizing the form controls based on the resolution of Windows?
Koos
|
|
|
|
|
First: There are many applications that they fir for one resolution and warn it before run. But beyond that after your InitializeComponent() add a method that set the methods based on this resolution. You can get the resolution with SystemInformation.VirtualScreen property,and every control has its own Size property.
Mazy
No sig. available now.
|
|
|
|
|
In addition to what Mazdak was talking about, you can also make use of the Dock property that most of the controls expose. Effective docking can help decrease those problems. If you're not starting with a clean surface, though, pay close attention to the order in which controls are added to the container's (ex: Form ) Controls collectoin. They must be added in reverse order. For instance, if you have the "explorer layout" like so:
+-+---+
| | |
| | |
+-+---+ , you'll want a TreeView , Panel (to further dock additional controls), or some other control set to <cod>DockStyle.Left, then a splitter, then another control with DockStyle.Fill . The order in which these are added are in reverse of how I mentioned them:
Controls.AddRange(new Control[]
{
panel2,
splitter1,
panel1
}); When you add these controls to the designer for the first time (i.e., on a "clean surface"), add them in the order that I first mentioned above. VS.NET automatically adds the most recently added control as the first control in the array above.
Just play around with docking a little bit. Anchoring to opposing sides is also helpful but while docking and anchoring share some behavior in common, they are also used to solve distinct problems (they are most like each other when anchoring against opposing and adjacent sides, but docking can't move a control relative to adjacent sides).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|