|
I`ve just written my own user control which is inherited from RichTextBox control. This control has it own property called RegularExpression.
private string regularExpression;<br />
<br />
[Category("Behavior")]<br />
[Description("Wyrazenie regularne sprawdzające poprawność danych")]<br />
public string RegularExpression<br />
{<br />
get<br />
{<br />
return regularExpression;<br />
}<br />
set<br />
{<br />
regularExpression = value;<br />
}<br />
}
With this property I set up the regular expression which validates my data in control.
My problem is that I want set up this property by clicking my control`s context menu (a new window form with textBox to set up regular expression in it) like in the picture:
Click here...
After clicking OK button I want to set up RegularExpression property with context in textBox. In main application in not a problem. The problem apprears when I want do this the way I,ve just described...
I can`t create reference:
private void okButton_Click(object sender, System.EventArgs e) <br />
ValidatingEditControl.KKEditControl.regularExpresson = this.regExpTextBox1.Text;<br />
}
It dispays: "ValidatingEditControl.KKEditControl.regularExpresson is inaccesible due to its protectionlevel".
Can anyone help me with this?
-- modified at 8:21 Monday 20th March, 2006
|
|
|
|
|
regularExpression is private.
Use 'RegularExpression' which is public.
|
|
|
|
|
HI guys
I'd like to highlight particular words in a richtext box at run time. Similar to how MS Word highlights errors. So far when I try highlighting a word....all text in the control gets highlighted....
Any ideas
Many thanks
MGitosh
|
|
|
|
|
MyRichTextBox.SelectionFont = new Font("Tahoma", 12, FontStyle.Underline);
|
|
|
|
|
Hi frnds,
I want to add licensing feature to my C# .NET windows application.
Need to know how to add license keys and to use them for licensing purposes.
Although there are third party applications available, I need to create my own application
Any kind of help/tips are appriciated
happy coding !
- Prasadd
|
|
|
|
|
|
Thank u !
But, i've already read this article.
I am trying to implement licensing by using a simple Key (an alphanumeric field) which can be set while generating the Key and this Key will be compared while checking for the license
can u plz help me with this ?
Thank u
- Prasadd
|
|
|
|
|
Hi,
I'm trying to create a windows application which has non rectangular shapes. (Some thing like Media player). There is an article in MSDN, but they mentioned that there are some issues. I'm also facing them. So please advice me on how to do this?
MSDN link :http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskCreatingNon-StandardShapedWindowsForms.asp
My mail address is amilacp@gmail.com
Thanks,
Amila
Amila
|
|
|
|
|
To achieve this u have first create a image which contains of the shape u want to give to ur application, and set the outer region with some color (Black), now set the background image of the form to this image, set the
transparency key to the color that u have set to the image's outer region
i.e. Black, Change the formborderstyle to None,
this will work for u.
Regards,
Pramod
|
|
|
|
|
There is an article in MSDN, but they mentioned that there are some issues. I'm also facing them. So please advice me on how to do this?
MSDN link :http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskCreatingNon-StandardShapedWindowsForms.asp
From MSDN
Note Monitors set to a color depth of greater than 24-bit can have display problems with certain parts of the form not being transparent, despite setting of the TransparencyKey property. To avoid this problem, ensure that the monitor's color depth is set to less than 24-bit in the Display control panel. When developing applications that feature this transparency, keep in mind that you will have to make your users aware of this issue.
This is the issue i'm facing. Please advice.
Amila
|
|
|
|
|
The u can just change the Color depth of ur monitor and
them try it.
Regards,
Pramod
|
|
|
|
|
|
|
Hi,
I have mapped the following code:
public long GetDlgText(long DlgId, long FldId, long Row, long Col, BSTR* Text);
to:
unsafe public long GetDlgText(long dlgid, long fldid, long row, long col, string* text);
but, off course, you cannot use * on string variables (all the rest, no problem, but string, it seems, is a 'no, no')
know I'm not sure how C# passes parameters.
I would think that it passes the value because you can use the ref keyword without the unsafe statement and I thought ref string mystring was the same as CString &mystring for example.
So is it enough for me to just write string text instead of string* text and if not, what should I do then?
[EDIT]mm, know I'm at it how can you map the keyword FAR?
eg.:
public long FormatSecProjCoord(double easting, double northing, string* e_str, string FAR* n_str){<br /> [/EDIT]
tnx!
No hurries, no worries.
-- modified at 7:07 Monday 20th March, 2006
|
|
|
|
|
Your mappings should look like this.
public ing GetDlgText( int dlgid, int fldid, int row, int col, [MarshalAs(UnmanagedType.BStr)] string text );
You don't need to map the key word far. The interop marshaler takes card of that.
I hope this helps.
Deus caritas est
|
|
|
|
|
Dude,
thank you so much, I was already looking into the attributes, but couldn't find the appropriate (is there a link to a page with the possibilities? I couldn't find one)
thanks
No hurries, no worries.
|
|
|
|
|
Im using serial port communication in my application.
In the firmware side i sent 1000 data/millisec.
the theme of my project is "No lose data in capturing time"
how can i maintain the Buffersize. i cant get all the data
in my application running time.
Send reply
|
|
|
|
|
Explain more fully for a start.
My guess is that the trouble is with the firmware side of things since our company ran some tests of MSComm vs .NET vs other third party controls and found the MS ones behaved the best in all our tests.
When writing RS232 drivers for firmware, don't to any processing in the interrupt handlers, just flag that the data is ready, somewhere else in your program you must retrieve that data ASAP otherwise it'll be overwritten. Buffersize plays a small role in RS232 comms compared to the other problems which can occur.
Ed
|
|
|
|
|
hi Ed.,
Thanks for ur reply. Actually main theme of my application is data capturing. In the firmware side they will send 1000bytes / 3 millisec.
I capture the data and do some process and display in screen with some GUI.
They will put some index for all data. Every time i lost some bulk of data during the integration. how to solve this problem
need reply
|
|
|
|
|
Have you tried buffering the data on the firmware side and sending it to the PC at a lower baud-rate. 333,333 is a very odd and high baud rate for a serial port. If you need such a high speed then you're probably better off with a USB port.
Ed
|
|
|
|
|
hi Ed.,
In firmware side only they sent 1000/3millisec. Im using 115200 baudrate.
And tell me how to read the data from USB port method. Now im using SerialPort method.
Need Reply
|
|
|
|
|
Im using serial port communication in my application.
In the firmware side i sent 1000 data/millisec.
the theme of my project is "No lose data in capturing time"
how can i maintain the Buffersize. i cant get all the data
in my application running time
|
|
|
|
|
Hi there,
I noticed that the "Bytes threshhold" that fires the read bytes event, does not fire as often as you would wish. in order to read the bytes fast enough, rather use a timer to start the readbytes event in a timer loop, instead of waiting for the serial port read event to fire.
|
|
|
|
|
Im creating a drop down toolbar button in internet explorer using C#.
Kindly let me know if any tutorial is available..
Cheers
Annie
|
|
|
|
|
Hi,
I need to create an Access Database file and then create in it tables using C#.
regards,
|
|
|
|