Difference Between Events In VB And C#?
Mar 30, 2010
I am a VB programmer working my way into C#. I learned how to create and raise events in vb and am finding that it isnt done the same way in C#. Has anybody come across an article that will help me to understand how to do events in C# and maybe explain why it is different in VB.
View 5 Replies
ADVERTISEMENT
Jun 7, 2012
just pretend the word mouse is in front all of these
capturechanged
down
enter
leave
up
View 4 Replies
Feb 11, 2010
What is the difference b/w Delegates and Events. I have little bit confusion. Where delegates are used, and when we have to used delegates. Can, you give some examples(both delebates and events) in vb.net.
View 6 Replies
Dec 16, 2009
is there a difference between shared events and non-shared events?
Private Shared Event EVENT_something_changed()
Private Sub SUB_handles_something_changed() Handles Me.EVENT_something_changed
End Sub
no errors with this code, but how is Me possible since the Event is shared. it seems like there's no errors between switching shared with un-shared and switching Me with Myclass, all 4 combinations seem to work, isn't that weird
View 18 Replies
Oct 13, 2011
I have been trying to implement the jQuery weekcalendar using .net. What I can't seem to figure out is why weekcalendar states events.events is undefined after I make an ajax call to a webmethod I created which returns JSON. Below is the relevant code:
[Code]...
View 1 Replies
Aug 2, 2009
I want to make Keybord events and mouse events for learning and educational Purpose.
1. In Form any object like A "picture box" move by Arrow keys .
2. Picture Box Contain many Picture i want change Picture With next and Previos By Arrow keys.
3. I contain Voice of alphabet in Mp3.When i Press any button in textbox then its work.
4. Mouse Pointer Change My Own.
5. I click any Object or any thing By mouse its noice clicking sound like Tik Tik Tik.... Question No 3 is very hard to do . but not im possible
View 12 Replies
Dec 31, 2010
I created a control that has picture box control docked within it. This control allows me to "animate" the image by swapping them out by setting the interval to swap them at. I want to use this control kind of like an animated icon within a application, but because the picture box is docked, the control I created won't respond to the events, MouseHover specifically. [Code]
View 2 Replies
Aug 5, 2011
I don't know how to use these events and get the appropriate values out of these events ....here is some code that I have copied from a website...
[code]
Private Function MouseHookProc(ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As MSLLHOOKSTRUCT) As Integer
Try
If nCode >= 0 Then
Select Case wParam
[code]....
View 8 Replies
Apr 18, 2009
I'm sure this is straightforward but I cannot find the correct string to get a google result. In VB.NET what is the difference between = (equals sign) and := (colon followed by equals sign)?
View 3 Replies
Mar 30, 2011
can anyone tell me book for VB.net for beginner and complee package of books important for VB. as i don't know anything abt VB.
what is difference between VB.net and asp.net and c#??
View 2 Replies
Aug 26, 2010
Possible Duplicate: What are the most important functional differences between C# and VB.NET? What are the basic difference between c# and VB.net?
View 3 Replies
Apr 27, 2012
know the difference between C#.Net and VB.Net. I use C#.Net for my projects, but when ever I met with some other programmers they often called VB.Net more powerful and easy, than C#.Net. I always asked them "Why it is more powerful then C#, since it uses the same framework?" but still I didn't get any answers.
View 3 Replies
Mar 1, 2006
what exactly distinguishes a COM component from a DLL? Isn't a COM component just a library of functions that can be called from another application? Why is using a COM component so much more complicated than just registering it like one would do with a DLL?
View 4 Replies
Jun 4, 2012
I'm looking for an explanation of the difference between
Dim sw1 = New StringWriter()
Dim sw2 As New StringWriter()
Both seem to instantiate new string writer instances that I can use.
View 5 Replies
Mar 10, 2010
I was under the assumption that VB's For Each loop was the same as a For Next loop. But when i try running the following code I do not get the expected result.
[Code]...
View 3 Replies
Jun 10, 2010
I have this code, first I thougt it should be the same but i cant acces the info in the same way .. why is this???
Dim tp(,) As Integer = {{1, 3, 5, 9, 7}, {34, 3, 4, 5, 6}}
Dim tpo(1)() As Integer
tpo(0) = New Integer() {1, 3, 5, 9, 7}
[code].....
The first one I use only one for each and the other one I use two .. why is this different? are noy they 2 dimensional arrays ???
View 1 Replies
Jan 18, 2011
What is the difference between VB and VB.NET?
explanation with examples preferred
View 6 Replies
Dec 9, 2009
The next code works fine in C#:
[Code]...
But this code crash with a OverflowException in VB.Net.
[Code]...
Both codes seems the same to me. What is the difference and how can I get the C# code converted to VB.Net?
View 6 Replies
Jun 13, 2011
For those who have experience, working with VB.NET, it's easier to use SlimDX or SDL? The tutorials for SlimDX are already written for .NET, but I've read that SDL it's a lot easier than DirectX itself.in my case, I just need 2D graphics.
View 4 Replies
Jul 2, 2010
I have two arraylists, and I would like to have a new arraylist with only the uncommon items. Is this the "best" or at least decent way to do it?
[Code]...
View 2 Replies
Jan 13, 2012
[Code].....
What is the major difference between 'for each' and 'for' loops in .NET? Is there any performance gain while comparing these two? Which one gives a better performance/faster/memory management?
View 1 Replies
Sep 26, 2009
I have in the past used .net executables as libraries. I'd just add them to the references in visual studio and I was ready to go. Today I tried the same to a new exe (actually mine) and it doesn't seem to work. When I add it to Visual Studio and try to watch its members on the Object Browser, it doesn't show up anything inside that executable's assembly.
I know the main difference between an exe and dll is that the first has an entry point while the 2nd doesn't. Are there any more differences? I know that unmanaged dll's also have a DLL entry point, do .net have one too?Also, what might be the reasons that could make my standard exe/dll (with this i mean, not obfuscated or anything extreme like that) not show up anything in the Object Browser?
View 1 Replies
Dec 3, 2010
What's the difference between / and for division in vb.net? My code gives very different answers depending on which I use. I've seen both before, but never knew the difference.
View 3 Replies
Feb 28, 2012
I am trying to find the difference between two dates. The first of the two dates can be changed and when it is changed, the difference between the original dates has to be retained. This means that I have to automatically change the second date to have the same difference in days as it did before, but with a new first date. [code]I have the value of the old date1(currDate) and the new date1 value(newDate). I need to get the difference between these, and then add or minus these days from the endDate.
View 1 Replies
Jan 22, 2010
I'm making a form with an overview of orders from our clients. I have inserted 2 datetimepickers so the users can choose a period.
To know how many cols I need in my grid, I need to know how many months there are between the 2 datetimepickers. But that seems to be the problem. How do I get the number of months starting from one datetimepicker untill another.
View 15 Replies
Mar 1, 2011
[Code]...
Here I am Clear the object using Dispose( Mycmd.Dispose()). Can I Use here Nothing ( Mycmd = Nothing?. Which is the Best ?
View 5 Replies
Dec 8, 2009
for determining whether a string of data contains certain text, which is more efficient? I have read elsewhere that there is somewhat of a consensus to avoid legacy functions, since they may or may not be available in future versions.However, trying to use the contains method (or indexof equivalent of Instr) is causing me problems, I think, because I am having trouble performing a case-insensitive search.
I am trying to be efficient and functional in my code. I am reading an INI file, and I have preloaded the contents of the file into a String variable, for 2 reasons. 1) If I can test if a certain section exists in the code, I can avoid attempting to read a section of empty data (the INI reader class I have chosen returns the value or an empty string for a given request). More importantly, 2) I have created a data field that is not INI compliant (at least not to the API?) as it is a data field that can contain an arbitrary (unlimited?) amount of data which is a hex-encoded representation of serialized byte data. I need to be able to determine if this value exists in the file and retrieve it using normal string manipulation, since the INI handler will not pass strings longer than 256Chr.
So, the problem I am having is getting "strFileContents.Contains("data=")" to return true in the case where the file contains "Data=". This could be data=, DATA=, DaTa=, etc.Instr has the option "CompareMethod.Text" which, I believe, does a case insensitive text search. What is the equivalent for "Contains"?
View 5 Replies
Dec 12, 2009
In C#, if you do this, it will compile:
namespace Name
{
public class Test
{
[code]....
I get (depending on the way I try to use "Test") either "'Name' is not a member of '<Default>'." or "Type 'Name.Test' is not defined." in my error list. I've found two ways to make it work, but neither are reasonable to expect of a user. One is to remove the "Root Namespace" from the project properties. The other is to include that namespace between "Global" and "Name".
I have made a custom tool that uses CodeDom to generate code for both C# and VB.NET. This is the reason why neither of the two fixes above are feasible: I can't expect my users to have an empty root namespace, and I'd hate to have to do VB-specific tricks in my code generation (kind of defeats the purpose of using a language-neutral tool, doesn't it?) such as picking out the "Root Namespace" (not that I'd know how off the top of my head) and including it in my code generation.
I don't want to leave out the global modifier either, because it protects the tool from users picking bad names for the generated output. Does anybody have a suggestion for how I should deal with this?
View 1 Replies
May 17, 2010
I have and still do program principally in a procedural manner. I've never created objects or ever used the OOP paradigm. I understand the concept certainly, and know generally how it works but have never implemented it. I presume this leaves me though with limited options in the future as OOP is and has been all the rage, especially now that VB.Net is full OOP. Event still, I've written both ASP.Net and VB.Net applications without using OOP, or not that the product didn't create itself.It appears I am not alone either, there seems to be a number of people far more intelligent and experienced than I that eschew OOP.
[URL]
View 1 Replies
Dec 20, 2011
What are the differences between the Shadows keyword in VB.NET and the New keyword in C#? (regarding method signatures of course).
View 2 Replies