|
If he clicks the Cancel Button the ShowDialog method of OpenFileDialog button will return DialogResult.Cancel and you can check for this to do what you want. Hope I understand your question.
|
|
|
|
|
Thank you very much, now it is working.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Wouldn't it be viable to use a message box to alert the user that he or she has clicked on the cancel button, after using the DialogResult.Cancel to the OpenFileDialog?
bravo659
|
|
|
|
|
Hi,
How could I create COM objects in VB.NET?
I'd be glad if someone tells me.
Thanks.
|
|
|
|
|
|
I have a project to make a spread sheet application like Microsoft Excel using c++. I have problem with the library that i should use. Maybe one of you can help me? Thank's before
|
|
|
|
|
First, this is not a very specific question. You say you "have a problem with the library that i should use". But use for what? There are hundreds of libraries out there, all specialising in one thing or another.
Second, and more importantly, this is not the C++ forum. I suggest you post your question to the correct place and then you might get a response that will help you from people who know the subject area.
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.
|
|
|
|
|
Hi Help Me I Want Write VBScript Of ("Outlook.Application")
1 ) I want Send E-Mail In list AddressBook Of Outlook At set create list AddressBook
I don't Sent Item.To = "a@a.com;b@asp.com" I want send Program As Question 1
2 ) Function Object ("Outlook.Application") and each Set In Ex.Code I am write Have Properties and Manton P.write Ex. Give Me
Thank
-----------------------
Ex Code Email.vbs
--------------------
'On Error Resume Next ' start code
Set Outlook = CreateObject("Outlook.Application")
Set Item = Outlook.CreateItem(OlTaskItem)
'Item.Assign
Set myDelegate = Item.Recipients.Add("info@microsoft.com")
myDelegate.Resolve
If myDelegate.Resolved Then
Item.Subject = "test"
Item.body= "test"
Item.To = "a@a.com;b@asp.com"
Item.Cc="a@a.com"
Item.Bcc ="a@a.com"
Item.Attachments.Add wScript.ScriptFullName
'Item.DueDate = Now +30
Item.Display
'Item.Send
End If
msgbox "ha"
Set Outlook= CreateObject("Outlook.Application")
Set MAPI = Outlook.GetNameSpace("MAPI")
Set MyFolder = MAPI.GetDefaultFolder(10)
Set Item = MyFolder.Items.Add("IPM.Contact.MyForm")
'Item.Display
Item.FirstName = "FirstName"
Item.LastName = "LastName"
Item.FullName = "FirstName LastName"
Item.CompanyName = "CompanyName"
Item.JobTitle = ""
Item.Department = ""
Item.Email1Address = "info@microsoft.com"
Item.Email1AddressType = "SMTP"
Item.Display
'Item.save ' end code
--------------
fff
|
|
|
|
|
What??? I couldn't understand a single thing you said.
Are you asking how to send an email to a list of addresses found in the Outlook Address Book?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
My customer need to speed dialer program. This is will built into their existing Customer Information System. Whenever they need to call the customer they just need to click on a button and my system need to call to the #. If the line is connected the user just need to pick up the telephone and start talking.
I think i will need to use modem to connect. Problem is if the line is connected, and when the user pick up the phone, my modem is still connected to the line, can they talk like that??? and can i keep track how long they talking to the customer???
i need this urgently, please help. thanx.
|
|
|
|
|
wlho wrote:
I think i will need to use modem to connect.
You could use the modem or there are TAPI modems/cards that will do this. The TAPI version will give you more functionality over a normal modem. A normal modem will dial the phone andlet the user pick it up when the person answers, but after that, the modem will either hang up or will keep the phone off-hook. In either case, it usually will not start a timer tracking the call and will not let you pick that time up in
your software.
wlho wrote:
can they talk like that???
Yes, but anyone around will be able to here everything being said and the speaker in the modem usually will not shut off until there is a data connection.
wlho wrote:
can i keep track how long they talking to the customer???
Not while using a normal modem. You'll need a device specifically designed for such work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I refresh or reload datagrid? I have a main window there is a datagrid, and a child window to add more data into db, I want the datagrid to reload the new data when the child window close and return to the main window. how can I do it?
Lisa
|
|
|
|
|
Use the public void SetDataBinding(
object dataSource,
string dataMember
) of DataGrid to refresh the grid.
|
|
|
|
|
where should I call the SetDataBinding? should I call it at the child window when it close?
|
|
|
|
|
Add an EventHandler for the child window closing in the parent form handle the things in the EventHandler.
Hope this will help.
|
|
|
|
|
Hi, in VB6 I use the following code to create the column header of listview:
Dim clhChildActivities As ColumnHeader
With lvwFoundResult.ColumnHeaders
' "eQµaHkumar";"kabrieqäT";"eQµaHGñkTTYlxusRtÚv";"skmµPaB"
Set clhChildActivities = .Add(1, , "eQµaHkumar")
Set clhChildActivities = .Add(2, , "kabrieqäT")
Set clhChildActivities = .Add(3, , "eQµaHGñkTTYlxusRtÚv")
Set clhChildActivities = .Add(4, , "skmµPaB")
Set clhChildActivities = .Add(5, , "epSg²")
End With
It is working fine
Then I use the following code to transfer the data from the database to list view item and subitem:
Do While .EOF = False
DoEvents
Set ltmChildActivities = lvwFoundResult.ListItems.Add(, , Trim(.Fields(0).Value))
For intSubItemRec = 1 To .Fields.Count - 1
DoEvents
ltmChildActivities.SubItems(intSubItemRec) = _
Trim(.Fields(intSubItemRec).Value)
Next
.MoveNext
pgbRecFound.Value = pgbRecFound.Value + 1
Loop
and it is working fine too
Now I move to VB.NET, I use the following code to call the field from Ms access database to create the column header in list view in VB.NET:
' ******************************************************
'
' Pass the field value to the column header
' of list view.
Dim i As Integer ' Total number of column.
For i = 0 To myReader.FieldCount - 1
lvwCustomers.Columns.Add(myReader.GetName(i).ToString, _
100, HorizontalAlignment.Center)
Next
'
' Pass the field value to the column header is success.
'
' *****************************************************
it also working fine too
And i got the following sample code that add an item and subitem to the list view:
'Dim str(5) As String
'Dim itm As ListViewItem
'str(0) = "Rob Machy"
'str(1) = "100 North Ave"
'str(2) = "Business Manager"
'str(3) = "89,000"
'str(4) = "Development"
'itm = New ListViewItem(str)
'lvwCustomers.Items.Add(itm)
That also working fine
BUT
when I try to transfer the data from database to an item and subitem to the list view as the following code:
' Use Read method of the OleDbDataReader to retrieve data
' use it to GetString method to display data in list view.
Dim ltm As ListViewItem
Dim str(myReader.FieldCount) As String
Dim j As Integer
While myReader.Read()
'txtData.Text = txtData.Text & myReader.GetString(0) & _
'ControlChars.CrLf
For j = 1 To myReader.FieldCount
Try
ltm = New ListViewItem(myReader.GetString(j).ToString)
Catch exSice As System.InvalidCastException
MsgBox("Error occure")
Catch exIofre As System.IndexOutOfRangeException
MsgBox("Check the index of field and index of listview.")
End Try
Next
lvwCustomers.Items.Add(ltm)
End While
it is not success... Can any one help me to transfer the data from database to the list view item and sub item???
Here is the full procedure of the code:
<code>Private Sub btnLoadToListView_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnLoadToListView.Click
' Create the query string and
' define new OleDbConnection object.
'Dim mySelectQuery As String = "SELECT CompanyName FROM " & _
'"Suppliers"
Dim mySelectQuery As String
mySelectQuery = "SELECT * FROM Customers"
Dim myConnection As New OleDbConnection("Provider=" & _
"Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\" & _
"Microsoft Office\Office10\Samples\Northwind.mdb")
' Create new OleDbCommand.
Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)
' Open the connection.
myConnection.Open()
' Declare an OleDbDatareader and use ExecuteReader method
' of OleDbCommand to populate it.
Dim myReader As OleDbDataReader
myReader = myCommand.ExecuteReader()
' ******************************************************
'
' Pass the field value to the column header
' of list view.
Dim i As Integer ' Total number of column.
For i = 0 To myReader.FieldCount - 1
lvwCustomers.Columns.Add(myReader.GetName(i).ToString, _
100, HorizontalAlignment.Center)
Next
'
' Pass the field value to the column header is success.
'
' *****************************************************
' Use Read method of the OleDbDataReader to retrieve data
' use it to GetString method to display data in list view.
Dim ltm As ListViewItem
Dim str(myReader.FieldCount) As String
Dim j As Integer
While myReader.Read()
'txtData.Text = txtData.Text & myReader.GetString(0) & _
'ControlChars.CrLf
For j = 1 To myReader.FieldCount
Try
ltm = New ListViewItem(myReader.GetString(j).ToString)
Catch exSice As System.InvalidCastException
MsgBox("Error occure")
Catch exIofre As System.IndexOutOfRangeException
MsgBox("Check the index of field and index of listview.")
End Try
Next
lvwCustomers.Items.Add(ltm)
End While
' Close OleDbDataReader and OleDbConnection.
myReader.Close()
myConnection.Close()
End Sub</code>
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I have check in my northwind database with Customers table. I found that some field contain NULL value. I check the field number and count the process of For Next statement and found the error become from NULL value of some field. Can anyone tell me how to transfer the NULL value to listview item and ignore an error?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Ok, may be nobody will help me. I got the information from here[^] to solve the problem with NULL value.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
How do I make a taskbar notification window like the one I see when somebody on MSN signs in? (the blue/white box above the taskbar)
Note: I'm using VB6, not VB.NET
|
|
|
|
|
Active-X Popup MsgBox's
http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=46003&lngWId=-1
|
|
|
|
|
I am learning VB.Net and need to know how to restrict the input of a textbox to numbers only.
Di
|
|
|
|
|
In win forms you can use the Validating event then use the regular experssions classes to match to [0-9]. Web forms have a regular expression validator control.
|
|
|
|
|
Hello,
How can i make "MSDN Style Help in Vb.net".
Or
kindly tell me any software in which i will easily make help file (like MSDN), but that software must has UNICODE support.
Regards,
Eshban
EsHbAn BaHaDuR
|
|
|
|
|
hi could u tell me how i can put the controlbox on the right of the form by using vb6.0 language
Thanks alot
Metal Man
|
|
|
|
|