|
|
PS This might not be what you are really looking for and there might be a much
better way but this would be a quick solution to implement
Use the Name property to find the name of the font
When program starts calculate a list of all the font files on your pc storing
them in a hashtable with the key equal to the Name of the font file and the
value equal to string [] of the fullPath to the font file thus means if the font has the same name but are located in two diferent locations on the drive then the value of the font name would be like c:\fontname,d:\windows\font\fontname then I would use the Name property of Font as Key index into the HashTable to find all the font files locations of that font Name
or
Use System.IO.Directory to work out the logical drives defined on PC
Calculate whitch drive contains my windows folder by searching all folders from root for a typical windows file.Then I would have calculated the and located the windows dir then
I would call System.Directory.GetFiles(string dirname,string searchPattern)
with dirname the String.Format("{0}{1}{2}",drive,windowsdir,fontdir) and then
in searchPattern the Name property of the font
|
|
|
|
|
Or try and see if you can find the private properties of the font class
using Reflection and see then if you can locate the filename of the specific font instance I know that you can find private properties and instance variables of a class by using reflection I just not have the time right now do dig into it for you but I hope that this advice can assist you in some way
|
|
|
|
|
I have a TreeView control with tooltips on the nodes.
When the mouse moves over the nodes the tooltips appear and disappear.
The problem is that sometimes the entire Windows desktop redraws including the desktop icons and all other windows! Doesn't do it unless the mouse moves causing the tooltips to be displayed.
Any idea how to stop this happening or why it is happening?
|
|
|
|
|
Hi there,
I have a question. We all hear about mobile programming ( I am talking about ordinary mobile programming, not smart phones) using C++, Python on Symbian OS. I wanna ask if someone (like me) who is good in .NET languages can program for mobiles using C#, VB.NET ?
Microsoft's compact framework is very good but is meant for smartphones only, what options a .NET programmer have if he/she want to ordinary mobile phones.
Not everything that can be counted counts and not everything that counts can be counted - Einstein
|
|
|
|
|
Well I would suggest go J2ME but it is not just coding and loading
it onto the phone the coding part is easy but getting the code running
on the phone is the bad part just some advice before you start just do good
reshearch on what you want to do and if the phone supports the features that
you want to used as well as get the right development package for the phone that you which to write the application for I have written a complete app that
works 100% in the simulator but as soon as I want to deploy I got stuck
|
|
|
|
|
VS2005.Beta2.DataGridView.FirstDisplayedCell throws "First displayed cell cannot be set to an invisible cell" if it has to scroll to it. Any workarounds?
JohnG
|
|
|
|
|
hey...
I am looking for a free ASP.NET message board(forums) system that i could use in my website..
I found YetAnotherForum.net but with unknown reason i cant finish the installation on the remote server.. does anybody know other system that i could use?
this is really important...
thanks,
Tal.
|
|
|
|
|
|
any other options?
|
|
|
|
|
Yeah - write your own. What's wrong with the community server ? I'd have suggested it, but I could not remember it's name.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
What's wrong with the community server
Maybe he thinks that he can do better,at all he must take his chance.
|
|
|
|
|
I suspect he's had trouble configuring it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ofcourse he does,its so complex,hard for a newbie.
|
|
|
|
|
no... but i'm looking for more options..
I already found Community Server.. someone else told me about it.. so i wasnt supprised..
anyway,
there is a step in the configurtion that says:
- If you try to run CS on Url other than localhost/cs (ie, the first paramater for cs_system_CreateCommunity), you must add the<br />
new Url using: exec cs_system_AddNewUrl 'localhost/cs', 'NEW_URL'
how can i do it ? i didnt understand this step...
and yes, I'm probably a newbie.. but still.. that doesnt mean I'm an idiot..
thanks,
Tal.
|
|
|
|
|
tal- wrote:
I'm probably a newbie.. but still.. that doesnt mean I'm an idiot..
If every newbie is an idiot ,so no one was going to be profressional in the programming ,right?;)
|
|
|
|
|
tal- wrote:
no... but i'm looking for more options..
You won't find any better.
tal- wrote:
how can i do it ? i didnt understand this step...
It looks to me like a command you need to run in the SQL Server query analyser. Start it up, select your database, and then type that into a window and execute it.
tal- wrote:
and yes, I'm probably a newbie.. but still.. that doesnt mean I'm an idiot..
I don't think either of us were trying to call you an idiot, just to get to the bottom of the problem so we could offer some advice.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I thought you were sarcasm.... anyway, thanks..
|
|
|
|
|
No worries, glad to help. One problem with web forums is that it can be hard to judge peoples intentions at times. I should use more smileys.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
yeap
|
|
|
|
|
You understood me wrong ,no?
|
|
|
|
|
Has anyone encountered the problem with FileStream inserting a carriage return into an input stream? I am reading a partially binary file which contains a character x0A somewhere in the middle of the file. There is no x0D associated with it. The stream provided by FileStream contains a x0D character which FileStream has apparently inserted in front of the x0A character.
Any idea whether this is a bug or designed behavior which I don't understand?
Allen Gleazer
|
|
|
|
|
|
I know what x0D is.
The question is: does FileStream actually corrupt in incoming data file by adding this extra character to the stream?
Allen Gleazer
|
|
|
|
|
Depends How you use it. If you use command from BinaryReader ReadBytes, Then incoming data will not be corupted.
Below is C++ Sample for copying File, I have tried about 1MB of File, and it make 1:1 Copy. (No Difrence)
String *fileName1 = S"Old.Dat";<br />
String *fileName2 = S"New.Dat";<br />
FileStream *fsOld = new FileStream(fileName1, FileMode::Open);<br />
FileStream *fsNew = new FileStream(fileName2, FileMode::Create);<br />
<br />
BinaryReader *br = new BinaryReader(fsOld);<br />
BinaryWriter *bw = new BinaryWriter(fsNew);<br />
do <br />
{<br />
if (br->BaseStream->Length == br->BaseStream->Position)<br />
break;<br />
<br />
Byte q[] = br->ReadBytes(10);<br />
bw->Write(q);<br />
<br />
} while(true);<br />
br->Close();<br />
bw->Close();
|
|
|
|