|
this is a little bit tricky. write a wrapper for the function, what you want to use, using C++ .NET. Create that wrapper as a .NET DLL. Then add reference from C#. But it is not so easy, it is not for beginner.
|
|
|
|
|
pietlut wrote: I assign them to my project
You would add a reference to the taglib-sharp.dll to your project.
pietlut wrote: in the header
If you are using a header file, you are asking in wrong forum.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
I am having a problem setting the x & y axis fontsize in MSChart. I have played with the settings through the properties window, but when I run it, nothing changes.
I can find out what the size currently is by typing:
float size = Chart1.ChartAreas["ChartArea1"].AxisX.TitleFont.SizeInPoints;
and that will bring up a size of 8. I do not know how to then set the size to something I want.
I've tried:
Chart1.ChartAreas["ChartArea1"].AxisX.TitleFont.Size.Equals(50);
which does nothing, and I've also tried
Chart1.ChartAreas["ChartArea1"].AxisX.TitleFont.SizeInPoints = 10;
which gives me an error of "Property or indexer 'System.Drawing.Font.SizeInPoints' cannot be assigned to -- it is read only"
So does anyone know what I can type to set the axis? Thanks for your help!
John Michael
|
|
|
|
|
Hi,
in .NET some properties are read-only, i.e. you can get them but not set them.
Most often then there also is a "bigger" property that can be set.
Example: Form.Width is not settable, Form.Size is settable.
In your particular case you have to set a new TitleFont.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
That makes sense, but I'm not sure how to do that b/c TitleFont is not a type. Could you give me an example?
|
|
|
|
|
Sorry no, I never used MSChart. Anyway, isn't TitleFont holding a Font instance?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Its got a FontFamily, but once again, its a get property, does not have any set properties. I'll see if I can tinker with it some more and figure it out. Thank for your help!
JM
|
|
|
|
|
Hi,
I need to know when SetForegroundWindow return false because i try to set a form to the front using this code :
form.TopMost = true;
form.BringToFront();
bool focused = SetForegroundWindow(form.Handle);
if (!focused)
SwitchToThisWindow(form.Handle, true);
form.TopMost = false;
the form is showen but without having the focus.
best regards.
Keep it simple, stupid!
|
|
|
|
|
IIRC, SetForegroundWindow returns false if the window is not brought to the foreground. In your case, perhaps it's because your form is already at the foreground.
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
If only there would be some official documentation that holds such trivial information.
Googling for it would have taken half the keystrokes and less than 1 minute.
We prefer to help with real questions around here.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
You can also prevent other applications from stealing the focus, using TweakUI
<rant>
It's bloody annoying; you're typing merrily away, and suddenly start hearing the bleeping-sound of the computer-speaker because some programmer assumed that his application is important enough to disturb me during my work.
"Updates are available? Do you want to install/download them now?" If you must steal focus, then steal the entire screen and blink it red. It's either really important, or you behave and don't bug me at all.
</rant>
I are Troll
|
|
|
|
|
Some automation jobs may require SetForegroundWindow in order to use keyboard/mouse actions on another app. Of course this would require:
1. A user requesting it
2. A warning window telling the user he shouldn't touch anything until told otherwise.
3. The automation stuff
4. A notification to the user all is over.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hello All,
I have created a new appdomain . Now i want to load assembly in this newly created appdomain .
I tried to do using appdomain.load().. But i got error.
can u please suggest me some code to implement the same.
Regards,
Phani
|
|
|
|
|
Hi,
what kind of error did you get? Could you post the error message and the code?
Regards
Sebastian
|
|
|
|
|
Hey Sorry ,
I got the path wrong and now fixed it out . but i have some requirement hope you can help it out.
I have dll which has 2 classes One is Employee class and other is Controller class. this class has has table which will add employee object to the hastable.
Now i have created another application , where i am going to use this DLL and i have to do this in new Appdomain .
So i want to load that dll in newly appdomain and want to creat on e mployee object and add that to list .
Can u help me out in this . I am at learning statge
|
|
|
|
|
I'm (re-) using a snippet from PIEBALDConsult, works like a charm;
name = System.IO.Path.GetFileNameWithoutExtension ( Filename ) ;
assm = System.AppDomain.CreateDomain ( name ).
Load ( System.IO.File.ReadAllBytes ( Filename ) ) ;
I are Troll
|
|
|
|
|
file namse should include path too ???
|
|
|
|
|
I triend with complete path but it is saying couldn not find the file
|
|
|
|
|
How does "Filename" look just before executing the ReadAllBytes when you put a watch on it?
BTW, this isn't a "beginners" topic, but rather somewhat "advanced"
I are Troll
|
|
|
|
|
Basically, the Assembly has to be in the same directory as the executing application.
Apparently you can load an Assembly from a different directory, but you have to set the AppDomains (both the current one and the new one) up properly to do that and I haven't bothered to do that.
See here[^] and here[^].
|
|
|
|
|
Hi.
I have two binary numbers : 01100011 and 01101000
I wanna exert a logical and on them in C#.
01100011
& 01101000
------------
01100000
Could you please guide me , how I can do it ?
Thanks.
|
|
|
|
|
string bin1 = "01100011";
string bin2 = "01101000";
int int1 = Convert.ToInt32(bin1, 2);
int int2 = Convert.ToInt32(bin2, 2);
byte result = (byte)(int1 & int2);
string binaryResult = Convert.ToString(result, 2).PadLeft(8, '0');
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
|
inserts the leading zeros if required.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Just beat me to it!
Between the motion
And the act
Falls the Shadow
|
|
|
|