473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Addhandler......

how do i do get menuitem "Connect" in addhandler ?

Private Sub mnuIrc_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnuIrcConnect.Click, mnuIrcPref.Click,
mnuIrcExit.Click

Dim mi As MenuItem = CType(sender, MenuItem)
Select Case mi.Text
Case "Connect"
Dim p As Integer = 6667

DisplayMessage(nStatus.rtbStatus, "Connection
established..." & Netsock.ServerName)
Netsock.Connect(Netsock.ServerName, p)
Netsock.SendData(Netsock.StringToBytes("PASS
PirateChat" & vbCrLf))
Netsock.SendData(Netsock.StringToBytes("NICK " &
Netsock.Nick & vbCrLf))
Netsock.SendData(Netsock.StringToBytes("USER " &
Netsock.Nick & " " & Netsock.RealName & vbCrLf))
nStatus.Text = "Status :" & Netsock.ServerName

Case "Preferences..."
frmPref.MdiParent = Me
frmPref.Show()

Case "Exit"
Me.Close()
End Select

AddHandler mnuIrcConnect.Click, AddressOf mnuIrc_Click ===> i
wanted to select "Connect"

i can used this addhandler above and no problem.
regards

Jul 21 '05 #1
0 1149

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: UGH | last post by:
I am adding image buttons dynamically and I need to add event handler when the user clicks on one of those image buttons which will have different id for reports. Here is my code LnkImage =...
1
by: Luis Esteban Valencia Muñoz | last post by:
Have a dropdownlist created in my LoadMain() which is called from the Page_load: ************************PAGE LOAD********************8Private Sub Page_Load(ByVal sender As System.Object, ByVal e...
4
by: DJ | last post by:
Good morning, Still new at this so please bear with me. I am creating a table dynamically using webcontrols based on the output of a sproc from my database.The table represents test instances...
2
by: Just Me | last post by:
When a document is to be printed I call a method that contains an AddHandler statement. I just realized that if a second copy is to be printed the method is called and the AddHandler is executed...
10
by: Rick Palmer | last post by:
I have an app I'm working on that will allow a user to run one of 5 reports. The report names are in a combobox on my form. I have a sub defined for each report that has the exact same name as is...
5
by: eBob.com | last post by:
I've used AddHandler for a UNIQUE control added to a panel and it seemed to work. But now I want to add a bunch of controls to a panel and use only one event handler subroutine. And I am...
3
by: hartley_aaron | last post by:
Hi, I was trying to store the address of the my current handler for a particular event so as to simplify using AddHandler and RemoveHandler throughout my code. However, I cannot seem to get any...
2
by: TrtnJohn | last post by:
If you call AddHandler and hook events of one object to a method in a class will the event source object still be available for garbage collection if the original reference is set to Nothing? Or...
2
by: Joe | last post by:
Hello All: Can I wire server control events in the page's PreRender event and have them take effect? I am rendering LinkButtons in a Table on a webform and am using AddHandler to wire each...
5
by: Slim | last post by:
i have a simple page, with one button button1. when click it creates a new button button 2 and adds a event handler to it. but when button 2 is clicked nothing happens, why? Partial Class...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.