Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upgrade Question: VB6 to VB.NET 2.0

Status
Not open for further replies.

SiriusBlackOp

Programmer
Oct 20, 2006
503
Anybody know how to convert this to VB.NET? Or is this something stupid in VB6 that we no longer have to even think about anymore. Upgrade Wizard gave the following:

Code:
'UPGRADE_ISSUE: Form method frmMain.PopupMenu was not upgraded. 
'Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="CC4C7EC0-C903-48FC-ACCC-81861D12DA4A"'

Me.PopupMenu(Me.mnuTray)

I have a feeling I'm going to have some more stupid questions like this. Ugh.

Senior Software Developer
 
I've not tried any upgrades so I can't say on that, but if you can give a little more detail on where that line shows up in your code I might be able to help. Is that in a function you created, in the forms create code, what kind of object is PopupMenu (file menu/right click menu), are you getting the line from the wizard or does it error there when you try to run, etc.

-I hate Microsoft!
-Forever and always forward.
 
It's a VB6 sample code for an API, and by posting all of it I would probably be violating the EULA.

It's some goofy code. It looks like they are using the MouseMove event, capturing the X & Y cords, checking to see if the X matches a certain value and then using that to display a useless menu.

Better yet, the global constants that hold the X comparison values are labeled as Left Button Double Click and Right Button Up??? WTF? It's no wonder I'm confused.

Whoever wrote this needs to lay off the drugs for a while.


Senior Software Developer
 
lol. I'm not the least surprised. My opinion has always been too much Microsoft rots the brain and that sound like too much Microsoft.

-I hate Microsoft!
-Forever and always forward.
 
VB2005 doesn't support PopUpMenu anymore and I'm pretty sure that it won't auto-convert code that uses it. I think it'd have to be a ContextMenuStrip instead.

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
It's the way I described the code. It's just crappy code written into a sample, which is why it's funny.

I've got the app roughly converted to .NET 2.0 now. I just have to go through and get rid of all the junk from the VB6 namesspace, remove all the Var = Nothing type of crap that Garbage Collection now handles, so on and so forth.

Thanks anyway! :)


Senior Software Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top