|
Hi,
I'm displaying search results in a listview control VB.Net and I want to highlight or at least make the searched text bold in the listview items and subitems. Can anyone help please?
Thanks,
Ruki
Ruki
|
|
|
|
|
I am trying to find a masked textbox(textbox with input mask capability) to be used in a web form. I find plenty of masked textbox for winform.
Thanks
Seeker55
Seeking that which expands the limit
|
|
|
|
|
How can I change a Cursor Image with the MouseEnter/MouseLeave event of a control? VB 6 used to have a Custom Image choice but I cannot find any such option with VB.NET.
Thanks
|
|
|
|
|
You still use the MouseEnter and MouseLeave events of the control. Then you just set the Cursor property to whatever you want:
Private Sub Button1_MouseEnter(blah, blah) Handles Button1.MouseEnter
Cursor = Cursors.Hand
End Sub
Private Sub Button1_MouseLeave(blah, blah) Handles Button1.MouseLeave
Cursor = Cursors.Default
End Sub
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave, Thanks for your response. If I wanted to change 'Cursor = Cursors.Hand' to an image of my choice I would have to load the Cursor=Cursor.(from a file location "C:\Icons\MyChoice.ico)?
Pete
|
|
|
|
|
You can read up on the <a href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.cursor(VS.80).aspx" rel="nofollow">Cursor</a>[<a href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.cursor(VS.80).aspx" target="_blank" rel="nofollow" title="New Window">^</a>] class first. You cannot use an *.ico file for a cursor though. Only *.CUR files are supported!! And only in black and white with no animation!!
Cursor = New Cursor(filepath.cur)
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi!
I have a problem with VB and ICQ.
E.g i run:
TaskID = Shell("C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE /c ipm.note /m " & Form2.Label1(8), vbNormalFocus)
Label (8) is like "john.smith@usa.com" This works fine. Outlook opens and the Adress is set to "john.smith@usa.com"
But...
I cant get it work with ICQ in the way that the contacts ICQ-number is used at a parameter and both ICQ and the contact/message window will open.
I get the ICQ opened using the line below but the user 327414049 will not be opened.
TaskID = Shell("c:\Program Files\ICQlite\Icqlite.exe 327414049", vbNormalFocus)
Any suggestion?
/Samb
|
|
|
|
|
That would depend on if IcqList supports command line arguments. I have no idea if it does. If not, there's not much you can do about it.
Check out hte documentation on ICQ Lite or try launching it with the /? switch on its command line.
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 21:00 Wednesday 12th April, 2006
|
|
|
|
|
Hi.
I need to write a code that will monitor a server system (I was thinking FileSystemWatcher or Reading Event Logs) for file creation, modification, deletion, etc. The problem I have with FileSystemWatcher is that it can't tell who's creating, modifying etc. the files on the server and I need to know user name. With Event Logs I need to parse it somehow becuse it creates many events when someone let's say opens a word document and it slow and crashes when there are too many events happended (I don't even want to mention parsing for date, etc.). It seems FileSystemWatcher is a good solution but like I've said above..... and it can only handle one extension at the time (but I can go around that).
Did anyone have any experience with this? How can I get user name with FileSystemWatcher. As soon as I install it as a service on my server I no longer can use WindowsPrincipal because it returns user as a SYSTEM and I need to know who's actually createing/modifying files.
Thank you.
|
|
|
|
|
What you want is a bit impractical. The FileSystemWatcher isn't meant to watch entire drives or large numbers of subfolders. It's performance also suffers when you try to us it acrossed a network.
Basically, you're looking for something like FileMon[^] from SysInternals.com. This would have to run on the server itself, so you'd have to evaluate if the performance impact will be acceptable. At the bottom of the page, there is a link to buy the Enterprise version which will monitor remote file systems AND log any activity you want to a file.
Be VERY careful with this. You can generate a HUGE log file if you have it monitor too much stuff at once.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thank you very much. I will take a look at it.
|
|
|
|
|
The case is that, I have to click a link on the intratnet website to pass something in my application,
My stupid method is click the link and download a abc.key file, all the computer set that, this file can be opened by my application.
And then I can get the data in that file in my VB.net application.
How the question is, after I associate the file to my application,
How VB.NET to get which file cause the startup the application??
Beside, any other better method?
I can use asp, client side VB Script in that website with low security.
Thank you!
|
|
|
|
|
Your post isn't very clear at all. I'm guessing that you want to know how, if you double-click this file you downloaded, your VB.NET app will know which file to load. Easy, Environment.GetCommandLineArgs[^]. Your full file path will be the 2nd String in the returned String collection.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thats what i wanna know, Thank You.
Besides that, When my application startup, I will check is my application already open. It check the process name in Windows. If yes, it won't be opened again.
The Question is, If the user already open the application,
Does any method that I can send the path to the application(already opened one)?
Thank you again.
|
|
|
|
|
This is much harder to implement. Search the articles for "Single Instance[^]" and you'll lots of stuff describing the techniques.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello everyone!
How do I convert a string containing a currency back to a decimal? I tried the following, but it gives me a System.FormatException: Input string was not in a correct format exception.
Dim dRate As Decimal
If IsNumeric(txtRate.Text) = True Then
dRate = Convert.ToDecimal(txtRate.Text)
Else
MessageBox.Show("Rate must be numeric", "Data entry error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
End If
The problem is the currency sign.
Thank you!
Pieter
|
|
|
|
|
If a string starts with a currency symbol, like £ or $, then you wont be able to convert it to a decimal until you remove that character.
decimal.Parse("£123.45"); <-- fails
decimal.Parse("123.45"); <-- works
|
|
|
|
|
Thank you for the reply.
I did a bit of searching on the internet, and was able to come up with the following solution:
Imports System.Globalization
mRate = Decimal.Parse(txtRate.Text, NumberStyles.Currency)
Regards,
Pieter
|
|
|
|
|
hellow to all ..
i had build a Crystal Report , i need to pick values from 2 tabels and show them , the 2 tabels are not related in keys , and to pick the values i need to use the SelectionFormula method ..
i had't have any success anyone can help or give me his opinion ?
thxx
|
|
|
|
|
Here u got some good examples with crystalreports
|
|
|
|
|
maybe you should try a different datasource. You can build your relation outside of crystal and bind the report to that data. Stored Procedure would be good for that using a join or there are always subreports. You can create relations with datasets as well and bind you report to that or even an array, limitless possibilities.
Maybe if you posted you programming environment and th erelation you are trying to creat someone ccould help more.
|
|
|
|
|
Hi to all,
I working to a query tool. The user can load a query and execute it. Some queries can contain "variables". I looked on Internet and I found they can have different aspect.
The Microsoft provider executes with no problem, queries like:
SELECT * FROM Table WHERE ID = :variable
I'm trying to execute queries like:
SELECT * FROM Table WHERE ID = ?
SELECT * FROM Table WHERE ID = &variable
SELECT * FROM Table WHERE ID = &<name="variable1" type="string">
They are named as follow:
Oracle style bindings
JDBC style bindings
Name unknown (used for example by QueryReporter)
Name unknown (used for example by QueryReporter)
To do that I've wrote a Regular Expression for each type.
"[\s]*?:[\s]*?([A-Za-z0-9^\s^<^,]*)"
"[\s]*?([\?])[\s^,^<]*?"
"[\s]*?&[\s]*?([A-Za-z0-9_^\s^<^,]*)"
"&[\s]*?<[\s]*?[nN][aA][mM][eE][\s]*?=[\s]*?""([^""\r\n]*)?""[\s]*?([tT][yY][pP][eE][\s]*?=[\s]*?""([^""\r\n]*)?""[\s]*?)?>"
My problem is this one:
I want to exclude the strings contained inside "" or ''
e.g.
I don't want to match ":this" because it's not a variable to bind
SELECT * FROM Table WHERE Column = "Hello world :this is me"
Hope I've been clear
Thanks in advance
|
|
|
|
|
Danilo Corallo wrote: Hope I've been clear
You've not been clear at all... try asking a question for starters
|
|
|
|
|
I need a Regular Expression to match the bold part:
SELECT * FROM Table WHERE ID = ¶meter
but not this one
SELECT * FROM Table WHERE ID = "Me&You"
Thanks
|
|
|
|
|
Does anyone know the 'correct' way of adding a details element to a form? You know the sort of thing where the button shows "Options>>" and the form expands to show additional details - such as on the Windows ODBC configuration.
I know that you can resize the form and add the controls dynamically, but want to know if this is the 'normal' way of doing this. If there's a tute on here, a link to that would be great.
|
|
|
|