|
Glad to help you
|
|
|
|
|
how to make "yahoo answers" website like paging list control(horizontal list with page nos in boxes style) in C# windows application..
In this type of control i wanna generate list of page nos dynamically..with proper style like hover.
example can also be seen in windows live search results at microsoft website. pl suggest solution for this..
|
|
|
|
|
The idea of CP is YOU write code and other people help with specific problems. Try css and c# code.
You should also try posting to the correct forum, this is an ASP.NET question.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi everyone!
I am trying to create a client-server application that would communicate
using xml in a http format.
I already researched about client-server transferring file using TCP/IP.
It uses tcplient/tcplistener which worked very fine. However I was trying to
build an application that could use an http format of request to do the transferring of file.
I also had downloaded some codes for an implementation of an http server
but the http client needs to be a web browser, is there a way that I could just have a FORM as a client and pass those http request?
Is there any suggestion that you can give?
Thank you very much in advance.
I hope you could help.
|
|
|
|
|
I already found the answer to my question.
I should use httplistener(server) and httprequest/httpresponse(client)
however the httplistener have some issues on access.
it shows an access is denied exception.
the solution for this are:
XP = httpcfg.exe
Server 2003 = httpcfg.exe
(don't know if it really works)
Vista = netsh.exe
(this is the one that I have tried but it is somehow successful because
i can have it running in Vista Home Basic but not in Vista Business)
until now I still can't figure it out.
I hope someone could help.
Thank in advance.
|
|
|
|
|
netsh.exe was not the solution for my problem.
I just need to run my Visual Studio as Administrator.
(right click then select "Run as Administrator")
Hope it can help for the developers in vista
|
|
|
|
|
Hello Everyone,
Can anyone say to find out the URL in web page?
truely,
|
|
|
|
|
assuming you have the web page in some sort of buffer, why not use a regular expression and 'grep' type search on it ..
in c++ (following a boost regex example) you'd look for :-
boost::regex e("<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\"",
boost::regex::normal | boost::regbase::icase);
I know c# has a regular expression function, so try that ..
'g'
|
|
|
|
|
Find What?
While (true) { Human.isLearnable = true; }
|
|
|
|
|
i have created a DataTable that have a column of type Keys enum, now im trying to select the DataRows by that column but i'm stuck here. Its giving error.
KeyTable.Columns.Add("FirstKey", typeof(Keys));
DataRow[] tmp_dr = KeyTable.Select("FirstKey=" + Keys.LShiftKey);
DataRow[] tmp_dr = KeyTable.Select("FirstKey='" + Keys.LShiftKey +"'");
anyidea guys ? or i should use string type col instead of Keys ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
The underlying type of your enum is Int32, so that's what the column contains.
Either use it that way or use string for the column with:
Keys.LShiftKey.ToString()
|
|
|
|
|
i dont understand it because when i set that datatable to datagridview as datasource it show me string(no numeric value, eg. A B C)
ok nevermind i will use string type column thats looks working...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Is there any way to change the background colour of individual items in a listBox through code? I know you can do it with the listView control, but I have already built most of the functionality for the listBox, and don't really want to have to redo it.
|
|
|
|
|
|
Set the listBox's DrawMode property to OwnerDrawFixed.
Subscribe to the listBox's DrawItem event.
In the event handler method put this:
if (e.Index % 2 != 0)
{
e = new DrawItemEventArgs(
e.Graphics,
e.Font,
e.Bounds,
e.Index,
e.State,
e.ForeColor, Color.Red);
}
e.DrawBackground();
if (sender is ListBox)
{
ListBox listBox = (ListBox)sender;
e.Graphics.DrawString(
listBox.Items[e.Index].ToString(),
e.Font,
new SolidBrush(e.ForeColor),
e.Bounds);
}
The reason for the new DrawItemEventArgs is that the e.BackColor property is readonly.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
This is sort of what I want, but to be able to change the colour dynamically within the script (but not fixed at start)
|
|
|
|
|
Just alter the condition in the if block - or change to a switch... or whatever you want
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Still not quite. Perhaps I havn't explained properly. I am basically creating an RSS reader. If the post (stored in a static Global list) hasn't been read before, it has a value called 'isNew' set to true - this should mean it will have a background colour other than white. When the user clicks this item, this value will change to false and I want the backing colour (marking it as unread) to change back to white.
Basically, I want to change the colour at various points during the code (not just at initial Draw time).
Thanks.
|
|
|
|
|
You should be able to make it work from what I gave you before. I've expanded it a little to help.
This works for me given your scenario - you should be able to adapt it to suit your existing code.
A basic Feed class:
public class Feed
{
public Feed(string displayText)
{
m_DisplayText = displayText;
isNew = true;
}
private string m_DisplayText;
private bool isNew;
public string DisplayText
{
get { return m_DisplayText; }
}
public bool IsNew
{
get { return isNew; }
}
public void SetRead()
{
isNew = false;
}
public override string ToString()
{
return m_DisplayText;
}
}
This inside the class that holds the ListBox (lstFeeds) and call FillList() after any default initialization.
private Color unreadForeColor = SystemColors.Window;
private Color unreadBackColor = SystemColors.ControlText;
[DefaultValue(typeof(Color), "Window")]
public Color UnreadForeColor
{
get { return unreadForeColor; }
set { unreadForeColor = value; }
}
[DefaultValue(typeof(Color), "ControlText")]
public Color UnreadBackColor
{
get { return unreadBackColor; }
set { unreadBackColor = value; }
}
private void FillList()
{
lstFeeds.DrawMode = DrawMode.OwnerDrawFixed;
lstFeeds.SelectedIndexChanged += new EventHandler(lstFeeds_SelectedIndexChanged);
lstFeeds.DrawItem += new DrawItemEventHandler(lstFeeds_DrawItem);
Feed[] feeds = new Feed[] {
new Feed("Feed A"),
new Feed("Feed B"),
new Feed("Feed C"),
new Feed("Feed D")};
lstFeeds.Items.AddRange(feeds);
}
void lstFeeds_SelectedIndexChanged(object sender, EventArgs e)
{
if (lstFeeds.SelectedIndices.Count > 0)
{
foreach (int selectedIndex in lstFeeds.SelectedIndices)
{
Feed selectedFeed = (Feed)lstFeeds.Items[selectedIndex];
selectedFeed.SetRead();
}
}
}
void lstFeeds_DrawItem(object sender, DrawItemEventArgs e)
{
Feed thisItem = (Feed)lstFeeds.Items[e.Index];
if (thisItem.IsNew)
{
e = new DrawItemEventArgs(
e.Graphics,
e.Font,
e.Bounds,
e.Index,
e.State,
UnreadForeColor,
UnreadBackColor);
}
e.DrawBackground();
if (sender is ListBox)
{
ListBox listBox = (ListBox)sender;
e.Graphics.DrawString(
listBox.Items[e.Index].ToString(),
e.Font,
new SolidBrush(e.ForeColor),
e.Bounds);
}
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
When I sort columnA in dataGridView, the column sorts properly, but if a lot of values are the same in columnA, the values in columnB are random.
Example:
columnA columnB
a t
a w
a r
a a
a n
a e
b a
b f
b b
c a
d a
How do I get my program to sort so that it will sort columnB after columnA such that:
a a
a e
a n
a r
a t
a w
b a
b b
b f
c a
d a
Thanks in advance.
|
|
|
|
|
Google search for dataGridView1.Sort[^] - the second result was this MSDN page[^].
The very last example at the bottom of the page does exactly what you want.
Remember, always search first before posting. You'd have found it for yourself long ago instead of waiting around hoping someone replies.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Haha, I tried reading the IComparer page before but didn't quite get it. This one was much easier to read, thanks!
|
|
|
|
|
Is there a simple function which will convert a HTML string (including parts such as metachachters into a plain string. Basically stripping tags and replacing metacharachters with their true visual value?
Does this exist in the .Net Framework, or will I hav to build it myself?
Thanks in advance.
|
|
|
|
|
You can use the System.Web.HttpUtility.HtmlDecode method to convert html entities to characters. You can use a regular expression to match the tags to remove them.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|