|
Thus it should be a missing module (or at least that way sounds to me). You normally get that error when the system cannot create or load a specific object. Normally something you declared from an external reference (i.e. Dim myTAPI as TapiLib.TAPI where the TapiLib stays in a specific DLL).
Now since you get that error it seems that the reference goes to something that is not available/initialized at the time your programs load. So my suggestion is have a look at the reference in your assembly and see how do they are loaded.
|
|
|
|
|
On my VB project. I have several Buttons to click and some Warning messages may pop up.
But the sound comming from the speaker is anoying.
Also i use GotFocus() and jump from one textfield to another. Everytime after the keypress the sound comming out from the speaker and distract the user.
Is there any way to turn that sound event off? Thank for your advise.
David
-- modified at 19:49 Wednesday 12th October, 2005
|
|
|
|
|
i donot really understand what you mean! you mean the sound from mesbox???
I am Entry level person
|
|
|
|
|
The sound from the speakers.
like for example you
Msgbox "Help", vbCritical
David
|
|
|
|
|
These are system generated events. You can't switch them off for one program or dialog box. If the user is annoyed at the sounds there are two alternatives: 1. go to the Sounds and Audio Devices control panel and alter the settings for the events you don't want to hear, or 2. turn the volume down.
...Steve
|
|
|
|
|
Thanks.
I like the 1st one. But the thing is for the Warning event you need to hear the sound. Plus the user need to listen the music as well.
Thanks for the advise.
David
|
|
|
|
|
IcDavid wrote: Also i use GotFocus() and jump from one textfield to another. Everytime after the keypress the sound comming out from the speaker and distract the user.
It sounds like you need to rethink what your doing here. If the system generates a beep for every invalid keystroke, maybe you should be preventing this event from happening at all.
I don't profess to understand what your doing or why or what your project is all about. From your description, it sounds like your doing something that goes against Microsoft's recommended UI guidelines.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i need to make a connection and i have no idea how you think i can get some
help from you?
thank you
|
|
|
|
|
|
use notepad to create a udl file, which is just save the notepad as .udl then double click the udl file configure the connection through the dialog,after you done that you can open the udl file with notepad to get the connect string, then you just define the connection in the code and pass the string in.
Anyway there are many ways to do so, you can find many examples on the net!
I am Entry level person
|
|
|
|
|
WAY too overly convoluted just to do this:
Dim myConn As New SqlConnection("myConnectionStringGoesHere")
You don't need a .UDL file to open a connection.
And don't tell me this stuff. Reply to the Original Poster instead.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Just try out the following in VB.NET
Imports System.Data.SqlClient
Dim oSQLConn As SqlConnection = New SqlConnection()
oSQLConn.ConnectionString="my connectionstring"
oSQLConn.Open()
Kaushik Baruah
Programmer Analyst
Cognizant Technology Solutions,India
|
|
|
|
|
I was wondering if anyone out there has ever run into the problem of having a simple "Done" messagebox pop up behind the other window forms in your application and if so what was causing it and how did you fix it?
I have the messagebox set to ApplicationModel like so:
MsgBox("Done!", _<br />
vbOKOnly + vbApplicationModal + vbMsgBoxSetForeground, "Renewal")
but it still goes behind the other forms, and the user has to close out the whole application and restart because (s)he can't click on the Okay or anything else in the application.
|
|
|
|
|
This is probably off topic but i need a number generator
|
|
|
|
|
Uhhh.... Do you want to explain what that is? Are you talking about a Random Number Generator[^]? Easy:
Dim myRNG As New Random()
myRNG.Next(lowerbound, upperbound)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a listbox that I want to databind. How would I get the other fields to show up in text boxes for editing. Say like for a person, have their last name in a listbox, but how would you put first and last name in the listbox and have their attributes such as address, first name, last name, phone, etc.?
I've been unable to find any resources for this, and if you know of any please post.
Thanks
|
|
|
|
|
Hi
I am a beginner in .NET and I am making a program in .NET for communication (TCP) with a other device.
Now I have problems with threads and the tcplistener.
Here is what the program should do:
- a start button (for start listening on specified port)
- a stop button (to close connection and stop listening)
- if I click the start button and a connection is accepted, the connection must be retained untill I click the stop button, because I want to get more messages from my remote device.
Now I have the following code, but it fails to work with a working stop button (form hangs) and it closes my connection everytime the program send the message.
visual basic code:
Imports System.Net.Sockets<br />
Imports System.Text<br />
Imports System.Net<br />
<br />
<br />
Public Class Eventlogger<br />
Const portNumber As Integer = 779<br />
Dim ipAddress As ipAddress = Dns.Resolve("localhost").AddressList(0)<br />
Dim tcpListener = New tcpListener(portNumber)<br />
Private ListenThread<br />
Private parent As frmMain<br />
Private TcpClient As tcpClient<br />
Private password = "test"<br />
Private listening As Boolean = False<br />
<br />
<br />
<br />
Public Sub setParent(ByVal frmMain As frmMain)<br />
parent = frmMain<br />
End Sub<br />
<br />
Public Sub startListening()<br />
parent.btnStartListening.Enabled = False<br />
parent.btnStopListening.Enabled = True<br />
<br />
Console.WriteLine("listener started")<br />
ListenThread = New System.Threading.Thread(AddressOf Listen)<br />
ListenThread.name = "listener"<br />
ListenThread.Start()<br />
listening = True<br />
<br />
<br />
End Sub<br />
<br />
Public Sub stopListening()<br />
parent.btnStartListening.Enabled = True<br />
parent.btnStopListening.Enabled = False<br />
listening = False<br />
<br />
Console.ReadLine()<br />
tcpListener.Stop()<br />
Console.WriteLine("listener stopped")<br />
ListenThread.Join()<br />
<br />
End Sub<br />
<br />
Protected Sub Listen()<br />
While (listening)<br />
tcpListener.Start()<br />
Console.WriteLine("Waiting for connection...")<br />
Try<br />
<br />
<br />
'Accept the pending client connection and return <br />
'a TcpClient initialized for communication. <br />
TcpClient = tcpListener.AcceptTcpClient()<br />
Console.WriteLine("Connection accepted.")<br />
<br />
While (listening)<br />
<br />
<br />
' Get the stream<br />
Dim networkStream As NetworkStream = TcpClient.GetStream()<br />
<br />
<br />
' Read the stream into a byte array<br />
Dim bytes(TcpClient.ReceiveBufferSize) As Byte<br />
networkStream.Read(bytes, 0, CInt(TcpClient.ReceiveBufferSize))<br />
<br />
<br />
<br />
' Return the data received from the client to the console.<br />
Dim clientdata As String = Encoding.ASCII.GetString(bytes)<br />
Console.WriteLine((clientdata))<br />
<br />
If InStr(clientdata, "Password") Then<br />
Dim responseString As String = password & vbCrLf & "status" & vbCrLf<br />
Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes(responseString)<br />
networkStream.Write(sendBytes, 0, sendBytes.Length)<br />
Console.WriteLine(("Password send"))<br />
End If<br />
End While<br />
<br />
<br />
'Dim responseString As String = "Connected to server."<br />
'Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes(responseString)<br />
'networkStream.Write(sendBytes, 0, sendBytes.Length)<br />
'Console.WriteLine(("Message Sent /> : " + responseString))<br />
<br />
<br />
<br />
'Any communication with the remote client using the TcpClient can go here.<br />
'Close TcpListener and TcpClient.<br />
<br />
<br />
TcpClient.Close()<br />
<br />
Catch e As Exception<br />
Console.WriteLine(e.ToString())<br />
Console.ReadLine()<br />
End Try<br />
End While<br />
<br />
End Sub<br />
Private Sub closeTab()<br />
tcpListener = Nothing<br />
End Sub<br />
<br />
End Class
Could someone give me some hints to help me further with my program?
Christian
|
|
|
|
|
Hi!
I have a VB.NET app needs to be called from an asp page.For that i need a DLL of my app with a simple interface (4 functions and 1 property).How can i do this? I've tried to create a class library with those functions and then add my project, but i can´t use the classes i have there.Is this the correct way to do it?Or do i have to add each of the projects classes to the DLL i´m building?
Thanks in advance.
Never say never
|
|
|
|
|
carlos_rocha wrote:
I've tried to create a class library with those functions and then add my project, but i can´t use the classes i have there
what prob u r facing?
just simply add reference to the assembly and use those funcs in ur project
<< >>
|
|
|
|
|
please gimme the steps and codes to design a currency converter
thank you
|
|
|
|
|
rexford wrote:
gimme
Since this looks like a homework question, I'll help you to understand the problem. You should then have enough information to write your own code based on what ever book you are following or the information provided by your tutor.
Currency conversion is a fairly easy problem to solve. You have a source currency and a destination currency and a conversion factor. This is usually expressed in the format of one unit in the source currency is equal to some units of the destination currency.
For example. £1.00 == €1.46
So, to get from Sterling to Euros (left to right) you multiply the value by 1.46. To get from Euros to Sterling (right to left) you divide by 1.46.
How about if it is expressed the other way around.
€1.00 == £0.68
The calculation is the same (left to right / source to destination) you multiply. To go the other way (right to left / destination to source) you divide.
Does this help?
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
There's nothing to this. The most complicated part is getting the current exchange rate for the currencies involved. I don't know of a public source myself, but if you get this data, the rest is easy: TargetCurrency = SourceCurrency * ExchangeRate .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hmm,
Depend what information did you get?
for example you want to know for 50 USA is how much on money on RMB
Frist you need to know 1.00 USD = 8.50 RMB
then using the following equation
A = 1.00 USD_
B = 8.50 RMB_
C = 50.00 USD_
X = ? RMB_
A (USD_) = B (RMB_) --> eq.(1)
C (USD_) = X (RMB_) --> eq.(2)
X = (B/A) * C
You can create a Function to accomplish that.
Hope it will help. If I am wrong please correct me.
|
|
|
|
|
i need help to design a currency converter betwwen two currencies.i need the steps and the codes involed or if possible the tutorials...thank you for helping me.....quami
thank you very much...quami
|
|
|
|
|
hi there,
take a look on this article
Currency converter
it might give u an idea though it's for Pocket...
<< >>
|
|
|
|