|
I don't know if there's an easy way - but if you scroll down to LNK on this page[^], there are a couple of PDFs you can download which should help.
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) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Got it - you need to add a reference using the COM tab to Windows Script Host Object Model.
Add this to your usings
using IWshRuntimeLibrary;
Then you can do something like this
string shortcutLocation = @"C:\Your Shortcut.lnk";
WshShellClass wsh = new WshShellClass();
IWshShortcut shortcut = (IWshShortcut)wsh.CreateShortcut(shortcutLocation);
Console.WriteLine(shortcut.TargetPath);
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) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Works like a charm!
Thank you
|
|
|
|
|
Hi ,
i want to specify the maximum number of digits for numeric part and the Decimal part in a text box.
i tried specifying precision and maxlength of the text box but then it if we input the max length then the precesion cannot be inputted and it gets resetted to the maxamount which should not be possible.
like if Maxlength=8
precsion = 2
input required:123456.90 possible
input required : 12345678.89 which is not possible
so is there any way we could specify the format of the numeric part and as well the decimal part. which would restrict for only that particular input format.
like : dddddddd.dd
thanks in advance....
cheers,
sriharsha
|
|
|
|
|
Use a masked edit box.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi,
i have tried using masekedit ,
<ajaxtoolkit:maskededitextender id="MaskedEditExtender1" runat="server" acceptnegative="Left" displaymoney="None" mask="9999999.99" masktype="None" messagevalidatortip="true" oninvalidcssclass="MaskedEditError" targetcontrolid="TextBox4" clearmaskonlostfocus="false">
<ajaxtoolkit:maskededitvalidator id="MaskedEditValidator1" runat="server" controlextender="MaskedEditExtender2" controltovalidate="TextBox4" cssclass="InputFieldRed" display="Dynamic"
invalidvaluemessage="Invalid " isvalidempty="false" tooltipmessage="" validationgroup="Search">
;
when for example
input is 12345678.90 no problem
but when
input is 11.11 > it changes to 1111 when i click it again.
and when it is something like
input is 11 .11 it changes to 1111 when i click it again.
is there any way it takes the input in a normal way and also restrict the format required for the number.
thanks and regards,
sriharsha
|
|
|
|
|
Verify whether the decimal-separator is set to a dot - if it thinks that it's a thousand-separator, it will simply remove it from the input
"please help in this regard. give the visual basic code for this as soon possible."
|
|
|
|
|
hi,
i even tried specifying
property Filtered="." of maskededit
but it does not work still the same problem.
what can be done to avoid it ...
thanks ans regards,
sriharsha
|
|
|
|
|
"Filtered"? Didn't you mean Mask [^]?
"please help in this regard. give the visual basic code for this as soon possible."
|
|
|
|
|
Hi,
No
<ajaxtoolkit:maskededitextender id="MaskedEditExtender1" runat="server" acceptnegative="Left" displaymoney="None" mask="9999999.99" masktype="None" messagevalidatortip="true" oninvalidcssclass="MaskedEditError" targetcontrolid="TextBox4" clearmaskonlostfocus="false" filtered=".">
Filtered="." property of maskededitexteneder .
but not working.
where else can we set the decimal...?
thanks and regards,
sriharsha
|
|
|
|
|
In the configuration panel, under "Regional Settings" - but that applies only to the culture of the local computer.
The extender is part of the AJAX-framework, and the control is unknown to me. I suggest asking this question in the ASP.NET forum
"please help in this regard. give the visual basic code for this as soon possible."
|
|
|
|
|
hi,
is there any way through c# we could fix the format or maximum length for numeric part and decimal part.
like
number format: (8,2) only.
thanks
sriharsha
|
|
|
|
|
Information on formatting a string can be found here[^]. That's for display - it won't stop the user from entering three decimals.
You can use the MaskedTextBox.Mask [^] property to get more control on the input.
Good luck
"please help in this regard. give the visual basic code for this as soon possible."
|
|
|
|
|
Hi ,
I used Regularexpression and its working fine.
as:
<asp:regularexpressionvalidator id="regexpName" runat="server"
errormessage="This expression does not validate."
controltovalidate="TextBox5"
validationexpression="^\d{1,8}(\.\d{1,2})?$" enableviewstate="true">;
in
controltovalidate : speicfy the textbox to validate
ValidationExpression: which validates the expression in the format (8,2)
otherwise gives error.
Thanks for all suggestions.
sriharsha
|
|
|
|
|
Hi
Please Help me i get this error when i connect to database
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
i use this coding
" SqlConnection con;
SqlCommand cmd;
SqlDataReader dr;
private void login_Click(object sender, EventArgs e)
{
con = new SqlConnection("integrated security = true;Database=orcl8i;Password=creative;User ID=itehad");
cmd = new SqlCommand();
cmd.Connection = con;
cmd.Connection.Open();
cmd.CommandText = "Select * from users";
dr = cmd.ExecuteReader();
while (dr.Read())
{
if (usr.Text == dr["userid"].ToString()) && pass.Text == dr["password"].ToString)
{
MessageBox.Show("User Login", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("Login Fail")
|
|
|
|
|
I assume that you have a direct link to Code Project on your desktop, and your browser has had the address bar physically torn off it and thrown away in the trash. After all, a quick search returns lots and lots of hits[^] for this. I know that it means you've got some reading to do, but you wouldn't want us to hold your hand for you, now would you?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: you wouldn't want us to hold your hand for you, now would you?
is that a trick question?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Check if your connectionstring with DB is correct.
check this[^]
I Love T-SQL www.aktualiteti.com
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Can't understand let me explain please
|
|
|
|
|
I might be mistaken, but is:
mjawadkhatri wrote: integrated security = true;Database=orcl8i;
really a SQL Server database?
|
|
|
|
|
|
Then, supplying a SQL Server connection string isn't going to help you. Oracle connection strings typically look like:
Data Source=oracledb;User ID=userid;Password=password;Min Pool Size=2;Connection Lifetime=60;Connection Timeout=60; Incr Pool Size=5; Decr Pool Size=2
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thanks For Given b great response
bt when i use your given code i get this Error
Keyword not supported: 'incr pool size'
please help me Pete O'Hanlon.
|
|
|
|
|
Where to start? First of all, you are connecting to Oracle but you are using Sql Server classes in your code. You need to use the appropriate Oracle drivers, rather than SQL Server, and use the Oracle classes such as OracleConnection. Download, and have a look at, the ODP.NET providers from Oracle.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
okk.
thank u so much sir.
|
|
|
|