|
Yes I did. I was able to use the imput mask in the access database and it worked when you opened access. When I pulled that column into a datagrid it didn't bring the mask with it. So it still displayed 1234567895 instead of 123-456-7895? Is there something special that I have to do in .Net to display the input mask as well?
Thanks
Tim
|
|
|
|
|
We are using async socket for our client application to connect and send/receive data from the server. It works fine for most of the time but some times we get a socket exception "An existing connection was forcibly closed by the remote host". It happens when we try to senddata to the host after connecting with host.
1. BeginConnect(remoteEP, AddressOf CallSocConnect, Me)
2. BeginSend(Data, 0, Data.Length, 0, AddressOf CallSocSend, Me)
What are the common reasons for this exception?
Is it possible that we didn't even connect with the host but we tried to send data?
Thanks for any inputs..
|
|
|
|
|
We are still having this issue, will update once its fixed.
|
|
|
|
|
hey guys! got a problem about passing an array of structure as arguments in vb.net.. i have this structure...
i have to pass an array of struct... like... Dim AccessArray(100) As AccessPointsInfo.. i just couldnt find a way....
Structure AccessPointsInfo
Dim sysIPAddress As String
Dim sysPortNumber As Integer
Dim sysAccessPointID As String
Dim sysStatus As Byte
End Structure
Private Declare Function GetAccessPointsInfo Lib "Sample.dll" (ByRef AccessPt As AccessPointsInfo) As Long
i have to pass an array of struct... like... Dim AccessArray(100) As AccessPointsInfo.. i just couldnt find a way....
|
|
|
|
|
I want to know how to use a datagrid or a flexgrid to get input from the user. Basically I nee d to get information from teh user in a matrix arrangement like a grid but I'm not sure how to use these controls to do it.
I haven't used these controls much and would gladly appreciate the help;)
|
|
|
|
|
OK here's the situation. Say we have a whole bunch of equations in the database. EG: "A + B * C". Now we get the equation and substitute values into it so we now have a string like "10 + 5 * 3".
Is it possible now to evaluate this expression without having to break the whole string into itty bitty pieces to work with? Is there some magic Execute(equation) function in .NET?
Thanks,
Nic
The man who smiles when things go wrong has thought of someone he can blame it on.
If you tell a man there are 300 billion stars in the universe, he'll believe you. But if you tell him a bench has just been painted, he'll have to touch it to be sure.
|
|
|
|
|
Nic Rowan wrote:
to break the whole string into itty bitty pieces
Isn't that called parsing?
Nic Rowan wrote:
Is there some magic Execute(equation) function in .NET?
Not really. However someone did post a project that does what you want, although it is in C#, it could easily be rewritten for VB.NET. Runtime C# Expression Evaluator[^]. I would guess that the line that sets up the C# Compiler could easily be changed to a VB.NET compiler.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Colin Angus Mackay wrote:
Isn't that called parsing?
Ya, but it doesn't sound as cool as itty bitty pieces
Colin Angus Mackay wrote:
However someone did post a project that does what you want, although it is in C#,
That's great thanks ! C# isn't a problem, I was actually just going to post the same question there
The man who smiles when things go wrong has thought of someone he can blame it on.
If you tell a man there are 300 billion stars in the universe, he'll believe you. But if you tell him a bench has just been painted, he'll have to touch it to be sure.
|
|
|
|
|
hii can anyone give me an example of how to import xml file and then insert the element of that xml file to microsoft access table
|
|
|
|
|
Hey,
U can use a XML reader to read the XML file into a DataSet and then use the DataTables to add the data to the MS Access Table
HTH
Chris
|
|
|
|
|
I have been trying hard to get answers from many forums as I can join but so far none have given me a concrete answer.
How can I use my Crystal 8.5 in VBNEt 2002 Std. version. I have downloaded
CE85PIA.zip a Crystal Enterprise™ .NET Developer’s Guide for CE 8.5 still the .Net assembly needed in processing reports are not available.
I need to make Crystal 8.5 in VBNet 2002 Std work very badly.
|
|
|
|
|
hi,
I want to program serial ports in vb.net. Anyone plz tell me how to start. If u know plz refer me good resources or links.
Thanks in advance
|
|
|
|
|
HOW TO: Access Serial Ports and Parallel Ports by Using Microsoft Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;823179&Product=vb6
|
|
|
|
|
I'm relatively new to the languange, so I apologize for the newbishness exuded by this question. I'm trying to write a program where, among other things, pressing a button will take writeable text from TextBox1 to the read-only TextBox2. My problem comes when I want to have each sequential text entry on a new line. For example, I'm getting
FirstTextEntry:SecondTextEntry:ThirdTextEntry
when I want
FirstTextEntry
SecondTextEntry
ThirdTextEntry
I've tried appending Chr(13), to both the input at the time of entry and to the display window after each entry, but it makes no visible changes. Any ideas on how to accomplish this?
----------------------------------------------
They say that if you play a Windows Install CD backeards, you can hear Satanic messages. That's nothing, play it forwards and it installs Windows.
|
|
|
|
|
You should use Environment.Newline rather than Chr(13). You'll notice that Environment.Newline adds 2 characters as is necessary in Windows.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Hello All,
Is there nothing in VB.net equivalent to a Form Unload in VB6?
Thanks,
nju0843
|
|
|
|
|
which one do you want?
Protected Overrides Sub Finalize()
MyBase.Finalize()
End Sub
Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)
End Sub
Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
End Sub
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Close()
End Sub
|
|
|
|
|
i have a code for getting image from scanner in c# i want to convert it into vb.net. the C# code is
private string imageFileName;
bool takeFirst = true;
foreach( object wiaObj in wiaPics ) // enumerate all the pictures the user
// selected
{ //wiaPics is of wiaLIB.CollectionClass
if( takeFirst )
{
wiaItem = (ItemClass) //wiaItem is of WiaLIB.ItemClass type
****line to consider***
Marshal.CreateWrapperOfType( wiaObj, typeof(ItemClass) );
imageFileName = Path.GetTempFileName(); // create temporary file for
// image
Cursor.Current = Cursors.WaitCursor; // could take some time
this.Refresh();
wiaItem.Transfer( imageFileName, false ); // transfer picture to our
// temporary file
pictureBox.Image = Image.FromFile( imageFileName ); // create Image
// instance from
// file
takeFirst = false;
thanx in advance
☺«««DTA»»»☺
|
|
|
|
|
somthing like this:
Private imageFileName As String
takeFirst As Boolean = True
For Each wiaObj As Object In wiaPics
If takeFirst Then
wiaItem = (ItemClass)
Marshal.CreateWrapperOfType(wiaObj, GetType(ItemClass))
imageFileName = Path.GetTempFileName()
Cursor.Current = Cursors.WaitCursor
Me.Refresh()
wiaItem.Transfer(imageFileName, False)
pictureBox.Image = Image.FromFile(imageFileName)
takeFirst = False
End if
Next
The C# to VB converter is Here:
http://www.developerfusion.com/utilities/convertcsharptovb.aspx
|
|
|
|
|
Hello,
I have Form1 wich loads at startup. When i press one button on this Form1, it launches Form2.
The problem occurs in when i try to exit. It will bring up a MessageBox for to ask you if i want to Exit Form2. If I press No, Form1 comes in front of Form2. Is there a way to make sure that Form2 stays upside.
Details. Form2 TopMost must stay False. Because the problem i have when it is enabled is that Form1 is activated while Form2 is in front.
Can someone help me with this.
Thanks
<br />
Private Sub Form_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing<br />
If OK2Close = False Then<br />
If MessageBox.Show("Are you sure you want exit?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification) = DialogResult.No Then<br />
e.Cancel = True<br />
<br />
End If<br />
End If<br />
End Sub<br />
|
|
|
|
|
When a form calls MessageBox, the message box is shown Modally to the caller form.
It means that, until the message box hasn't moved away, you cannot access the caller form. One other thing that a modal form (here the MessageBox) does, is that it sets the focus to it's caller form, say the Parent Window.
If you call MessageBox from Form1, it will set the focus on Form1.
But to handle your problem, I suggest:
Make a Public Function in Form2 that shows the message box and returns either True if Ok was pressed or False if Cancel is pressed.
Now in the Form_Closing event of form1, instead of calling the message box, call the function in Form2 and simply check the return value!
I think this is going to solve your problem.
|
|
|
|
|
Can we change the background color of the listview such that we can have row 1 which can have background color as red and row2 should have background color as blue ?
Thanks
|
|
|
|
|
Try the following ,
when you are adding a item to your list view check for alternate row to apply different color.
Say if current row is odd row then write
ListView1.Items(itemindex).BackColor = (New System.Drawing.Color).Aquamarine<br />
and if it is even then
ListView1.Items(itemindex).BackColor = (New System.Drawing.Color).Bisque
Please note that this code colors background of all columns but if the last column width dosen't fills the list view then the list view background appears. So make sure that you columns fits the listview width.
Kumar Saurabh
|
|
|
|
|
Kumar saurabh wrote:
Say if current row is odd row then write
ListView1.Items(itemindex).BackColor = (New System.Drawing.Color).Aquamarine
and if it is even then
ListView1.Items(itemindex).BackColor = (New System.Drawing.Color).Bisque
How do you determine which row is ODD or EVEN?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I never coding in for this purpose, but I just have some concept from other developer on the internet. Example that you loop to call record from the database and display on the list view.
1. Loop one by one of your record to and put it in the listview row by row.
2. May be use MOD function to check for a remain value of listview index number. (if 2/2 remain 0, if 3/2 remain 1).
3. Base on the remain (only 1 and 0) they can set the background of each row in the listview at the time of loop process.
Try to use google to search for this case and wish you good luck.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|