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:  381
View Complete with Replies

RELATED TOPICS OF Visual Basic PROGRAMMING LANGUAGE




Help needed to increase cursor size with CreateCaret

, 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: ...
VIEWS ON THIS POST

212

Posted on:

Tuesday 20th November 2012
View Replies!

VB 2005 - need help please

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 ...
VIEWS ON THIS POST

351

Posted on:

Tuesday 20th November 2012
View Replies!

need a REGEX pattern to match

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}$"
VIEWS ON THIS POST

175

Posted on:

Tuesday 20th November 2012
View Replies!

trying to modify a procedure, need help!

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: '\t\t\tsender-Theobjectcallingthefunction,i.e.lnkAdd '\t\t\te-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()
VIEWS ON THIS POST

235

Posted on:

Tuesday 20th November 2012
View Replies!

needassistance

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 ...
VIEWS ON THIS POST

155

Posted on:

Tuesday 20th November 2012
View Replies!

Passing a value to a bat file.....may need an expert to solve...

, 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()\t-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
VIEWS ON THIS POST

197

Posted on:

Tuesday 20th November 2012
View Replies!

help - a small simple code needed

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 ...
VIEWS ON THIS POST

199

Posted on:

Tuesday 20th November 2012
View Replies!

need to use shAppBarMessage for docking

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 ...
VIEWS ON THIS POST

222

Posted on:

Tuesday 20th November 2012
View Replies!

I really need help - can some one please help me here pls?

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
VIEWS ON THIS POST

328

Posted on:

Tuesday 20th November 2012
View Replies!

How can i play amr(*.amr) ,wav(*.wav) file in vb.net but no need windows media component to play it

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 vb.net pls pls save me now..... i wait for your reply to me, na
VIEWS ON THIS POST

287

Posted on:

Tuesday 20th November 2012
View Replies!

Last X characters needed.

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
VIEWS ON THIS POST

225

Posted on:

Tuesday 20th November 2012
View Replies!

Newbie needs help filtering a listbox

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 ...
VIEWS ON THIS POST

266

Posted on:

Tuesday 20th November 2012
View Replies!

What VB version do I need?

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 ...
VIEWS ON THIS POST

155

Posted on:

Tuesday 20th November 2012
View Replies!

Report designer error - help needed to configure orientation

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 ...
VIEWS ON THIS POST

254

Posted on:

Tuesday 20th November 2012
View Replies!

Help needed with query syntax

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 ...
VIEWS ON THIS POST

227

Posted on:

Wednesday 21st November 2012
View Replies!

Absolute beginner needs help with searching text files

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 ...
VIEWS ON THIS POST

264

Posted on:

Wednesday 21st November 2012
View Replies!

User variable in Excel - help needed

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 ...
VIEWS ON THIS POST

352

Posted on:

Wednesday 21st November 2012
View Replies!

need help converting C# to vb.net

need help converting C# to vb.net 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 ">"
VIEWS ON THIS POST

252

Posted on:

Wednesday 21st November 2012
View Replies!

Variable MSComm1 Threshold needed.

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 ...
VIEWS ON THIS POST

211

Posted on:

Wednesday 21st November 2012
View Replies!

Data Environment Designer - need additional table fields on form;initial dragging did not include them

-- 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 ...
VIEWS ON THIS POST

213

Posted on:

Wednesday 21st November 2012
View Replies!