I have two computers (Desktop and laptop), The desktop is my office computer and I have been using it for my application development(Visual basic). I have Visual studio 2013 and SQL Server 2014 installed on both computers. I exported the database from my desktop computer to the laptop and copied the project from the project folder to the project folder of the laptop. I went further on to change the connection string to suit the path of the database on the laptop. The problem am facing now is that some forms cannot fit on the screen of the laptop and I have a NAMESPEC ERROR in my code. Whats is the best way to do this in order for the forms to fit on different screens and the namespec issue?
Thanks in anticipation.

Recommended Answers

All 3 Replies

In the formload event:
Me.Width = Screen.Width
Me.Height = Screen.Height

However, that might not display all of the controls, depending on the layout of the form. You need to deal with this by resizing these as well.
Something like in the form resize event:
Me.MyControl.Width = me.ScaleWidth / 2
Additional information:
The layoutpanel might suit your needs for resizing controls automatically.

Also do you mean "namespace error" ?

Yes "namespace error"

Well only you know which namespaces or libaries you need to import or refer too. Obviously you are using amethod and not referring to the namespace you would need.
Quote from thread:
I noticed via Subversion that I apparently changed the project build Platform target to x64. This was the only change I had made and after making that change, the code was working for a bit. I changed it to x86 to test and suddenly my designer was working again. Subsequently, I changed it back to x64, and the problem has disappeared completely. I suspect that the designer builds some kind of cached code in x32 and changing the x64 build platform breaks it when you make code changes.
End Quote

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.