|
<blockquote class="FQ"><div class="FQA">Polymorpher wrote:</div>If you drag the project file for the VB6 app onto Visual studio it will bring up an upgrade wizard </blockquote>
ok, 10x for your answer and sorry 4 being really stupid, but can you please explain to me in more details what I need to do? I don't understand!
==========================
Be positive, it helps...
==========================
|
|
|
|
|
There should be a file in your project ending with the .vbp extension if you drag it onto the icon for Visual studio it will activate a wizard that you can use to convert the project to vb.net, the wizard will guide you through it
P.S. there is nothing stupid about your question, if you don't know the answer to it, someone else probably doesn't either and posting the question here guarantees that others will have the opportunity too see the solution to it
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Go to tools menu then "Upgrade Visual Basic 6 code..." then paste in portions of code at a time if you want.
|
|
|
|
|
Visual Studio has a built-in tool that converts VB6 code to VB.Net, but it doesn't always convert the code correctly. I always rewrite old code by hand, because converters have their limitations, and they do not always follow the correct syntax.
This is more of a personal preference though, converters may work fine for you. Try it out and see.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
if your project is bigger then 30 MB and has more that 20 modules then forget it. I had that problem two and i tried but its impossible so what i did was Windows Explorer/VB Projects/Select Project/Delete and started from beginning.
|
|
|
|
|
All you have to do is open the VB6 projects .VBP file in Visual Studio .NET and it'll launch a conversion wizard.
But, be warned! The conversion will use various methods to keep your existing code running as best as possible. It will NOT substitute .NET Framework or VB.NET methods and classes for your VB6 code. It will essentially wrap the VB6 code to make it run in the .NET world.
In all cases, I highly recommend just scrapping the VB6 project entirely and rewriting it from scratch, no matter what the porject size. Why?? Because when you want to start converting sections of the code to .NET versions, you'll be rewriting the thing, plus writing and adding shim code and various other utility libraries to translate between what you've done in VB6 and what is far more advanced in VB.BET and the .NET Base Class Library.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
ok, guys 10x! i managed to to the upgrade, but i have a error stating that "Recordset is not a member of System.Windows.Forms.Label".
how do i get rid of it?
==========================
Be positive, it helps...
==========================
|
|
|
|
|
Like I said, the conversion isn't perfect.
About the error message - isn't there something weird about that?? Why would a Label control have a RecordSet property??? It won't. The problem is WAY beyond a simple explanation or a fix that can be easily explained in a forum. This is going to take a code review to get it fixed.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have a need to print a Form and its ComboBoxes and Labels by way of a ButtonClick. I found an example to use but it's very vague and I've been told that you can't code a Button in a Form to Print without an aftermarket tool.
Any advice?
Thanks
Jason
-- modified at 16:29 Wednesday 7th February, 2007
|
|
|
|
|
here is an easy way:
Dim bm As New Bitmap(Me.Width, Me.Height)
Dim g As Graphics = Graphics.FromImage(bm)
Me.DrawToBitmap(bm, New Rectangle(0, 0, Me.Width, Me.Height))
now you can customize this code to getting a bitmap that only contain client rectangle of your form.
another way is:
Public Class ScreenCapture
<System.Runtime.InteropServices.DllImport("user32.dll")> _
Private Shared Function GetDesktopWindow() As IntPtr
End Function
<System.Runtime.InteropServices.DllImport("user32.dll")> _
Private Shared Function GetWindowDC(ByVal hwnd As IntPtr) As IntPtr
End Function
<System.Runtime.InteropServices.DllImport("gdi32.dll")> _
Private Shared Function BitBlt(ByVal hDestDC As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal hSrcDC As IntPtr, ByVal xSrc As Integer, ByVal ySrc As Integer, ByVal dwRop As System.Int32) As UInt64
End Function
'Save the screen capture into a jpg
Public Shared Function SaveScreen() As Bitmap
Dim myImage = New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
Dim gr1 As Graphics = Graphics.FromImage(myImage)
Dim dc1 As IntPtr = gr1.GetHdc()
Dim dc2 As IntPtr = ScreenCapture.GetWindowDC(ScreenCapture.GetDesktopWindow())
ScreenCapture.BitBlt(dc1, 0, 0, Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, dc2, 0, 0, 13369376)
gr1.ReleaseHdc(dc1)
Return myImage
End Function 'SaveScreen
End Class 'NativeMethods
|
|
|
|
|
I tried both methods and the first one was promising, although nothing happened. The Second example gave me a bunch of errors.
I found a topic on this very same subject and ended up downloading a ToolPack to get the "PrintForm" component. I set the PrintAction property to PrintToPrinter and put PrintForm1.Print() in the event handler for the Button.
This got me the print!
Thanks for the help.
-- modified at 9:37 Thursday 8th February, 2007
|
|
|
|
|
Hi All,
I'vecome across a strange problem, Im trying to display specific fields (rows and items) in a database, but the db feedback the wrong fields.
My code is like this.
RichTextBox1.Text = dataSet.Tables("useCase").Rows(3).Item("EventID")
RichTextBox2.Text = dataSet.Tables("useCase").Rows(65).Item("EventID")
...etc
However this displays records from different rows, (but the item(eventID)stays the same)
Can anyone help in this matter?
Thanks in Advance
Jaidev
|
|
|
|
|
jady84 wrote: However this displays records from different rows, (but the item(eventID)stays the same)
Is the eventID unique? If not then there is the possibility that the data is genuinely the same.
Have you attempted to debug this and see that the data is really the same between row 3 and 65?
Have you checked the SQL is correct?
|
|
|
|
|
Colin Angus Mackay wrote: Is the eventID unique?
What do you mean by this? the EventID is not the primarykey, (in fact the table doesnt have one) but it is the only EventID field.
I have debugged it, and the data in rows 3 and 65 is not what shows on the form.
Checked the SQL a zillion times!
|
|
|
|
|
What are you using to display the data? A datagrid? try getting the data from the grid itself instead of the datarow...indexes in the grid may not be the same as indexes in the dataset because a grid can be sorted.
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Hi EveryBody
Im using ASP.NET with VS 2005 and trying to make report with Microsoft Reporting Service. Those error Im getting is follows.
1.Report Viewer cant change the report. Example I got a TextBox under a Button where I can put a CustomerID in TextBox. I have put a CustomerID 1001 inside the TextBox and Clicked the Button, 1st Time Im getting the whole informations about that particular Customer. When I have changed the CustomerID like 1002 then !!! inside the code is working properly and the DataSet shows the information about that CustomerID 1002 but ReportViewer cant change the Customer Informations its remain same. Still its showing 1001 informations.
2.A data source instance has not been supplied for the data source 'DataSetAUDITLOG_CountLessons'. I have created 2 tables inside the DataSetAUDITLOG after that I have deleted CountLessons table from DataSET and Im not using this Table anymore and there is no relation with table anywhere. So why Im getting this error.
3. On the otherhand I want to send a CustomerID value to another page from a ReportViewer. Could you please tell me. How can I do it? If you have any project example about this please send me.
I need your help
Thanks
Sarfarj Ahmed
Sarfarj Ahmed
|
|
|
|
|
i want to split a string using split in vb.net.how i can use that
|
|
|
|
|
Dim MyArray() As String<br />
Dim MyString as string<br />
MyString = "Hello, World!"<br />
MyArray = MyString.Split(",")<br />
MsgBox(CStr(MyArray.GetValue(1)))
result would be "World!"
for example
My advice is free, and you may get what you paid for.
|
|
|
|
|
Johan Hakkesteegt wrote: MsgBox(CStr(MyArray.GetValue(1)))
or MsgBox(MyArray(0)) for Hello
or MsgBox(MyArray(1)) for World
or think... JOKE!!!
|
|
|
|
|
i want to draw one rectangle in windows form when i click a button.how can i do that.
anyone please help me
|
|
|
|
|
Create a Graphics Object from the window handle and then draw the rectangle using the graphics object.
eg.
Dim g As System.Drawing.Graphics
g = System.Drawing.Graphics.FromHwnd(Me.Handle)
g.DrawRectangle(System.Drawing.Pens.Black, New Rectangle(10, 10, 40, 40))
|
|
|
|
|
Hi,
I need source code for rental equipment, preferred in VB.
Thanks.
|
|
|
|
|
Please don't write everything in bold. The use of bold text is to emphasise certain words or phrases, if you use bold on all the text it has no meaning, it's just annoying.
You forgot to ask a question.
If you ment to ask for locations where you can find "source code for rental equipment", there are two obvious answers:
:: What is "rental equipment"? What do you need the source code to do? Should it "equip rentals"?
:: Have you tried searching for it using a search engine?
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello everyone,i need source code of calender in VB.net.
|
|
|
|
|
Hiya,
Don't know if this would help, but I have found a good calendar at:
http://www.windowsforms.net/Default.aspx?tabindex=4&tabid=49
Scroll down to the User Interface section and there's an item called Outlook Calendar Look and Feel.
It is in C# though and NET 2.0, but might help you with some ideas. It replicates the Outlook calendar pretty well.
The control inherits from a DataGridView and basically just paints itself to look like a calendar.
I don't think I've ever found a full open source calendar written in VB.NET. There are a couple of pretty good third party controls that do calendars/schedules though.
|
|
|
|