Need a VB code

I am trying to color the chat columns in different colours according to the person who is sending it.I have useds the gridview to show my chats along with the to_id and from_id field, which are the ids of the people who are chatting. I found this colde in c#, can someone please convert it to vb and customize according to my needs pleasethank you. I want the rows with the same to_id to be of one colour, and rows of same from_id to be of one colour. Please note this chat is between just two people.

Posted On: Tuesday 20th of November 2012 04:03:56 AM Total Views:  518
View Complete with Replies

Related Messages:

Help needed to increase cursor size with CreateCaret   (342 Views)
, I'm trying to make the cursor size in one of my forms larger, since it is too easy to lose track of its location in this big form. I found the following code in an old post from google: ...
VB 2005 - need help please   (468 Views)
hi - have just started using VB 2005 at uni - i am working on a project that has multiple forms - one of the forms has a little * by the side of it - could anyone explain (this ...
need a REGEX pattern to match   (273 Views)
need help with validating a 9-digit number. CANNOT BE ----------- 000000000 111111111 222222222 333333333 444444444 555555555 666666666 777777777 888888888 999999999 4-5 position(s) CANNOT BE 00 -- 123001234 6-9 position(s) CANNOT BE 00 -- 234550000 The nine numbers CANNOT BE sequential -- but only the following 4 four below, for the time being -- 012345678 123456789 987654321 098765432 I had just managed to get the first piece done -- "^(:(!0+|1+|2+|3+|4+))\d{9}$"
trying to modify a procedure, need help!   (322 Views)
I'm trying to modify the following procedureso that new user accounts are created with two roles (roleid 1 and 4) by default. I know vbscript, but new to .net and can't figure out how to use the classes and methods. Procedure thatcreates the newuser and addsblank roles by default: '******************************************************************************************************** 'Name:lnkAdd_Click 'Parameters: ' sender-Theobjectcallingthefunction,i.e.lnkAdd ' e-eventarguments 'Returns:Nothing 'Purpose:Addsausertothedatabase. '******************************************************************************************************** PrivateSublnkAdd_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandleslnkAdd.Click lnkAdd.Enabled=False DimuserAsNeworgz.User DimrolesAsNewSystem.Collections.Generic.List(Oforgz.Role) DimmapAsNeworgz.Map user.txtusername=user.getuseridbyusername() If(user.GetUserExistence()
needassistance   (231 Views)
to all you out there. My question is: is there a way to put code for registering dll server directly from my application So, when I open my app the code for registering dll automaticly does it's job ...
Passing a value to a bat file.....may need an expert to solve...   (291 Views)
, My program opens and executes a .bat file like so.. ================================================= 'Getthefullfilepath DimstrFilePathAsString="c:\temp\"&CStr(lblsetup.Text)&"" 'CreatetheProcessInfoobject DimpsiAsNewSystem.Diagnostics.ProcessStartInfo("cmd.exe") psi.UseShellExecute=False psi.RedirectStandardOutput=True psi.RedirectStandardInput=True psi.RedirectStandardError=True psi.WorkingDirectory="c:\temp" 'Starttheprocess DimprocAsSystem.Diagnostics.Process=System.Diagnostics.Process.Start(psi) 'Openthebatchfileforreading DimstrmAsSystem.IO.StreamReader=System.IO.File.OpenText(strFilePath) 'Attachtheoutputforreading DimsOutAsSystem.IO.StreamReader=proc.StandardOutput 'Attachtheinforwriting DimsInAsSystem.IO.StreamWriter=proc.StandardInput 'Writeeachlineofthebatchfiletostandardinput Whilestrm.Peek() -1 sIn.WriteLine(strm.ReadLine()) EndWhile strm.Close() 'ExitCMD.EXE DimstEchoFmtAsString="#{0}runsuccessfully.Exiting" sIn.WriteLine([String].Format(stEchoFmt,strFilePath)) sIn.WriteLine("EXIT") 'Closetheprocess proc.Close() 'ReadthesOuttoastring. DimresultsAsString=sOut.ReadToEnd().Trim() 'ClosetheioStreams; sIn.Close() sOut.Close() ============================================================= The .bat file has the following contents in it... ============================================================= echo off cscript //nologo test.vbs echo Status of user SQL = %ErrorLevel% ============================================================= The Top code is a work around, as .net will not run .bat files due to security resaons (unatended process) I am facing a problem now, where I need to pass a parameter to the .bat file, but because of the way it is executed in the command prompt, this is not possible, Has anyone faced the same problem
help - a small simple code needed   (324 Views)
haven't done any VB coding for many years, and quite frankly cannot do any anymore If some one has 5 minutes extra time I would need something like this: There is a group of cells, which contains numbers, let's ...
need to use shAppBarMessage for docking   (326 Views)
all, I have done a lot of searching for this... I have an application that I want to dock to the top of the screen and reserve screen space for it, like a taskbar. I DO _NOT_ want the ...
I really need help - can some one please help me here pls?   (513 Views)
Hi , Please help me to develop this one page please. I have a page on which I have a label control, just one label with no text. Next I start a loop to read the headers of emails and during each loop round, I add rows to table. Now ok this plain text et addition is not a problem. In one cell I want to add a check box at run time and here don't know how to that. Just to give u an idea I am pasting code for somethng else which has teh same concept. In a string variable how to store " double coutes and how to give a seperate ID to a control created each time. Do I need to create a checkbox control array Once controls are there I am sure I will be able go through them one by one and see which one was checked, please I will be really thank full if you people can help me here pls. Best
How can i play amr(*.amr) ,wav(*.wav) file in but no need windows media component to play it   (374 Views)
Anybody pls wake up now try to read my post and try help me pls.. i need sommeone to help me now .. Pls find the way for me how to play amr file with pls pls save me now..... i wait for your reply to me, na
Last X characters needed.   (349 Views)
I cant seem to find anything on this. I can find plenty on how to get all characters after X but nothing on how to get the last few. Here is my scenario. I have a string which essentially is a date ie in the format of 4032007. I need just the year portion, so just the last 4 numbers. Now the problem is coding for the possible change in the length of the string: strTDate = Microsoft.VisualBasic.Right(strTDate, 5) or strTDate = Microsoft.VisualBasic.Right(strTDate, 4) Depending on if the month is a 1 or two digit month. So how can I get the last four w/o writing a if statement TIA, Stue
Newbie needs help filtering a listbox   (447 Views)
I have a listbox that I need to filter when populating it. Here's the deal. Each item in the listbox is a concatenation of 3 strings derived from attributes of an XML element: So each item ...
What VB version do I need?   (246 Views)
Hi I have been working with VBA in Excel for some years and feel quite competent. I would now like to move into VB - more as a hobby than for any powerful commercial purpose. I use Windows XP. I ...
Report designer error - help needed to configure orientation   (385 Views)
I am getting a "Report width is larger than Page width" error when I attempt to run my report. I would like to get the report to display with a landscape orientation so I will have more room horizontally, but ...
Help needed with query syntax   (350 Views)
Hi Can someone please tell me whats wrong with the last line of the query below. The first three lines work fine but when i add the fourth line i get an error message (see text at ERROR MESSAGE) sql_HTTermijnRecords ...
Absolute beginner needs help with searching text files   (416 Views)
all, Hope this is the correct group for this question. I couldn't find a vb beginners group. I am getting overwhelmed and need some help. I did this very easily in a batch file (only three lines), but DOS ...
User variable in Excel - help needed   (550 Views)
I want to be able to have a Macro in Excel to delete or clear contents in a number of rows or cells with the start row being user definable can you help I just can't get anywhere with ...
need help converting C# to   (337 Views)
need help converting C# to C# version is below ================================ namespaceLicensedControls{ [ LicenseProvider(typeof(ExpiringLicenseProvider)) ] publicclassExpiringLicensedLabel:Label{ publicExpiringLicensedLabel(){ LicenseManager.Validate(typeof(ExpiringLicensedLabel)); } } } my attempt to get vb ========================= Namespace LicensedControls Public Class ExpiringLicensedLabel Inherits Label Public Sub New() LicenseManager.Validate(GetType(ExpiringLicensedLabel)) End Sub End Class End Namespace fails to compile on ">"
Variable MSComm1 Threshold needed.   (340 Views)
I am receiving a continuous block of ASCII characters of a variable length between 449 to few thousand. The trouble is I don't know how long the string will be. I start by clearing out the buffer then reseting ...
Data Environment Designer - need additional table fields on form;initial dragging did not include them   (298 Views)
-- There are too many columns in the table to fit on a form when dragging the DED's table's Command node onto the form. I need to add to the form some of those columns which did not come ...