|
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.
|
|
|
|
|
You don't need to add controls dynamiclly...
You can simply resize the form so that if you don't want to show them they are hidden and then when you want to show details you simply make the form big enough that all the controls are shown...
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hello EveryOne,
How to allow only numeric values ina textbox.if we allow characters it should pop up a message showing "need to enter numeric values".
Please HElp Regarding this,
Thanks
Nagalakshmi
|
|
|
|
|
Hi,
I don't know if this is the best way of doing it, but you could capture the textbox on change event and then loop through each char in the text field to check if it is a number or not.
So something like this:
<br />
Public Sub OnTextChange(Byval sender as Object, Byval e EventArgs) Handels T.TextChanged<br />
<br />
for each c as Char in T.Text.Chars<br />
<br />
if Not c.IsNumber Then<br />
MessageBox.Show("Bla bla bla")<br />
<br />
end if<br />
<br />
Next<br />
<br />
<br />
End Sub<br />
<br />
Hope this helps
/Johan
|
|
|
|
|
u can also do this on keypress event of text box
Private Sub txt1_KeyPress(KeyAscii As Integer)
dim strValid as string
strValid = "1234567890"
if instr(strValid , chr(keyAscii)) = 0 then
keyAscii = 0
end if
end sub
It would help u not to enter any character other than numeric values
Noshaba
|
|
|
|
|
Rather than annoy the user with a popup message which theyneed to discard every time they type an incorrect character, you should really restrict the characters that can be entered in the first place.
There are plenty of articles/posts on this subject here at CP if you search.
|
|
|
|
|
I built a little function:
function CashVal (byRef Intext as object, byRef ErrInd as boolean) as double
1. Check Intext to be sure it's not nothing
2. Check Intext to be sure it's not null
3. Check Intext to be sure it's numeric (and in my case, > 0...)
4. Return CDbl(Intext) and an appropriate ErrInd.
I invoke this (x = CashVal(textboxname.text,Error_Indicator) )when the "leave" event is fired, so the user can type anything, and it's evaluated as a whole. The event handler checks to see if there was an error. If not, it sets the text property of the text box to format (x, "currency"). If there's an error, obviously, it can react appropriately.
|
|
|
|
|
http://www.cambiaresearch.com/cambia3/snippets/javascript/browser/allownumbersonly.aspx
|
|
|
|
|
One of easy ways....
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress<br />
If (AscW(e.KeyChar) < 48 Or AscW(e.KeyChar) > 57) And Not e.KeyChar = Chr(Keys.Back) Then<br />
e.KeyChar = Nothing<br />
End If<br />
End Sub
Regards,
Chatura Dilan
|
|
|
|
|
hellow to all ..
i wanna count in crystal reports field that have boolen values , but i wanna count them when they are true ..
how can i do this ?
|
|
|
|
|
I am useing DataGrid
VB.NET ,WINFORMS
I want to place Buttons/Hyperlink for a entire Coloum when grid is displyed
i had done some coding but, the but is displyed in ACTIVE Cell only,
but i want it to be disply by default in entire column
Any Advice/Suggestions.../links
Thanks in Advance
-- modified at 2:37 Wednesday 12th April, 2006
|
|
|
|