|
How can i scan or find text in images such as jpegs? FOR EXample, I am going to find the word "Hello" in a letter scanned in JPEG Format.. Is there a way?
|
|
|
|
|
|
Yes. Actually I am working with an OCR application. The thing is it converts and identifies the characters or letters in a scanned document ans saves the identified or converted texts in a jpeg file. So i must read the text in the jpeg file. How is this possible?
|
|
|
|
|
Hi! I am trying to send digitaly signed message from my program via CDO. I used examples from site and MSDN. Message was delivered, but i ended up with mail client telling me "ASN1 tag: unexpected end of data". Can anyone tell me what's wrong?
<br />
string test = msg.BodyPart.GetStream().ReadText(msg.BodyPart.GetStream().Size);<br />
<br />
Encoding ascii = Encoding.ASCII;<br />
Encoding unicode = Encoding.Unicode;<br />
byte[] unicodeBytes = unicode.GetBytes(test);<br />
byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes);<br />
<br />
string SignedMsg = SignFromText(asciiBytes,false,Encoding.UTF8);<br />
<br />
msg.BodyPart.ContentMediaType = "application/pkcs7-mime;smime-type=signed-data;name=\"smime.p7m\"";<br />
msg.BodyPart.ContentTransferEncoding = "base64";<br />
msg.BodyPart.Fields["urn:schemas:mailheader:content-disposition"].Value = "attachment;FileName=\"smime.p7m\"";<br />
msg.BodyPart.Fields.Update();<br />
byte[] tmp = unicode.GetBytes(SignedMsg);<br />
msg.BodyPart.GetDecodedContentStream().Type = ADODB.StreamTypeEnum.adTypeBinary;<br />
msg.BodyPart.GetDecodedContentStream().Write(tmp);<br />
msg.BodyPart.GetDecodedContentStream().Flush();<br />
<br />
msg.Configuration = cdoConfig;<br />
msg.Send();<br />
<br />
public string SignFromText(byte[] plaintext, <br />
bool bDetached, Encoding encodingType) <br />
{<br />
CAPICOM.SignedData signedData = <br />
new CAPICOM.SignedDataClass();<br />
CAPICOM.Utilities u = new CAPICOM.UtilitiesClass();<br />
signedData.Content = u.ByteArrayToBinaryString(plaintext);<br />
CAPICOM.Signer signer = new CAPICOM.Signer();<br />
CAPICOM.Certificate ClientCert = new CAPICOM.Certificate();<br />
try<br />
{<br />
CAPICOM.Store MyStore = new CAPICOM.StoreClass();<br />
MyStore.Open(CAPICOM.CAPICOM_STORE_LOCATION.CAPICOM_CURRENT_USER_STORE,"My",CAPICOM.CAPICOM_STORE_OPEN_MODE.CAPICOM_STORE_OPEN_READ_ONLY);<br />
foreach(CAPICOM.Certificate c in ((CAPICOM.ICertificates2)MyStore.Certificates))<br />
{<br />
if(c.SerialNumber==m_config.GetOwnCert())<br />
ClientCert = c;<br />
}<br />
}<br />
catch(Exception ex)<br />
{<br />
MessageBox.Show("Error : "+ex.Message );<br />
}<br />
<br />
signer.Certificate = ClientCert;<br />
string _signedContent = signedData.Sign(signer, bDetached, <br />
CAPICOM.CAPICOM_ENCODING_TYPE.CAPICOM_ENCODE_BASE64);<br />
return _signedContent; <br />
}<br />
|
|
|
|
|
Is it possible to make a custom dialog that implements features of standard dialogs. E.g. a custom dialog should have two FontDialogs (in two tab pages for example). How to use standard FontDialog to implement this custom one, in order not to make it from scratch.
|
|
|
|
|
FontDialog is using windows api this
Make the modification of it not easy as other .net class
but you can still inherit from it and override
HookProc Method to add your customization
For more info
FontDialog.HookProc Method[^]
MCAD
|
|
|
|
|
How can i get the list of the network connections on a PC and its type i.e Dial Up, LAN, etc...
|
|
|
|
|
|
how can i change the icon of my form in C#. the icon i want to use is an embedded resource??
|
|
|
|
|
change the icon in the resource then select your form en go to properties (F4)
there you can browse for the icon.
good luck.
No hurries, no worries.
|
|
|
|
|
You can Write somthing like
System.Reflection.Assembly myAssembly=System.Reflection.Assembly.GetExecutingAssembly();
Stream file=myAssembly.GetManifestResourceStream("EmbeddedResource.test.ico");
Icon myIcon=new Icon(file);
this.Icon=myIcon;
Note:You need To replace the following line
EmbeddedResource.test.ico
EmbeddedResource--->Your Assembly Name
test.ico------>your icon name
MCAD
|
|
|
|
|
Hi
I have a webservice that doesnt return anything , but every time i call it
it consumes my time to perform its job completly.
How i can send it a request and cut the connection?
|
|
|
|
|
Call it async (using the Begin... call generated by the proxy).
|
|
|
|
|
Hi,
I Want By OOP Convert Forms To User Control.
|
|
|
|
|
moh_monir wrote:
I Want By OOP Convert Forms To User Control.
Thats a little vague, can you give more details about what you are trying to achieve.
At the simplest level. Create a new user control and cut and paste your Forms contents onto the user-control. Then you can use the user-control on the form.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
Your Solution is Obvious, but It will be so long to cut and past 25 forms (incredable) i need a solution using OO this is my main task.
by another way:- i have a 25 forms and i wanna make all of them user control
if u can help me i'm waitting for ur replay
|
|
|
|
|
moh_monir wrote:
Your Solution is Obvious, but It will be so long to cut and past 25 forms (incredable) i need a solution using OO this is my main task.
by another way:- i have a 25 forms and i wanna make all of them user control
I haven't tried this but in theory, you should be able to change your base class from Form to UserControl.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
Thank U Michael I Think This Is The Solution.
|
|
|
|
|
Forms ARE Controls already. This is the Form classes inheritance tree:
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollableControl
System.Windows.Forms.ContainerControl
System.Windows.Forms.Form
UserControl also has the same inheritance tree, so I don't get why you would want to change a form to a UserControl since both are just custom ContainerControls. What's the advantage? What are you trying to do?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
The Idea:- If I Have 25 Forms and I want To put Eact Five Forms In One Form In The Tab Control And It's Not Allowed To Make Nested Forms, So I Will Use The User Control Instad Of Forms. Now I Want To Convert This Forms To User Control By Easy Way.
The Solution: change the base class From Form To User Control I think this is agood idea since "UserControl also has the same inheritance tree" but I don't know if i will face probems? but i will try
Thanks.
|
|
|
|
|
Try changing the .TopLevel property (it's hidden so it won't show up in Intellisense!) of your child forms to False, the you can set it's .Parent property to any object that derives from the Control class, like a TabPage.
Dim myForm As New Form3
myForm.TopLevel = False
myForm.Parent = TabPage1
myForm.Show()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
sallam
i whant to make a c code(function)
which change the pc to aderess its mean we do any work that is perform on aderess via i print any thing
i whant that print on aderress screen
|
|
|
|
|
Your post didn't make ANY sense what-so-ever. We have no idea what you're talking about or what you want to do.
Perhaps someone who understands English better could post your question for you?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is it possible to implement BorderLayout,Flowlayout and Gridlayout using C#
|
|
|
|
|