|
Hello Muammar,
Have you set a correct Unicode Font to the Control which should show the text?
All the best,
Martin
|
|
|
|
|
Thanks Martin , I should try that
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi Everyone,
I want to create something similar to www.20q.net but for business application. I know it uses a neural net (for which I have already created a library). But a neural net alone is not enough.
Can someone point out to me how I could design this 20 questions app and what algorithm/data structures I should use?
Any help would be appreciated!
Regards,
Andre
|
|
|
|
|
Hi,
Use Frameset and frame HTML tags.
For further clarification can mail me suveen.kulshreshtha@gmail.com or
mayur.mehta@indiatimes.com
|
|
|
|
|
Hi Suveen,
Thanks for the reply but I think you are misunderstanding.
My problem is not physical implementation or or even close to presentation layer. What I want to know is what logical design should I follow and how do I translate the problem space domain into a model.
In other words, how do I use a genetic algorithm and a neural network to teach my app.
Regards,
Andre
|
|
|
|
|
Does anyone know if the filename can be set programatically and the 'Save as' dialog-box suppressed when i want to print something with "Microsoft image printer"?
P.S. I am working on a Cristal Report project and i am using PrintToPrinter() function.
Thank you very much!
--------------------------------
visit: http://pmartike.deviantart.com/
|
|
|
|
|
private void button1_Click(object sender, EventArgs e)
{
button2.Enabled = false;
Thread.Sleep(2000);
button2.Enabled = true;
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("Button 2");
}
in the above code, when i click the button2 while the sleep i on, after the sleep is over, i get the message box in the button2 click event.
what is the function of setting enable = false then?
how to prevent this?
thanks
|
|
|
|
|
You are putting the current Thread in sleep stage so,
Your button2 is disabled but when you click on it,
The event is not fired. because the thread is sleep and it will not accept the click event it actually Fire the event when the thread is in running mode again so at that time the button2 is enabled.
if you are still confused then reply this message
Best Regards,
Chetan Patel
|
|
|
|
|
i dont want to fire the button2 click even when it is disabled. how do i do it?
|
|
|
|
|
Hello,
You have to set the "Enabled" property before the user clicks the button.
If you want to make a validation on the/an event itselfe,
I would suggest inherit your own Button from System.Windows.Forms.Button.
Use a validation method which uses Flags or some other stuff.
Override OnMouseDown, which checks the validation method and calls the base method or not!
Not calling the base method of OnMouseDown, will prevent the click event from fireing!
See this code example:
public class SpecialButton : System.Windows.Forms.Button
{
public SpecialButton()
{
}
private bool flag1 = true;
public bool Flag1
{
get
{
return flag1;
}
set
{
if(value!=flag1)
flag1 = value;
}
}
private bool flag2 = true;
public bool Flag2
{
get
{
return flag2;
}
set
{
if(value!=flag2)
flag2 = value;
}
}
private bool ValidateClick()
{
return Flag1&&Flag2;
}
protected override void OnMouseDown(MouseEventArgs e)
{
if(ValidateClick())
{
base.OnMouseDown (e);
}
else
{
}
}
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
Hi,
the way you do it, button2 is not disabled at all, since the 2-second period it is disabled
you also "stop the world" by holding off the GUI thread.
don't put Thread.Sleep() in an event handler, it stops the GUI, which you never want to
happen. Instead, disable button2 and organize something to re-enable the button later.
For instance launch a Windows.Forms.Timer; when that timer expires, re-enable button2.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi
i was created a pdf help for my application and now want to by click a button show pdf file.
how can show a pdf file in C#?
tanks
|
|
|
|
|
Create Process and start the process by giving obsolute path of PDF file.
Process.Start ("x:\\sample.pdf");
Thanks
|
|
|
|
|
With the proper mention that you must have a PDF reader installed on your machine and it must be registered with the "pdf" extension.
|
|
|
|
|
Alternatively you can use a WebBrowser Control (so you can show PDF inside your app);
this too assumes you have a PDF reader installed.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi Luc Pattyn
your suggestion was very interest for me.
tanks so much
|
|
|
|
|
Hi.
Since ".net reflector" can decompile the assembly which means that all of the source can be restored, does any one know how to avoid that? since i have encryption keys stored in the assembly and can by seen with the .net reflector?
This has been bothering me for a few month.
Thanks.
|
|
|
|
|
maybe obfuscator helps you...
VirtualVoid.NET
|
|
|
|
|
You can obfuscate the assembly. VS2005 includes a Dotfuscator Community Edition (light version).
Many other obfuscator tools exist with prices from a couple of hundred to several thousand USD. (See also this Google search[^].)
|
|
|
|
|
Use an obfuscator. Visual Studio comes with the free edition of Dotfuscator, which can rename the symbols in your application. However, in order to achieve a higher degree of protection you'll need more than that. The superior versions Dotfuscator and most similar products have something called string encryption, which will prevent decompilers from reading keys, passwords, etc that are stored as strings in your app.
There are a myriad of commercial obfuscators out there and some of them have sponsored articles here on CP. If you want to invest some money into this I recommend {smartassembly}(trial version available on their site). It's way way cheaper than Dotfuscator or Spices.Obfuscator and it's very easy to use. Also, VERY IMPORTANT: if you use features such as serialization, reflection or remoting in your app, you'll have to be very careful with those classes/methods because most obfuscators break the application if those sections of your code are not excluded from renaming. As far as I saw from the trial version, {smartassembly} does that automatically, so that's a big advatage.
But download some trials and see which one fits you.
|
|
|
|
|
As long as your program is able to extract the encryption keys, a hacker is able to do that, too. With or without an obfuscator.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Assume that i have A.dll.
Later, i create B.dll project that "using" A.dll.
when i build the project , the output are A.dll and B.dll.
Is it possible that the output is only B.dll(combines A.dll in it)?
How?
Thank =)
|
|
|
|
|
It is possible. Google for ILMerge.
|
|
|
|
|
Thank for your help, Mark =)
|
|
|
|
|