|
Uhhh... you mean like this?
Public Sub Main(ByVal args() As String)
' Add code here.
End Sub
|
|
|
|
|
does it work that way?
How do I use it?
huehehe... it's too simple huh?
Thank you
|
|
|
|
|
eagertolearn wrote: it's too simple huh?
This is beginner's stuff. I'm thinking you should get a good VB.NET book, because this is typically covered in the first or second chapter.
Here's a quick summary. You add a string array to your Main function as shown below. This array will be populated with command line arguments on startup. Meaning an array entry for every "space" separated argument.
' This code outputs every command line argument given to the app.
Public Sub Main(ByVal args() As String)
Dim argument As String
For Each argument In args
Console.WriteLine(argument)
Next
End Sub
-- modified at 15:10 Tuesday 14th February, 2006
|
|
|
|
|
Folkes,
how are you all ,i would like to ask how can i list all the available Databases in a selected sqlserver!
thank you
|
|
|
|
|
This question really belongs in the SQL / ADO / ADO.NET forum.
You can list all the databases on a SQL Server with the following query on a connection to the master database:
SELECT name FROM sysdatabases
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
We have several applications which generate e-mails automatically.
These are usually scheduled reports or event notifications.
Our company has decided to upgrade all e-mail to outlook 2003.
In my tests any software generated e-mail using Outlook 2003 needs a human intervention to confirm the email is a genuine e-mail and has not been generated by malicious software.
Is there any way to turn this confirmation feature off?
Regards
Sandie
swain@dalkia.co.uk
-- modified at 9:53 Tuesday 14th February, 2006
|
|
|
|
|
Instead of sending the email through outlook, send the email message directly to the smtp server.
|
|
|
|
|
Thanks KaptinKrunch,
At the moment I have no idea how to do that but it is something to work with.
Sandie
|
|
|
|
|
Take a look at the SMTP RFC
http://www.faqs.org/rfcs/rfc821.html"
Clip taken from the RFC
A Typical SMTP Transaction Scenario
This SMTP example shows mail sent by Smith at host USC-ISIF, to
Jones, Green, and Brown at host BBN-UNIX. Here we assume that
host USC-ISIF contacts host BBN-UNIX directly. The mail is
accepted for Jones and Brown. Green does not have a mailbox at
host BBN-UNIX.
-------------------------------------------------------------
R: 220 BBN-UNIX.ARPA Simple Mail Transfer Service Ready
S: HELO USC-ISIF.ARPA
R: 250 BBN-UNIX.ARPA
S: MAIL FROM:<Smith@USC-ISIF.ARPA>
R: 250 OK
S: RCPT TO:<Jones@BBN-UNIX.ARPA>
R: 250 OK
S: RCPT TO:<Green@BBN-UNIX.ARPA>
R: 550 No such user here
S: RCPT TO:<Brown@BBN-UNIX.ARPA>
R: 250 OK
S: DATA
R: 354 Start mail input; end with <CRLF>.<CRLF>
S: Blah blah blah...
S: ...etc. etc. etc.
S: .
R: 250 OK
S: QUIT
R: 221 BBN-UNIX.ARPA Service closing transmission channel
Scenario 1
-------------------------------------------------------------
|
|
|
|
|
In Outlook 2000, it's under the Tools menu, Macro, Security...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If you really do need to have these emails sent through Outlook 9as opposed to KaptinKrunch's suggestion) then there is a way of bypassing the security but it involves quite a lot of work - using Extended MAPI (requires C++ or Delphi). There are also one or two utilities - one is called Outlook Redemption, I think.
Kevin
|
|
|
|
|
i am using cache to store the dataset like this
cache.insert("Key",dataset)
and i am using this cached data in button like this
dim ds as dataset
ds=cache("Key")
Here it is showing cache data as nothing
Can any body help me
narayana
|
|
|
|
|
I'm not ASP.NET expert, but one problem I see is that you're not casting the return value back to a dataset.
ds = CType(cache("Key"), DataSet)
Other than that, you'd probably have to ask this question in the ASP.NET Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is there a way to make teh ComboBox field appear empty?
I have a Windows form with a ComboBox in the first row and a DataGrid and some other controls in sync with the DataGrid. The first user action is to choose an item in the ComboBox. Then I use the SelectedValueChanged event to fill the form controls with data related to the item the user choose.
It works the way I wanted it, but there is one thing that bothers me and I so far I was unable to find a solution:
When the user first opens the form, the first item in the Combo is already choosen by default and ComboBox field is filled with text. I would like that field to appear empty until the user explicitely chooses an item.
In VB6 it was easy: on Form_Load, I set the ListIndex property to -1 for an ordinary ComboBox, or the BoundText property to '', for a Data Combo.
But, in VB. NET, setting the SelectedIndex property to -1 or any other non existing value is ignored and the ComboBox defaults to the first item (SelectedIndex = 0). (Bug or feature?)
It is confusing, because when the form is first open, the Combo field is filled, but all the other controls are empty. If the user wants to see data related to the first Combo item, she has to click the Combo and chose the item that appears already choosen which seems rather illogical.
Thank you in advance for any hints.
Best regards.
|
|
|
|
|
Mashinovodja wrote: Is there a way to make teh ComboBox field appear empty?
If ComboBox.DropDownStyle = DropDown , then setting SelectedIndex to -1 won't clear the selection. Instead, you clear it like this...
ComboBox.Text = String.Empty
|
|
|
|
|
No, it does not work: no matter what DropDownStyle I choose for the Combo, when I first open the form, I always get displayed the first line of the DataTable. I use this code:
With reasonCombo
.DisplayMember = "Description"
.ValueMember = "ReasonID"
.DataSource = ds2.Tables("Reasons").DefaultView
.Text = String.Empty
End With
I initialize tho Combo Box the Form_Load event
Thank you for trying to help me.
Best regards
|
|
|
|
|
Awww... now I see. It's because you're using ComboBox.DataSource.
You see, once you set ComboBox.DataSource, you can only select strings that exist in that DataSource. Now if an empty string existed in your DataSource, well then it would work.
Another solution would be to not set ComboBox.DataSource. Then add items to the ComboBox yourself via ComboBox.Items.Add(). That way you can set ComboBox.Text to anything that you want.
-- modified at 13:07 Friday 17th February, 2006
|
|
|
|
|
What is manifest file. What is the need of this file?
|
|
|
|
|
In a setup program is a summary of the files thatr are included in the whole installation.
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
thanks for this!!! I want to know in what situation we have to use manifest file?
Any query related to VB.NET+Network Programming
email: sharma.hariomprakash@gmail.com
|
|
|
|
|
Perhaps you should read marcdev's answer instead of just asking the same question all over again?
---
b { font-weight: normal; }
|
|
|
|
|
hello again
can you please help me again about this datagridview coz i'm not so familiar about this control....my question is ...if i'm going to add new record from the datagridview how can i clear again the datagridview to able for me to add again new record without deleting the current record...looks like this...first i'm going add record in the datagrid so its already there then second i want to add new record agin but i want the datagridview to cleared before the second record in.. without deleting the current record...how can i do that...can you help please...
thanks in advance
|
|
|
|
|
hi
i have a problem of populating the datagridview which is unbound data coming from the other form....look like this...i well explain...i used two forms one form who holds the datagridview and the second forms holds the textboxes which i'm going to input my data and well putted into the others form which has the datagrid...i'm stock in this case...i'm not using binding,,all i want to know is..how do i get the data from the other form...
can you please help to formulate the code for unbound...please guys...
thanks
|
|
|
|
|
|
Hi... Right now I'm using visual basic in access so the controls are limited. there is no timer included in the controls that i'm using. i need to stop a process when i press escape key... so i used doevents and on_keypress. But the problem is while the process is running you can press the buttons in the form... the quit button etc. including the process button. if i disable the process button after i pressed it there would be an error and it will not continue the process. is there a way that i can disable the mouse event? tnx
|
|
|
|