|
i am a new user in vb.net. Can anyone tell me how does GET AND SET works in class.
thanks
|
|
|
|
|
They are syntactic sugar for methods with a well define semantic meaning. If you want to see how they work I suggest you look at an assembly with ILDASM to see what is generated. If that isn't what you mean then you might want to ask a more detailed (less vague) question.
|
|
|
|
|
I think you need to buy a book.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
The Set Statement is for setting values for your properties. The Get Statement is for returning values from your properties. For more information, please refer to the below mentioned links:
http://www.ondotnet.com/pub/a/dotnet/2003/05/20/introvbnetoo.html
http://www.homeandlearn.co.uk/net/nets11p5.html
http://www.vbdotnetheaven.com/Uploadfile/rajeshvs/PropertiesInVbDotNet04192005060237AM/PropertiesInVbDotNet.aspx
http://www.xtremevbtalk.com/showthread.php?p=688701
http://www.vbdotnetheaven.com/UploadFile/rsharma/PropertiesInVbDotNet04202005074631AM/PropertiesInVbDotNet.aspx
I hope this would be helpful.
Vinay
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
I am using VS 2008 to develop a Web service that uses few windows API functions in the server side:
[DllImport("User32.dll")]
public static extern Int32 FindWindow(String lpClassName, String lpWindowName);
[DllImport("User32.dll")]
public static extern Int32 SetForegroundWindow(int hWnd);
[DllImport("User32.dll")]
public static extern Int32 GetForegroundWindow();
In the development environment all is working well.
I deployed the web service to another machine with same OS (windows XP SP2) and same .net frameworks installed (no development environment there - Installed 1.1, 2.0, 3.0 and 3.5) and these functions are not working (I used logs to watch their operation separately and they are simply not doing anything). I assume therefore that there is a general problem invoking Win32 API on that machine for some reason.
Any ideas how to fix this?
|
|
|
|
|
Those calls are pretty old, it seems odd to me that they may not be there. Does nothing happen when you call them ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Like i described - nothing happens (in deplyment environment) - these functions are called but doesn't do the operation they need to.
of course they are there (in the DLLs), but somehow the framework don't really get them...
|
|
|
|
|
I made some progress with this:
I created an EXE application and Tested FindWindow exactly as it is used from my web service (same call, same parameters, etc.). it works fine (finds the window's handle).
I tried changing the user for iis from ASPNET to administrator in the machine.config to see if permissions is the problem ( verified user with process explorer), but even with administrator it is not working...
Any ideas?
Thanks.
modified on Saturday, June 7, 2008 7:56 PM
|
|
|
|
|
Hi all,
Can someone help me how to develop teleyphony application and make a auto dialer application using modem or EPABX or something else.
Thanks in Advance.
Be an Eagle, Sky is Yours.
|
|
|
|
|
TAPI is what you need, I believe.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks a lot Christian.
I know that TAPI is the solution. But is there any sample code or some articles on that so can I develop telephony application on VB.Net.
Be an Eagle, Sky is Yours.
|
|
|
|
|
A task which uses BeginInvoke is supposed to use EndInvoke to clean up; fire-and-forget semantics are explicitly discouraged. If one wants to launch a fire-and-forget thread, what disadvantage is there to simply saying:
Dim Th as New Thread(me.ThreadProc)
Th.IsBackground = True
Th.Start
as a means of running ThreadProc asynchronously? If Th exits, is some cleanup required, or will it get garbage-collected if no reference to it exists?
|
|
|
|
|
This code is fine for running an async operation. .NET takes care of all the complicated stuff, so you don't need to do any explicit cleanup, the thread will finish and cleanup automatically when ThreadProc method exits.
The only thing to look out for is marshalling to the main thread if you want to update / read any ui elements, e.g. setting .Text property on a label control from within ThreadProc. In this case, you must do something like:
Private Delegate Sub UpdateLabelTextDelegate(ByVal value As String)
Private Sub UpdateLabelText(ByVal value As String)
If Label1.InvokeRequired Then
Label1.BeginInvoke(New UpdateLabelTextDelegate(AddressOf UpdateLabelText), New Object() {value})
Else
Label1.Text = value
End If
End Sub
Also, the following can be used as a shortcut to read the label text (only in VS2008 though):
Dim value As String = If(Label1.InvokeRequired, CStr(Label1.Invoke(Function() Label1.Text)), Label1.Text)
Rob
"An eye for an eye only ends up making the whole world blind"
|
|
|
|
|
Won't "BeginInvoke" create a leak if there's no "EndInvoke"?
|
|
|
|
|
I've been doing it this way for years! maybe i've been getting it wrong! will re-read msdn later...
"An eye for an eye only ends up making the whole world blind"
|
|
|
|
|
I have a .Net DLL. Can I use it from a Java program (assuming .Net is installed of course).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
Yeah, and if you wanted to make beer you could mix a frog and an egg in blender.
led mike
|
|
|
|
|
led mike wrote: Yeah, and if you wanted to make beer you could mix a frog and an egg in blender.
I think I drank some of that - well, it explains the way I felt after I drank 11 or 12 of them.
|
|
|
|
|
Pete O'Hanlon wrote: I think I drank some of that
LMAO Well it's FRIDAY so I'm off for the real Have a great weekend!
led mike
|
|
|
|
|
led mike wrote: Well it's FRIDAY so I'm off for the real Have a great weekend!
You too mate. Be good. If you can't be good, be legal. If you can't be legal, what the hell - enjoy yourself.
|
|
|
|
|
Hi there!
I would like to know if it's possible, and if so, how can I add a reference to a library programatically in the .net framework.
The idea is to have somethin like we had with the CreateObject("library_name") in the VB6 days.
Any help is welcome!
Thanks in advance for your time.
António
|
|
|
|
|
|
There is a complete library in .Net called Reflection that allows you to query a type or create an instance without referencing the assembly on compile.
I would suggest you to go through the Reflection namespace and esp Assembly class. (http://msdn.microsoft.com/en-us/library/system.reflection.aspx[^]
Tariq A Karim
http://moplah.blogspot.com/
|
|
|
|
|
I have been tasked with researching third party object-relational mapping and RAD frameworks for .NET
Our organization is just starting a long term migration from VFP to C# / .NET and wants to kick start this process by employing a third - party ORM framework.
I have not used any third party frameworks for ORM in .NET yet and don't want to get painted into a corner at this early stage.
One of the frameworks we are reviewing is called Mere Mortals.NET by Oak Leaf Enterprises Solution Design.
I have also heard of another product called IronBlade Dev Force.
Anybody had experience with these products or third-party ORM frameworks in general.
Tim Holgerson
|
|
|
|