|
Yes a Sub doesn't return a value and a Function returns a value.
Ben
|
|
|
|
|
u mean procedure and sub are synonyms?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
If you are writing vb.net code you only have sub and function.
Ben
|
|
|
|
|
Yeap,
Procedures executes the commands and returns nothing, on the other hand, function should always return something(integer or string, etc), to the point that they were called from.
|
|
|
|
|
better to say is that as we have "void" return type of a function i.e. a function that doesn't return a value in many languages like C++, C# or Java in visual basic we have sub for this purpose. i.e. sub is a function with void void return type
Salman Sheikh
|
|
|
|
|
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
out of the above mentioned
i think
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
is the handler
and Handles MyBase.Load is an event
Am i right?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Yes, I think you are right.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
handles mybase.load is indeed the event this sub handles
the event passes 2 parameters to the sub therefor you need the
Sonia Gupta wrote: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
so you could call it the handler
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
1 - buy a book, please
2 - learn how to format your questons, 'please help' is just painful.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
event is an event and handler is a routine or procedure which is automatically called when that event occurs.
Handles MyBase.Load means we specify a handler for the Load Event
Addhandler does the same thing
both register a procedure with an event so both are equalent
Salman Sheikh
|
|
|
|
|
hi all,
i write some code at timer tick event .this codes work well . but when we run database query(database is located on net) then during this duration timer tick event not fired.However after completion of query( when i get result from query) timer tick event works well.
any body have some idea about this problem ?
Please guide me
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Hi,
it depends on circumstances. This is one way to get what you describe:
- use a Windows.Forms.Timer (which ticks on the GUI thread);
- perform the database access (or some other long-winding operation) on the GUI thread,
e.g. in a button Click handler.
Now while the long operation is going on the entire GUI is frozen, as well as the Forms timer,
so nothing happens until the long operation has finished.
The right approach to remedy this is to use a separate thread for all long operations
(and to use InvokeRequired and Invoke if they need to access GUI parts).
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hey guys,
I'm trying to get the name of the db column that the current active control is bound to. I need it to do sorting on current control (textbox/combobox/checkbox).
I cant find a property that can tell me this. Can someone fill in the blanks:
Me.XrfEventTypeBindingSource.Sort = Me.ActiveControl.????????? + " ASC"
Anybody know?
Thanx
Ed
|
|
|
|
|
ActiveControl returns a Control object, which has a DataBinding collection. Look in that collection for a Binding object, which will have a BindingMemberInfo property, which has the column information in it.
|
|
|
|
|
Thanx a lot! I couldnt for the life of me find it.
So to fill in my previous blanks, might help someone else in future:
Me.XrfEventTypeBindingSource.Sort = Me.ActiveControl.DataBindings(0).BindingMemberInfo.BindingMember + " ASC"
Cheers
Ed
|
|
|
|
|
Hi everyone,
I am after a nice collection of icons / images to use on my forms and shortcut menus - simple things like the "+" icon to use in my menu for the "ADD.." items.
Do you guys have any websites I can download these from. I spent ages googling but they are such common terms I get everything else.
Thanks in advance.
Mark
|
|
|
|
|
sure
http://www.planeticons.com/[^]
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Thanks however I'd prefer more basic onces than these. I'd also prefer NOT to get a second mortgage on the house for a few images.
Surely there are some basic icons / collections we can download for free......
|
|
|
|
|
Hi
Last month i posted a question in this site, i don't know how to see my post
Plz help me!
|
|
|
|
|
Click on the image next to your user name, it should take you to your profile page. On that, you have a link to "Messages posted".
|
|
|
|
|
Use the 'Search Comments' option above, which has filters by date range, keywords and Author
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
I m greatful to both of you
Thanks
|
|
|
|
|
Hello guys.
I have an error on my page from something I downloaded and the message says "To avoid this message, change ur EO.Web.Runtime.DebugLevel to Zero".
I have found the EO.Web.Runtime.DebugLevel but it says DebugLevel() as Integer and dont know how to change it to Zero.
Please help guys.Thanx in advance.
kagiso
|
|
|
|
|
Is this a library you downloaded from somewhere?? I think you're going to have to ask the people who wrote the library you're using.
|
|
|
|
|
I am trying to connect to an Active Directory via secure socket.
Below are my codes.
Dim adConnection As String
adConnection = "LDAPS://cisdcccc.ccccccc.eee.mmmmm.com.mm/dc=cccccc,cd=eee,dc=mmmmm,dc=com,dc=yy"
Dim entry As New System.DirectoryServices.DirectoryEntry(adConnection, "username", "password",
DirectoryServices.AuthenticationTypes.SecureSocketsLayer)
Dim searcher As New System.DirectoryServices.DirectorySearcher(entry)
searcher.SearchScope = DirectoryServices.SearchScope.OneLevel
The exception that gets thrown is
Stack Trace:
[COMException (0x80005000): Unknown error (0x80005000)]
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +610
System.DirectoryServices.DirectoryEntry.Bind() +36
System.DirectoryServices.DirectoryEntry.get_AdsObject() +31
System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne) +73
System.DirectoryServices.DirectorySearcher.FindOne() +42
_Default.Page_Load(Object sender, EventArgs e) +82
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
The port 636 is open. I am unable to understand what is causing this problem.
Please help.
Thanks.
|
|
|
|