I'm making a windows form.
Here is my current code:
I don't have any idea on how to link the open file dialog with the file that I am going to attach.
Try
With OpenFileDialog1
'OpenFileDialog1
.Filter = "Text files (*.txt)|*.txt|" & "All files|*.*"
If .ShowDialog() = DialogResult.OK Then...
how to do that?here is my current code, this is a windows form:
mail.From = New MailAddress(TextBox2.Text)
mail.To.Add(New MailAddress(TextBox1.Text))
mail.Subject = TextBox3.Text
mail.Body = TextBox4.Text
mail.IsBodyHtml = True
Dim client As SmtpClient = New SmtpClient("smtp.gmail.com")
client.EnableSsl...
how can I add a progress bar in vb.net while sending an email message?
...
I need to check for specific words so that the program will know what smtp client will be used.
For example. If the from textbox will have @yahoo.com on it then the program will make use of the smtp for yahoo.
Or if you know of any way on how to do just the same but with other idea.
...
I need to read a xls/xlsx/ods/txt file line by line,to get a column name of file .
how to read a file line by line in vb.net?
This is surely a duplicate of one of hundreds of questions.
For example, Excel File in VB.NET
...
I am trying to retrieve file details from files in the Program Files folder.
I receive an error while trying to retrieve file details.
Dim sFileName As String = ("%ProgramFiles%\Windows Defender\MSASCui.exe")
Dim Info As FileVersionInfo
Info = FileVersionInfo.GetVersionInfo(sFileName)
Msgbox(Info.ProductName.ToString())
I receive file...
VB.NET: What is the best way to ensure that a particular object may be instantiated only once during program execution?
...
I'm working with a program that can send email supporting yahoo mail and gmail. And it works in gmail(if the sender utilizes gmail) But it won't work if the sender is using yahoo mail.
Here is my code:
mail.From = New MailAddress(TextBox2.Text)
mail.To.Add(New MailAddress(TextBox1.Text))
mail.Subject = TextBox4.Text
mail...
What is the simpliest way to use a C++ header file in a vb.net application?
I need to access an API defiend via the header file for a custom VB.NET windows app.
...
Basically I have a series of lines in a textbox like this:
### = 1232, 1234, 1236, 1238, 123A, 123C ; comment here
I want to show a button when the caret (cursor pipe thing) in the textbox goes is in a number so like:
... , 12|31, .... or
... , 123|1, .... etc
(the pipe being the caret)
I have written code to check if it is in a numbe...
I have this weird situation.
I have these two classes:
Public Class Entry
End Class
Public Class Core
End Class
One of the properties of the Core class will be an array of Entry objects. How can I declare it?
Now, the only way to change (add/remove) this array from outside should be using two functions - AddEntry(Ent As Entry) an...
I have one main page in my Silverlight project. I have two frame inside this page. The one called Contents and the other called Footer. What I wonder is, how can I change the variables in the content in the Content of whether that's a click event in the Footer?
In Mainpage.xaml:
<UserControl
x:Class="SilverlightApplication10.MainPa...
i want to see the designer code ..
i want to see how myForm is generated using or extending form
i mean in C# i can see the code in designer.cs file...but in vb.net i am nt able to see that..
...
I'd like to overlay a number of images (PNG, same size for all, with transparency). So far, my code is as follows.
bg = New Bitmap(My.Resources.blue)
g = Graphics.FromImage(bg)
overlay = New Bitmap(tree.Image)
g.DrawImage(overlay, 0, 0)
Now, I would like to overlay one more image, but this is based on a user's input f...
Hi everyone
As a follow up to this thread
I found that the overlay function was working fine. However, it seems that if I use the overlay function while reading an image from a stream, that it would enlarge the picture before overlaying it.
ie:
overlay = New Bitmap(stream)
g.DrawImage(overlay, 0, 0)
Seems to enlarge the image befor...
In my code, why does nothing execute after con.Open(). If I step through each step, it ends the Form1_Load event after "con.Open()".
Imports System.Data.OleDb
Public Class Form1
Dim con As OleDbConnection
Dim strCon As String = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=C:\testDB.accdb"
Private Sub Form1_Load(ByVal sender...
I'm making an email sending program and still I don't know how to check if the mail was really sent or not, because sometimes the program will have no error messages but the mail was not actually sent. Is there any other way on how to deal with this except for making use of try catch?
Here is my code:
Try
mail.From = New MailAddress(...
Hi,
I need to build a GridView component which contains a DateTime picker.How can i do this?
...
Hello everyone,
I'm using a SortedDictonary(Of String, String) in my application, and I experience a strange sorting behavior. Consider the following code example:
Dim Dic As New SortedDictionary(Of String, String)
Dic.Add("'A", "")
Dic.Add("A", "")
Dic.Add("'B", "")
Dic.Add("B", "")
Dic.Add("'C", "")
Dic.Add("C", "")
I would expect ...
I want to let the user select a value from a combo box, and then exclude a row from the result set of a stored procedure based on that selection. Something like this:
Select RegNo from Vehicle Except select VehicleID from Trip
...