Translation from VB to C#

Dear Experts,

I have found a code for resize a borderless form:
http://www.vbforums.com/showthread.php?t=568015
And in VB it works great. But after converting it to C# I
get a little problem that I can fix on my own. So I am
trying to figure out where the problem lies by comparing
each methode And then hope to get lucky.

So I have put in the textfile a methode in VB and the same
in C#. My question: I see in C# that a keyword Break is used
by each step and I see nothing in VB. Is this normal?

Greetings, Peter Kiers

Example.txt
LVL 1
peterkiersAsked:
Who is Participating?
 
Bill NolanConnect With a Mentor Owner, Lead Technology ProgrammerCommented:
I don't use VB much; I do not think there is a corollary to the 'break' command in VB's "select case" (it seems to be implicit).

'Break' simply exits the switch statement in C#, C, C++.  In the example you provided here there is no logical difference.
0
 
Bill NolanOwner, Lead Technology ProgrammerCommented:
What is the problem you get?
0
 
peterkiersAuthor Commented:
Its just a little problem:

What the VB-code does:
When a user goes with his cursor to the edge of the borderless form, a two-way
arrow appears. The user then presses the left-mouse button so he can change
the size of the borderless form. When he releases the left-mouse button the
edge of the form releases the cursor. But in C# it doesn't. I have to click again
to release the edge of the form.

I hope I have explaint it well

Peter
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Bill NolanOwner, Lead Technology ProgrammerCommented:
It sounds like a problem with your mouse up/down events, and not this switch statement.
0
 
peterkiersAuthor Commented:
I have added the whole code of the VB example and the converted to C#
in a textfile.

I really hope someone can help me?

Peter
C.txt
VB.txt
0
 
peterkiersAuthor Commented:
With my last post I start a new question.

Greetings,

Peter Kiers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.