|
can we make a label or linkLabel Transparent? like we do with the forms?
sorry for my bad English.
|
|
|
|
|
You english is fine.
Maybe you can set the background color to transparent, or opacity percentage. I'm not sure....but that may be something to check.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
I am currently writing a DLL which will import records. I have an abstract class from which I have created a number of child classes. In the abstract base class I have declared the delegate and event as follows, which is basically to tell the calling client when a record has been imported:
public delegate void BtEventHandler();<br />
public event BtEventHandler RecordImported;
But when I place the following in the function of the child class that imports some data like so:
if ( RecordImported != null )<br />
{ <br />
RecordImported();<br />
}
I get the following compilation error:
... can only appear on the left hand side or += or -= (except when used from within the type [myBaseClass]
Is it possible to declare an event within a base abstract class and raise the events back to the calling client? If so what do I do? If not surely I don't have to put the same event in every child class!!!
|
|
|
|
|
You need to declare a protected virtual method called OnEventName in the base class, which raises the event. Derived classes can then call this method to raise the event, or override it to intercept the event.
Also, Event handler delegates should always take two arguments - an object and a class derived from EventArgs .
For example:
public abstract class MyBaseClass
{
public delegate void BtEventHandler(object sender, EventArgs e);
public event BtEventHandler RecordImported;
protected virtual void OnRecordImported(EventArgs e)
{
if (null != RecordImported)
{
try
{
RecordImported(this, e);
}
catch
{
}
}
}
}
public class MyDerivedClass : MyBaseClass
{
public void ImportRecord()
{
OnRecordImported(EventArgs.Empty);
}
protected override void OnRecordImported(EventArgs e)
{
Console.WriteLine("Intercepted the RecordImported event");
base.OnRecordImported(e);
}
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
I have c# dll. How can I know when it is loaded and unloaded by application. My application can be in any like C#,vb.net,vb,excel etc.
|
|
|
|
|
I have a trouble with my pretty big DataTable with 400 columns. Suddenly adding these columns becames very slow (5min instead of 0,5s). May be someone know what's happend?
DataTable is empty while adding, has primary key and view sort defined and initially 6 columns. It contains to DataSet with some tables with data and have no relations. I don't remember any change in this part of code but this may be Alzheimer.
Hi,
AW
|
|
|
|
|
Solved. If DataTable is displayed in DataGrid time to modify it is terribly long
Hi,
AW
|
|
|
|
|
Hi all,
i've got a really irritating problem that is probably something very simple but is driving me crazy for some time now. I have a form with a tab control containing several tab pages. On each tab page there is a panel. On the panels i have some graphics and several combo boxes at different locations. the panels are also scrollable.
My problem is every time i click on a combo box that is not in view before scrolling down the form seems to invalidate itself and redraw so that the drop down list of the combo box is in the center of the screen. Is there some property which i've missed that can be set to avoid this????
Basically when i click on a combo box i want it to display the drop down list at the location its currently at and not redraw the whole form so its centered.
Any advice is VERY welcome,
Thanks
Paul
Paul Griffin
|
|
|
|
|
well looking at the following code :
[System.Runtime.InteropServices.DllImport("kernel32")]<br />
private static extern int Beep(int dwFreq, int dwDuration);
the code above..is typicall...but i guess my question here is how do i know what in the world i can import from kernel32 or other system dlls.....and how do i know the overloads for the things that im importing. is there documents that list that information anywhere ?
Thanks alot.
Jesse M.
The Code Project Is Your Friend...
|
|
|
|
|
If you use the Dependancy Walker that came with the Platform SDK, you can see some stuff, but most API functions are listed in MSDN, so just do a search for something that you want to do, and see what native features pop up.
Dependancy walker lets you see what other dll's are being referenced so its good for finding functions that are not in the 'right' dll.
"If you just say porn then you get all manner of chaff and low grade stuff." - Paul Watson, Lounge 25 Mar 03 "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?" - Anon
Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
|
|
|
|
|
Now I have never write a spider program,Can you give me some help?
Thanks for your help!
|
|
|
|
|
avoid cross-posting!
I was born intelligent Education ruined me!.
|
|
|
|
|
ok
|
|
|
|
|
Search for "stoub" on GotDotNet user samples. He is a MS employee that has done an excellent one.
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|
|
Thank you!
by the way,his name is toub,not stoub.
|
|
|
|
|
Hello,
Problem 1:
I wonder if you could use (how) dll made in delphi in C#.
Problem 2:
How do you make dll in C# and use this dll in Delphi, C++ ...
Is this posible?
I'm made dll with delphi and open it with Dependency walker. I can see my functions.
But if I made "dll" with C# (you know: New project; ClassLibrary...),
I can't see nothing. So I think that this dll is not real dll.
How can I make "real" dll in C# : you know like dll in delphi
function Something(a, b : integer) : integer; stdcall;
begin
Result:= a+ b;
end;
exports Something;
Thank you for answers,
have a nice day,
Anze
|
|
|
|
|
This may help
http://www.csharphelp.com/archives/archive52.html
All I need is a roadmap and then I might be able to find a clue.
|
|
|
|
|
Thank you for this link..
Anze
|
|
|
|
|
I have project that uses 3 files. I compile each of the subfiles to dlls and then combine them for the final exe. My question is, I have the same 'using' lines in two of them. Does this affect the exe generated? Will it slow my program down?
JJC
|
|
|
|
|
The 'using' keyword simply allows you to directly access namespace members without the namespace.
E.g.
ListBox;
rather than
System.Windows.Forms.ListBox;
So multiple 'using' lines for the same eventual build are ok. It only matters when they are in the same .cs file.
Any referenced dll's are loaded at application start. Check the debug/output window during a dubug run. It will tell you what libraries it is importing.
"If you just say porn then you get all manner of chaff and low grade stuff." - Paul Watson, Lounge 25 Mar 03 "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?" - Anon
Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
|
|
|
|
|
Thanks jonny, that was helpful. But what if u make a dll, use this for another dll, and finally use both for the project. Will both of them be referenced at runtime??
JJC
|
|
|
|
|
Provided the assemblies (dll's) are loaded into the same app domain, then they are only loaded once in the app's runtime life as far as i'm aware. Again, check the debug output window to see what is being loaded exactly and when.
"If you just say porn then you get all manner of chaff and low grade stuff." - Paul Watson, Lounge 25 Mar 03 "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?" - Anon
Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
|
|
|
|
|
That was helpful.... thanks.
But my problems are mainly due to my development environment. My professor wants me to use Eclipse 2.1 with the Improve C# plugin. Eclipse is excellent for Java development. But this IDE is not tuned for C# and lacks many of the features of VS7.
Infact, I'm totally new to .NET, C#, Eclipse.... And don't have much windows programming experience either. And I'm doing my semester project which is a 3D Graphics Engine using all of the above and this wrapper for OpenGL called CsGL by Lloyd Dupont & team. So I'm in a tight spot. Do you know of anyone who knows them all.
And about the debug thing.... I have no clue what ur talking about... coz I don't know where it is in Eclipse. If you can tell me how to do it from the command line, its be good.;)
"Excellence is never an accident" - JJC
|
|
|
|
|
nosmij wrote:
Does this affect the exe generated?
No, the using statements are just an aid to you as a programmer so you don't have to type out the full namespaces for all of the classes you want to use. If the C# compiler can't find the class in the current namespace it will then look through the namespaces provided by the using statement to see if the class exists there.
Once the C# code is compiled down to IL all classes are fully qualified with their namespaces. You can see this by running ildasm on a program you have compiled and looking through the code it shows you.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
That was helpful.... thanks.
But my problems are mainly due to my development environment. My professor wants me to use Eclipse 2.1 with the Improve C# plugin. Eclipse is excellent for Java development. But this IDE is not tuned for C# and lacks many of the features of VS7.
Infact, I'm totally new to .NET, C#, Eclipse.... And don't have much windows programming experience either. And I'm doing my semester project which is a 3D Graphics Engine using all of the above and this wrapper for OpenGL called CsGL by Lloyd Dupont & team. So I'm in a tight spot. Do you know of anyone who knows them all.
What I'm really interested is in - how does the compiler keep track of these files, especially if a referenced .cs file is not even in the project folder????? Meaning, how does it associate a using statement with a specific file??
"Excellence is never an accident" - JJC
|
|
|
|