|
all font have script with any language inclue in this font
how can get the script in some font with c# ??
Palestine
|
|
|
|
|
Could you please rephrase this in something closer to proper english?
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
when u open notepate and go to select font from menu
u can see (Script) and comboBox withh all language support in this font ??
i want to make comboBox that have a list with script .. as in the NotePad
how can get this Script with C#
Palestine
|
|
|
|
|
You want a font combo box. I'm sure there are some on this site, if you do a search.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Ok, now I think I see what you mean.
I've never bothered to look at the "Script" combobox in the FontDialog, but I think the only effect of selecting a different value from the combobox is to show a different set of characters in the preview window.
Unicode charsets contain ranges of special characters (for example, Greek, Kyrillic (sp?) or Hebrew characters) and I think the "Script" refers to one of these groups.
But I don't have an idea if you can get a list of these groups with .NET, sorry...
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
see this lik
http://imgsrv.worldstart.com/ct-images/notepad-font.jpg
Palestine
|
|
|
|
|
You can use FontDialog
FontDialog dlg = new FontDialog();
if (dlg.ShowDialog()==DialogResult.OK)
{
selectedFont = dlg.Font;
}
|
|
|
|
|
i dont want to use FontDialog
i want to make one like it ...
Palestine
|
|
|
|
|
Hi People,
I would like to write a program in c# which will interogate all incoming webpages for bad language etc before allowing it to displayed by the browser.
Trouble is I have no idea where to begin. Can anyone point me in the right direction with articles or advice?
cheers
CJ
|
|
|
|
|
Well, I would begin by ignoring the browser entirely.
You should start any project like this with the "engine" part. In your case this engine takes a string (which may later be the HTML sent to the browser), and parses that string for a known database of "bad words" or phrases.
It might remove these bad words from the input string, replace them with something, or totally dis-allow the entire input string....that is the bit you decide.
When your engine works to your satisfaction, start to think about how to implement your engine - you suggest you could intercept incoming HTML and do something with it before it hits the browser. That is certainly possible, but will require a good solid knowledge of the inner workings of the OS, the browser and HTTP.
In addition, if you are writing a contant filter, much work is done internationally around standardising such protocol. Many websites, for example, include a header with some form of content rating. You should research this as appropriate to your project.
---
How to get answers to your questions[^]
|
|
|
|
|
Thanks for your help. Im not too concerned about writing the engine part at the moment but more the actual intercepting of HTTP and stopping it from reaching IE is more of a concern. Any idea how to do this?
|
|
|
|
|
You can try to hook WINSOCK calls and change the content or prevent it.
Try madshi:
Madshi
Eran Aharonovich (eran.aharonovich@gmail.com )
Noviway
|
|
|
|
|
CJayMeister wrote: Trouble is I have no idea where to begin
Apparently you do know where to "begin" since you already decided on the platform (.NET) and language you will use.
CJayMeister wrote: Can anyone point me in the right direction with articles or advice?
This is a huge subject. If you want to create a "filter" for a specific browser like I.E. then you can create a plug-in. For other browsers I don't know, they probably support something similar. If you want to "filter" the entire machine you need something more like a fire wall process.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Your application will be the proxy to the web. Then setup will be as simple as having the user change the connection settings. The proxy would listen, on oh lets just say localhost:27002 then you can be the intermediary filtering all relevent information.
Useful link:
http://www.w3.org/Protocols/HTTP/HTTP2.html
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Search the web for simple HTTP proxy servers. An excelent sample in your case would be Privoxy, altough it's not coded in C#.
From the Churchdown Parish Magazine: "Would the Congregation please note that the bowl at the back of the Church, labelled 'For The Sick,' is for monetary donations only."
|
|
|
|
|
Hi,
My worker thread looks a bit like this:-
private void CacheThread()
{
while (true)
{
lock (myobject)
{
myobject.DoSomeWork();
}
try
{
System.Threading.Thread.Sleep(100);
}
catch (ThreadInterruptedException)
{
}
}
}
The thread spends the majority of it's time sleeping. Another thread uses Thread.Interrupt() to wake it up when it is necessary to DoSomeWork().
The majority of the time, it's fine - the thread is in the sleep and is interrupted.
But sometimes, I get an unhandled ThreadInterruptedException on the lock() line.
I presume that internally, CLR is using a win32 WaitFor... function, and is interupted. But I don't want my thread to wake up until it can claim the lock.
Is there an alternative? I want to wake the thread from my sleep, but not from a lock()-induced sleep.
Thanks
Jon
using System.Beer;
|
|
|
|
|
You get the exception because you are trying to interrupt the thread while it's not sleeping. If you want to handle that, you will have to catch the exception while the thread is working too.
-- modified at 7:02 Tuesday 11th July, 2006
On second thought, that could be a bit messy. A better way would be to add a flag to the class that you set while the thread goes into sleep mode, and a property that returns the flag so that you can use it to determine if the thread is sleeping or not, so that you don't interrupt it while it's not sleeping.
---
b { font-weight: normal; }
|
|
|
|
|
Not true. If you look at MSDN for Thread.Interrupt(), it states:
If this thread is not currently blocked in a wait, sleep, or join state, it will be interrupted when it next begins to block.
ThreadInterruptedException is thrown in the interrupted thread, but not until the thread blocks. If the thread never blocks, the exception is never thrown, and thus the thread might complete without ever being interrupted.
using System.Beer;
|
|
|
|
|
Just looking at your code (and I could be misunderstanding what you are trying to do here), but you are calling Thread.Sleep with a timeout of 100ms, which means if you dont interrupt it within 100ms of calling, then it wakes back up and resumes the code. If you interrupt the thread while it is waiting to aquire a lock then you will certainly get an exception (in this case unhandled). Perhaps specify an infinite timeout in the Sleep() method? That way it will stay in "stay asleep" until explicitly interrupted.
Aaron
|
|
|
|
|
Hi Jon
Wouldn't it be easier to use an System.Threading.AutoResetEvent? This way you don't have to sleep every loop, but rather, simply call the AutoResetEvent instance's WaitOne method. This also alleviates the need for the CLR to throw a ThreadInterruptedException; throwing exceptions is never very performant. Your resulting code would look something like:
void CacheThread(AutoResetEvent notifier)
{
while(true)
{
notifier.WaitOne();
lock(myobject)
{
myobject.DoSomeWorker();
}
}
}
Unless I'm misunderstanding what you're trying to do, this should suffice for you and is a lot cleaner, easier, and would perform better than your equivalent sleep-while-listening-for-ThreadInterruptException.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Messianic Instrumentals (with audio)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Jon Hulatt wrote: I want to wake the thread from my sleep, but not from a lock()-induced sleep.
I'm lost, lock is for suspending the thread until you signal the object. When you introduce Sleep also you then have two suspending mechanisms where only one should be needed.
Also while(true) is usually NOT a good design. "true" should be replaced by something that will actually allow you to gracefully exit the thread.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Hi All,
I have 2 times as string - ( like 29-06-2006 01:01:27:580 and 29-06-2006 01:27:20:970 ) and i need to know if the period time between then is less of 10 minutes.
Does someone know how can i calculator the subtract ??
Thanks for any help.
|
|
|
|
|
Convert times to DateTime object then subtract then use TotalMinutes property
(DateTime.Parse(string1) - DateTime.Parse(string2)).TotalMinutes will return what you want.
Regards
Shajeel
|
|
|
|
|
Its not working .
Someone can help please ?
|
|
|
|
|
The answer you were given is correct. Instead of 'it's not working', you should post some code and some specifics of why you are unable to make it work, so you can get help that's appropriate to your level of experience and ability.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|