• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

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
0
peterkiers
Asked:
peterkiers
  • 3
  • 3
1 Solution
 
Bill NolanCommented:
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
 
Bill NolanCommented:
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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
Bill NolanCommented:
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now