|
Hi tom thanks I really appreciate your help.
I got your instructions but I still have many questions. Once I recorded the manual filling of the records I want to transfer from text file to excel, whats next?
The source file is changing monthly. I mean the positioning of the specific record in the text file is changing. Will this way still work?
Thanks.
|
|
|
|
|
anybody who can help me on this thing! Thanks
|
|
|
|
|
adding my program to currnetUser\...\Run in the registry...
causing the debuger to run with TypeIntialize Exception in Unknow Module...
my program has a sub main in a module...
so someone tell me what is the problem and how to deal with it?
militiaware
|
|
|
|
|
be more specific. you get the error only if you run the program at the startup or every time you launch the exe? What's exactly the error (full reference)
|
|
|
|
|
this problem appears only when the windows startup... and no problems comeout when i run the program directly on double click .
when the Windows starts... a new instance of the debugger run.. then it come out with this message:
An unhandled exception of type 'System.TypeInitializationException' occurred in Unknown Module.
Additional information: The type initializer for "MyProgram.MyModule" threw an exception.
so what's the problem?
militiaware
|
|
|
|
|
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
|
|
|
|