|
1. again[^]
2. IMO things that have state should not be modeled as a static.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Thank you for your efforts, but I am bound not to release the code.
I tried making the serverClass as non static and defining its functions and variables as non static too but then: The DllImport attribute must be specified on a method marked 'static' and 'extern'
Oh this is something...
|
|
|
|
|
one more thing to add here, in the original console based application (c#), both the start() and stop() functions are in the main() and after the start() initiates, the console waits for the user to hit return (Console.readline()) and then the stop() function initiates.
All this works very fine in that application. I just wanted them to initiate on the click of the buttons.
|
|
|
|
|
Hi,
I am getting an exception in the following code. Exception is "Could not load file or assembly 'AutomationAddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c1461fa3837aae41' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)"
AssemblyName _asmName = new AssemblyName();
_asmName.CodeBase = "file://" + "D://dinesh//CSharp//AutomationAddIn//AutomationAddIn//bin//Debug//AutomationAddIn.dll";
Assembly.Load(_asmName);
Any suggestions?
Thanks.
|
|
|
|
|
"file://" is not necessary
only two letters away from being an asset
|
|
|
|
|
what's with all those double slashes? it is backslash that needs escaping, not slash.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hello
Is there anyone out there that knows how to develop the connection points that indicate relational mappings between two objects.. example: C# dataset designer can indicate foreign key relationships, or MSSQL diagrams also have the same connecting points that are adjustable. Adjustable by means of it not always being a straight line at all times..
So i'm building a busines object modeller and require the ability to show relational connection points on my business objects on a designer canvas. This leads my to believe that a implentation of maybe IDesignerHost is valid, but i would not know where to start with those connecter objects..
The connecting points must indicate what type of relationship it it and also must be adjustable when moved by using the mouse..
any ideas where to start.. please help.
Regards
|
|
|
|
|
You could always start by downloading Netron[^], and having a look to see how this was solved there.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi All,
In my text box i need to allow alphanumerics and some special characters. Below is the code i used in Regular expression valiadator -it works perfectly fine.
"^[0-9a-zA-Z,@&_.-]+$"
I need to allow spaces in textbox. so can anyone please help me how to add it. I tried to add a space in the above existing validation but throws an error. Help required in this. Thanks in advance.
Thanks,
Santa.
|
|
|
|
|
Did you try with \s for the white space?
How does your code look like?
|
|
|
|
|
How to add the \s in the above expression. I added in many ways and saw it was not working.
Thanks,
Santa
|
|
|
|
|
can anyone plese help me in this issue.
i am struck here ..
requirement --- need to allow spaces text box so to need to add code for it in the regular expression validator.
Thanks,
Santa
|
|
|
|
|
This code:
Regex rx = new Regex(@"\s");
string test = "1234 abc";
if (rx.IsMatch(test))
Console.WriteLine("White space");
else
Console.WriteLine("No white space");
gives the output: White space for me.
|
|
|
|
|
can you please tell me how to add this \s in this expression
"^[0-9a-zA-Z,@&_.-]+$".
Thanks in advance.
Thanks ,
Santa
|
|
|
|
|
I think you need to learn a little bit about regular expressions, as it is simple to add the \s to your expression. Try looking at Expresso[^] which is a tool for creating, testing and examining regular expressions.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
suppose i have one form with one button and i want when i will click the button then mouse will go to a folder and double click on it to open. so please someone tell me how can i do this programatically.
i need this type of idea for developing screen sharing apps. i can develop apps with remoting that which run in client machine and capture client screen and send the scree to my apps and then my apps paint its screen with that image. it is easy but suppose client desktop has one folder called test and when i will click on the picture of that test folder from my end then what i need to send as a result apps in client end can programatically open that folder.
please i need good idea to move in right direction to develop a screen share apps. please give me the idea that how to open folder of client machine after clicking on the image of client desktop transferred by apps sitting in client machine.
i will be highly obliged if anyone can help me to develop this apps with idea and also can tell me if is there any site available from where i can download the sample code.
Thanks in advance
tbhattacharjee
|
|
|
|
|
i written following code under printDocument1_PrintPage event
Font f = new Font("Arial", 14, FontStyle.Regular);
Brush b = Brushes.Black;
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
for (int j = 0; j < dataGridView1.Columns.Count; j++)
{
e.Graphics.DrawString(this.dataGridView1(i, j) + " ", f, b, j * 5, i * 5);
}
}
i am getting error this.dataGridView1(i, j)
error message isError 1 Non-invocable member FormsApplication2.Form1.dataGridView1' cannot be used like a method.
please help me .
|
|
|
|
|
The part of your code that is giving the error is
e.Graphics.DrawString(<big>this.dataGridView1(i, j)</big> + " ", f, b, j * 5, i * 5);
You are using this.dataGridView1(i, j) as if there were a DataGridView method that takes a row index and a column index and returns the value stored there. There is no such method.
You need to use square brackets '[]'.
Like this:
e.Graphics.DrawString(<big>this.dataGridView1[i, j]</big> + " ", f, b, j * 5, i * 5);
but as you have it you will get incorrect results, as it is dgrid[colindex, rowindex] and you are using dgrid[rowindex, colindex]
You can use something like
e.Graphics.DrawString(this.dataGridView1.Rows[i].Cells[j].Value.ToString() + " ", f, b, j * 5, i * 5);
so that you do not get confused about cols and rows.
Note also the .Value.ToString() in the last bit of code, you may, or may not need to use it in your code.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
I developped a windows service and I'd like to retrieve its own credentials (the "Run As" credentials, not the WindowsIdentity). Is it possible?
If yes, can those credentials be converted to NetworkCredentials? (for webservices calls)
thanks
|
|
|
|
|
Hi,
I have a scenario where I'm validating the data in a text box for special character.
The user can enter the data through keyboard, Copy & paste data using Ctrl+C and Ctrl+V from keyboard, or right click and paste using mouse.
I have to validate the data before it is pasted to the textbox. I'm validating the data for first two scenarios, i.e., validating while user enteres the data, or pasting the data using Ctrl+C and Ctrl+V from keyboard.
I'm not able to find any events which triggers contextmenu_paste_click event.
I'm not allowed to create a context menu for the textbox, that is I have to use the default context menu and I cannot create a new class which inherits the textBox class.
How can I implement this?
Any suggestion is appreciated.
Thank you.
|
|
|
|
|
Handle the textchange event, it will be triggered by the paste
only two letters away from being an asset
|
|
|
|
|
Thank you Mark Nischalke for your suggestion.
It works as far as validation is concerned, but doesn't serve my requirement completely, because for the following reason:
suppose the user pastes some text and it he tries to add some thing to same text, then the onTextchanged event is triggered and copies the same text again to the text box. and for other events like cut this event is triggered.
So, I would like to is there any way to access the paste_click event in the default context menu.
|
|
|
|
|
Pavan Navali wrote: onTextchanged event is triggered and copies the same text again to the text box
Why would it do this?
only two letters away from being an asset
|
|
|
|
|
Hello,
i have a problem using IE7.
i have 4 text button (hyperLink) that should working after the user logged in with user and password.
the problem is that: if the hyperlink is disabled the mouse arrow is pointer and not write arrow as it should be in IE7, but in IE8 it's ok.
what can i do using css to fix it ???
10x for all.
Ido.
|
|
|
|
|
Idosha wrote: what can i do using css to fix it ???
First, choose the correct forum. This question would be better posed in the ASP.NET or Web Development forums, it has nothing to do with C#.
Change the CSS on those elements to an appropriate cursor setting.
only two letters away from being an asset
|
|
|
|