|
Hi friends,
I have seen something like below in a resource file. Can somebody tell me what is (.)dot notation for.
Name: Value
myButton.Label SubmitButon
Thanks
|
|
|
|
|
The dot signifies an object's member (property, field, method, etc.). The statement would imply the Label property of the myButton object is "SubmitButton".
/ravi
|
|
|
|
|
Thanks for replying. But then how comes in the code when i type name of the resource file i do see this myResource.myButton_Label
|
|
|
|
|
netJP12L wrote: Thanks for replying. But then how comes in the code when i type name of the resource file i do see this myResource.myButton_Label
The code you are seeing (myResource.myButton_Label ) is accessing the string resource through the resource class that Visual Studio auto-generates for you. The auto-generation translates the "." in the resource name to an "_" to make it a legal C# property name.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
I know how to send a service a command using the ExecuteCommand but i'm wanting to recieve a response back to the client. Any Ideas?
Thanks
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
I want to write in a Xml file some data, but I have an error because I have the same attribute "ClusterRoute" who appears many times.
XmlTextWriter myXmlTextWriter = new XmlTextWriter(@"c:\\Results.xml", Encoding.UTF8);
myXmlTextWriter.WriteStartDocument();
for (int i = 0; i < clustersList.Count; i++)
{
myXmlTextWriter.WriteStartElement("Clusters");
for (int j = 0; j < clustersList[i].Count; j++)
{
myXmlTextWriter.WriteAttributeString("ClusterRoute", clustersList[i][j].CityID.ToString());
}
myXmlTextWriter.WriteEndElement();
}
myXmlTextWriter.WriteEndDocument();
|
|
|
|
|
you can only have on instance of an attribute per element. That is just how XML works.
led mike
|
|
|
|
|
Hello everyone,
I am using a DataGridView control to display data which is stored in a remote database server. Using filter, I am trying to get the rows of information that I am looking for in the dataset. I was wondering if it is possible to get the data in a specific column/cell rather than the entire data in the row?
The following is the code that I am using for filtering the data in the DataGridView control.
string strText;<br />
string strExpr;<br />
string strSort;<br />
DataRow[] foundRows;<br />
<br />
strExpr = "shop_id >= '4' AND shop_id <= '7'";<br />
strSort = "shop_id ASC";<br />
<br />
foundRows = myTable.Select(strExpr, strSort);<br />
<br />
strText = null;<br />
for (int i = 0; i <= foundRows.GetUpperBound(0); i++)<br />
{<br />
for (int j = 0; j <= foundRows[i].ItemArray.GetUpperBound(0); j++)<br />
{<br />
strText = strText + foundRows[i][j].ToString() + "\t";<br />
}<br />
strText = strText + "\r\n";<br />
textBox.Text = strText;<br />
}
Thank you very much and have a great day.
Khoramdin
-- modified at 11:03 Thursday 10th May, 2007
|
|
|
|
|
You should go look at the C# Articles to get a handle on what you are doing, you are way off base.
led mike
|
|
|
|
|
Hello mike,
Thank you very much for your respond. You could be absolutely correct regarding my approach. But could you be kind enough to tell me where I need to start and what is the right approach? Then I will be able to narrow down my search and find the right approach.
Believe it or not, but I found that approach after reading number of C# articles. I am sure you agree with me when I say there are all sort of articles online. The problem is to find the right one and in order to find the right one I need to have the knowledge to assess the articles. But the point is, if I have the knowledge to make such a distinction then I have reached the level of knowledge that I won't be needing such articles!
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Well I meant the C# Database Articles here on CodeProject, try this one[^]
led mike
|
|
|
|
|
Hello mike,
Thanx for the help mate.
Have a great day.
Khoramdin
|
|
|
|
|
Hi,
I need to move(change Location and Z-order) of a window (which is not focused) without activating it. Sometimes the form is on background.
For that, I use :
<br />
[DllImport("user32.dll")]<br />
public static extern int SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, Int32 x, Int32 y, Int32 cx, Int32 cy, Int32 flags);
that works fine, but sometimes it fails. Every time I need to move that specified window (particulary change position and z-order) , i do it like :
Win32Native.SetWindowPos(this.Handle, parentHandle, newPosition.X, newPosition.Y, 0, 0,<br />
(int)Win32Native.SetWindowPosOptions.SWP_NOSIZE |<br />
(int)Win32Native.SetWindowPosOptions.SWP_NOACTIVATE);
Where:
parentHandle - Handle of window that should be (is) allways right behind this window.
newPosition - correctly calculated new desktop position.
Win32Native is my custom class with many user32.dll and other methods, enumerations, structures etc...
I've also tried to put
Win32Native.SetWindowPos(this.Handle, parentHandle, 0, 0, 0, 0,<br />
(int)(Win32Native.SetWindowPosOptions.SWP_FRAMECHANGED |<br />
Win32Native.SetWindowPosOptions.SWP_NOSIZE | <br />
Win32Native.SetWindowPosOptions.SWP_NOZORDER | <br />
Win32Native.SetWindowPosOptions.SWP_NOACTIVATE |<br />
Win32Native.SetWindowPosOptions.SWP_NOMOVE));
and
Application.DoEvents();
right behind, but it didn't help too. It works fine when the parent window (the window thats always right behind this window) is active, but as soon as it is not active (focused), it starts to fail changing this window position.
Do you have any idea why?
|
|
|
|
|
Are you gettng any error codes back? Have you checked GetLastWin32Error[^]? If the call fails, an error code should come back. Look up the error code and see what went wrong.
|
|
|
|
|
That's funny, it always returns 0 == no error occured.
|
|
|
|
|
What happens if you call this function with the same arguments and for the same window but from a c++ program?
|
|
|
|
|
Hi,
I haven't tried that but I can't see the purpose here. Why would I do that? Even if it worked, how would it help in my situation? Are you trying to say that I should write a dll in C++ , import it to C# ...
|
|
|
|
|
Hi all,
I am doing an Day planner using c#.net and MS.ACCESS. My query is how to compare two dates excluding the seconds in c#.
For eg:
Datetime time1 = convert.ToDateTime("06:12:45");
Datetime time2 = convert.ToDateTime("09:25:09");
DateTime.Compare(time1,time2);
In the above i wish to compare time excluding the seconds in both the time format.
Plz any one help, it's urgent
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
If you read the documentation you'll see that DateTime has the following properties and methods:
* Second[^]
* AddSeconds[^] (hint: add a negative number of seconds)
|
|
|
|
|
Does anyone know a nice clean way (pref Regex) to detect URLs and hyprelink them?
For example I have in plain text:
www.myserver.com danc@myserver.com
I want to convert to hyperlinks like:
<a href="www.myserver.com">www.myserver.com</a> <a href="mailto:danc@myserver.com">danc@myserver.com</a>
I have been googling and found various examples of how to detect the latter and convert to the former but nothing the way I need.
Cheers,
Dan
|
|
|
|
|
Some time ago , I had same problem. After hours spent on google looking for sollution, I've decided to make it myselft (using regex). Unfortunately, the code is gone
So if you want to make it yourself, I can help you out whith some ideas wich I found important when parsing text:
Email :
- there are many examples how to parse text to find e-mail adress, so I'm not going to discuss that.
Links :
- there are serveral protocols (at the time I was doing that it was about 7, so consider link to be anything that starts with : http:// ftp:// gopher:// etc...
- if that string doesn't start with any protocol, it needs to be at least three alphabetical words connected by DOT, where there may be more words and last word may contain almost all possible characters (Not all, but I don't remember which are not allowed. Remember that the first word doesn't have to be www like www.codeproject.com , there are also adresses like video.google.com . I think that the first and second string cannot contain any special characters.
Hope that helps...
|
|
|
|
|
Hi,
Thanks for the reply.
With the context this is going to be used in it is unlikely that anyone would add http:// before a url, it would more than likely be www.server.com/page
I have been copy/pasting some Regex code I found with no luck so far. I know absolutely nothing about Regex but I have just downloaded the Regex coach which will hopefully help me learn a bit.
If you have any pointers as to what the regex should look like or links to good places to learn (It's not making much sense at the moment!) that would be great
Cheers,
Dan
|
|
|
|
|
send me the code for Forums using C#.net
|
|
|
|
|
|
<br />
while( true )<br />
{<br />
doForum();<br />
}
I hope that's of some use to you.
|
|
|
|