|
Could anyone tell me whre i could see a list of visual basic string and math functions.
|
|
|
|
|
In the Object Browser. Press 'F2' in you code file. Select Math/String
|
|
|
|
|
can i make VB.net DLL,so i can import it and use it within programs that support dll ?
|
|
|
|
|
You can make a COM dll, or a .NET dll, depending on who you want to open it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
So when i make .NET dll with vb.net can i use it within my program(that support dll) as vc++ dll ?
|
|
|
|
|
I have created a Windows application and used the setup wizard for deployment purposes. It runs perfectly well on my machine but after I install the application on another machine and try to start it I get an error that says;
"Application has generated an exception that could not be handled.
Process ID 0x450 (1104), Thread ID 0x3a8(936)."
What have I messed up.
Shawn the desparate programmer
|
|
|
|
|
Is the .net framework installed on the host machine?
|
|
|
|
|
Yes it is. This is MS access database project with crystal reports. I think it may be a CR problem as this problem did not occur until I integrated the CR into the project.
|
|
|
|
|
You've probably already looked into these but . . . what the heck!
Something missing perhaps?
Is the expected version of the Framework installed?
Do you use Crystal Reports or some other third party software?
Config file?
If you haven't already, you might want to use the build option that pulls all of the accessed assenblies into the local Bin folder. And no, I can't remember what or where to specify it off the top of my head. Sorry.
Good luck!
Will
|
|
|
|
|
Apart from the framework being installed, ensure that your assembly has sufficient rights to execute on that machine (go to Control Panels -> Admin Tools -> .NET Framework Configuration utility).
Errors like this occur because you have (probably) created the assembly on a machine under a userid which had local admin rights so you never saw any problem in development. Installing it onto another machine and running under a user without local admins rights highlights that there is something in your assembly which relies on more than normal rights to execute.
This is a very good reason never to develop a program under a local admin id because inevitably you'll find out there is a problem only after deployment.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Whats wrong with this code
<br />
TextBox1.Clear()<br />
TextBox3.Clear()<br />
Dim datipass As New StreamReader("c:\0206USAGE.txt")<br />
Dim totalChargeByName As New SortedList<br />
Dim fields As String()<br />
<br />
Do Until datipass.Peek() = -1<br />
fields = datipass.ReadLine().Split(ControlChars.Tab) 'Or Convert.ToChar(Keys.Tab)<br />
If totalChargeByName(fields(2)) Is Nothing Then<br />
'Start tallting for the new name.<br />
totalChargeByName.Add(fields(2), CDec(fields(9)))<br />
'TextBox1.AppendText(fields(2).ToString & " " & fields(9).ToString & vbNewLine)<br />
Else<br />
'Add the new charge for the existing name.<br />
totalChargeByName(fields(2)) = CInt(totalChargeByName(fields(2))) + CDec(fields(9))<br />
End If<br />
Loop<br />
<br />
Dim x As String<br />
Dim y As Decimal<br />
Dim total As Decimal<br />
Dim i As Integer<br />
For i = 0 To totalChargeByName.Count - 1<br />
x = totalChargeByName.GetKey(i)<br />
y = totalChargeByName.GetByIndex(i)<br />
total = y + total<br />
TextBox3.AppendText(x & y.ToString("C").PadLeft(20) & vbNewLine)<br />
Next i<br />
TextBox1.Text = total.ToString("c")<br />
datipass.Close()<br />
This is the text im trying to sum up
<br />
056:13459131 6802941 bkeveney editorial.usatoday.com "US,Beverly Hills,CA" 2/6/2006 20:43 2/6/2006 20:43 11887 0.9 0.50 DIAL usage<br />
053:113898037 6802941 rbarbrow editorial.usatoday.com "US,Beverly Hills,CA" 2/7/2006 17:31 2/7/2006 17:31 470 0.9 0.50 DIAL usage<br />
054:113461388 6802941 bkeveney editorial.usatoday.com "US,Beverly Hills,CA" 2/7/2006 23:34 2/7/2006 23:34 20253 0.9 0.50 DIAL usage<br />
051:117142732 6802941 rbarbrow editorial.usatoday.com "US,Beverly Hills,CA" 2/12/2006 0:30 2/12/2006 0:30 13480 0.9 0.50 DIAL usage<br />
055:13716868 6802941 bkeveney editorial.usatoday.com "US,Beverly Hills,CA" 2/12/2006 4:30 2/12/2006 4:30 13498 0.9 0.50 DIAL usage<br />
052:113234620 6802941 rbarbrow editorial.usatoday.com "US,Beverly Hills,CA" 2/12/2006 9:47 2/12/2006 9:47 18520 0.9 0.50 DIAL usage<br />
051:117156396 6802941 bkeveney editorial.usatoday.com "US,Beverly Hills,CA" 2/12/2006 12:28 2/12/2006 12:28 3567 0.9 0.50 DIAL usage<br />
051:117172183 6802941 rbarbrow editorial.usatoday.com "US,Beverly Hills,CA" 2/12/2006 21:17 2/12/2006 21:17 5035 0.9 0.50 DIAL usage<br />
Baiscly its not adding up right (this is just example text to show the point that it wont add like numbers or something ive tried walking threw it and i just dont see where tis screwing up
-- modified at 22:15 Wednesday 19th April, 2006
|
|
|
|
|
What is the result that you get, and how does that differ from what you expect?
---
b { font-weight: normal; }
|
|
|
|
|
bkeveney = 2.00 ( ie .50 + .50 +.50 +.50)
rbarbrow = 2.00( same)
what im getting is
bkeveney = .50
rbarbrow = .50
now if it was more than just .50s
lets say 2.34 it would add that correctly and give me 2.84
|
|
|
|
|
You are converting the sum to int before adding every value. Int(0.5) + 0.5 = 0.5
You don't have to convert the sum at all, you already know that it's a number.
---
b { font-weight: normal; }
|
|
|
|
|
Why should converting it keep it from adding like numbers
for example if i change the values to .51 and .52 i will get 1.03
if i try to add .50 and .50 i get .50
|
|
|
|
|
hi in vb6 there was controll known as the microsoft internet controll that used to display web pages. is there is any similar controll in .net to display the web pages.
Tasleem Arif
|
|
|
|
|
Yes, there is one. If you are using the .NET Framework 2.0, you can use the builtin Webbrowser Control. Otherwise, you can use the WebbrowserEx Control mentioned here.
Yuvi Panda T
Microsoft Student Partner
Blogs at : http://yuvipanda.blogspot.com
|
|
|
|
|
I'm trying to add support for Oracle ODP.Net Bulk Data Binding to an existing component that looks a lot like the Data Access Application Block in Patterns & Practices' Enterprise Library.
My problem is that an unknown (at compile time) number of arrays of unknown types can be passed in based on the database columns that are to be populated.
When I try to cast an array element to String:
dbParam.ArrayBindSize(i) = Convert.ToString(dbParam.Value(i)).Length
or
dbParam.ArrayBindSize(i) = CType(dbParam.Value(i), String).Length
or
dbParam.ArrayBindSize(i) = dbParam.Value(i).ToString()).Length
to get it's length, the compiler complains:
Option Strict On Disallows Late Binding .
I know I'll get a lot of resistance if I suggest turning Option Strict Off. Is ther any other way to circumvent the compiler?
Thanks In Advance.
Will
|
|
|
|
|
Hi there,
I just begun to try out the generics stuff and start realizing the huge range of possibilities this feature offers.
However, I got a question in this context:
Let say I have a class (which I don’t know during design time) with two properties: one of Boolean and another one of String.
Then I got a generic class like:
Public Class Something(Of T)
I’m looking for an elegant way to create instances of the generic class during runtime depending of the data types of the properties of the first class like:
Dim Instance1 As New Something(Of Datatype of the first property) --> Boolean
Dim Instance2 As New Something(Of Datatype of the second property) --> String
Thanks in advance for any hint!
Rudi
|
|
|
|
|
If you are trying to select the data type dynamically using Generics, that is not possbile. The data type has to be known at compile time, or the compiler can't create the code for the Generics. The entire point of Generics is that the code is created for a specific data type so that it is efficient and type safe.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for the quick reply, Guffa!
No, I’m actually not trying to "change" the data type during runtime. Let me explain how I would do it the “common” way:
Dim Instance1 As New Something(Of Boolean)
This is what I can do at runtime within a method of course.
If I now have a variable like
Dim SomeString as String
my intention now is to
Dim Instance1 As New Something(Of <the same="" data="" type="" like="" somestring="" is=""> )
May be this is a bit more clear now.
|
|
|
|
|
I don't see the problem? SomeString is a string, you know that. Why not just:
Dim Instance1 As New Something(Of String)
---
b { font-weight: normal; }
|
|
|
|
|
No, sorry the sample was just meant to simplify the problem. At run time I just know the name of the variable not the data type, it could be everything. I can get the data type by reflection but I don’t know the syntax to use for
Dim Instance1 As New Something (Of data type of the variable I’ve got by reflection)
|
|
|
|
|
The data type has to be known at compile time. You can't get a data type using reflection and use that to create a generic object.
---
b { font-weight: normal; }
|
|
|
|
|
A great pity! It would solve some of my problems.
Anyway, thanks a lot for your support Guffa!
Rudi
|
|
|
|