Hi there.
I had 3 questions to ask.
1)
Public Event ButtonClicked(MessageBoxNumber As Integer,
OKButton As Boolean, CancelButton As Boolean, ExitButton
As Boolean)
--> how to code this in c#? If not mistaken, if they used
the keyword WithEvent i will use delegates and events. But
now is the keyword event! Any sample codes base on top?
2)
Public Property Let MessageBoxPrompt(MessageBoxNumber As
Integer, ByVal vData As String)
MBox(MessageBoxNumber).Prompt = vData
End Property
MBox is a type of MessageBox
--> oh okay, i know c# got get and set, but there is no
let. And can i assign property with arguments like
MessageBoxNumber as integer, etc...
3) in vb6, you had in operator '\' for division integer,
how can i achieve this in c#?
Any help, please?
Thanks.
Regards,
Chua Wen Ching :p 2 8441
"Chua Wen Ching" <cw*@cwc.com> wrote in message
news:00****************************@phx.gbl... Hi there.
I had 3 questions to ask.
1)
Public Event ButtonClicked(MessageBoxNumber As Integer, OKButton As Boolean, CancelButton As Boolean, ExitButton As Boolean)
--> how to code this in c#? If not mistaken, if they used the keyword WithEvent i will use delegates and events. But now is the keyword event! Any sample codes base on top?
Look at the C# reference in the MSDN help. There is a sample there. And yes,
it can be a pain in C# compared to VB, but the next version (Whidbey) will
have features that make this a little easier in C#.
2)
Public Property Let MessageBoxPrompt(MessageBoxNumber As Integer, ByVal vData As String) MBox(MessageBoxNumber).Prompt = vData End Property
MBox is a type of MessageBox
--> oh okay, i know c# got get and set, but there is no let. And can i assign property with arguments like MessageBoxNumber as integer, etc...
There is also no more Let or Set in VB. NET (just FYI).
In this case, you need to set a parameter in a string property. The closest
you're going to get is a C# indexer. I'm still ranting about this ;-)
Look up Indexer in the C# reference for a sample.
3) in vb6, you had in operator '\' for division integer, how can i achieve this in c#?
C# division does what you want with the default division operator.
-Rob [MVP]
Any help, please?
Thanks.
Regards, Chua Wen Ching :p
"Chua Wen Ching" <cw*@cwc.com> wrote in message
news:00****************************@phx.gbl... Hi there.
I had 3 questions to ask.
1)
Public Event ButtonClicked(MessageBoxNumber As Integer, OKButton As Boolean, CancelButton As Boolean, ExitButton As Boolean)
--> how to code this in c#? If not mistaken, if they used the keyword WithEvent i will use delegates and events. But now is the keyword event! Any sample codes base on top?
Look at the C# reference in the MSDN help. There is a sample there. And yes,
it can be a pain in C# compared to VB, but the next version (Whidbey) will
have features that make this a little easier in C#.
2)
Public Property Let MessageBoxPrompt(MessageBoxNumber As Integer, ByVal vData As String) MBox(MessageBoxNumber).Prompt = vData End Property
MBox is a type of MessageBox
--> oh okay, i know c# got get and set, but there is no let. And can i assign property with arguments like MessageBoxNumber as integer, etc...
There is also no more Let or Set in VB. NET (just FYI).
In this case, you need to set a parameter in a string property. The closest
you're going to get is a C# indexer. I'm still ranting about this ;-)
Look up Indexer in the C# reference for a sample.
3) in vb6, you had in operator '\' for division integer, how can i achieve this in c#?
C# division does what you want with the default division operator.
-Rob [MVP]
Any help, please?
Thanks.
Regards, Chua Wen Ching :p This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fabrício de Novaes Kucinskis |
last post by:
Hi all,
I have a combobox control, in wich I put an autocomplete code. This code is
in the TextChanged event, but when this event fires, the Text property isn't
updated yet.
For example, if...
|
by: Andy Read |
last post by:
Hello all,
I have the requirement to produce source code that produces an object
hierarchy.
Example:
Root
|
Folder 1
|
by: |
last post by:
Hi,
I am setting the NumericUpDown .Value property and the ValueChanged event
is NOT being fired. Does this ONLY get fired when I change it on the UI and
not programatically?
Thanks
|
by: abs |
last post by:
My element:
<span onclick="alert('test')" id="mySpan">test</span>
Let's say that I don't know what is in this span's onclick event. Is it
possible to add another action to this element's onclick...
|
by: Charles Law |
last post by:
Mr "yEaH rIgHt" posted the following link about a week ago in answer to my
question about removing event handlers.
> http://www.vbinfozine.com/t_bindevt.shtml
Following on from that post, the...
|
by: prabhdeep |
last post by:
Hi,
Can somebody explain, why in following code, i get "event not defined"
error
funcTest(sMenu)
{
doument.getElementById('id1').addEventListener('mousedown', function(){
click(sMenu,...
|
by: Joseph Geretz |
last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm
adding matching pairs of Toolbar buttons and Menu items. All of the buttons
and menu items are wired up to send events to...
|
by: Ralph |
last post by:
Hi
I don't understand why it's not working:
function schedule(imTop){
this.tdImagesTop = imTop;
}
schedule.prototype.selectEl = function() {
alert(this.tdImagesTop);
|
by: Neil |
last post by:
I am using Access 2003, and have an ongoing problem of every once in a while
losing an event procedure
for a form or control. The procedure's still in the code module, but the
form or control's...
|
by: FullBandwidth |
last post by:
I have been perusing various blogs and MSDN pages discussing the use
of event properties and the EventHandlerList class. I don't believe
there's anything special about the EventHandlerList class in...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| | |