Communications :: Translate From VB6 To VB 2005?
Aug 7, 2008
I have a module written in VB6, but I need this modue in VB 2005, how to translate the code in the VB 2005, or if you have time to translate the module in vb2005
Code:
Attribute VB_Name = "FiscalModule"
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal dest As Long, ByVal source As Long, ByVal bytes As Long)
[Code].....
View 3 Replies
ADVERTISEMENT
Feb 9, 2011
I need to translate this C# code in VB.NET 2005:
[code]...
View 7 Replies
Feb 8, 2010
My application need to communicate with my self made device through serial port. I have to change the selected index of Tabs when I press a button on my device. I have Form1, Form2, Module1 Form1 Contains the Serial Port Control. Form2 contains the Tab which needs to be changed. When I press a button on device them, the button pressed is stored in an integer form in a global variable.The Interrupt for the Serial Port directs the control to the module1 where I decide using Select Case that what index of which TabControl I have to select.Depending on that, I change the Index of the required Tab.
PROBLEM:cross thread exception is fired as soon as the control reaches the statement where I Modify the SelectIndex property from the select case at Module1.While, on my other PC, the SelectIndex property is changed, but the next tab is not shown.
BUT, if I put all this code in a button control, and try to activate from there, then it works perfectly. However, I have to navigate through the tab controls using my self made device.I searched a lot on net and came across a solution which describes that we have to use delegate function and invokeRequired methods to ensure that the procedures run on the same thread.I am not able to decide that where exactly shoud the code for delegates and all be written, in form1, or form2, or module1.Also, in the hit and try that I did, I always got the value of InvoleRequired as False.
Here is the part of Code that I wrote for Delegates
Code:
'Form 1 is BLINDHELPER_SIGNIN
'form 2 is BLINDHELPER_USER
' I have defined these at Module1
Public Delegate Sub DeleToManageTabs(ByVal tb As TabControl)
Public Sub manage_Tabs(ByVal tab As TabControl)
MsgBox(tab.Name)
[code]....
After using this code also, there is no change in working of my application.
View 3 Replies
Jan 26, 2009
I am using VB2008 Express and am curious how to send a command via RS232 communications. The string that I need to send is 02h PON 03h. The start and end bits are 02h and 03h.
How can I convert 02h and 03h to its ascii form. In hyperterminal, I use the sequence {(hold)ALT 0 0 2} on the number pad to send the start bit.
I am using this code currently without the start and end bits
Code:
View 8 Replies
Mar 23, 2010
How do you convert the following c# code to vb.net?
[Code]...
View 3 Replies
May 5, 2012
I have found aa solution to a problem in one of my reports but its in VB.NET and I am not sure how to convert it to C#, I tried to do it online with one of the tools but it cant determine the events been used or something like that. If there is anyone savy at both languages maybe you can help me figure out its translation?
Here is the VB code:
Private Sub XrLabel1_BeforePrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs)
Handles XrLabel1.BeforePrint
CType(sender, XRLabel).Tag = GetCurrentColumnValue("ID")
[CODE]...
I tried to convert it on this site [URL]
THE ORIGINAL CODE IS FOUND HERE [URL]
View 2 Replies
Jul 8, 2009
How can i translate this code to vb6? i have already searched in google for translators, but with no success;.
Private Sub CallFunction()
If Me.bOn Then
Me.connectionString = String.Concat(New String() { "Server=", Me.strIP, ",1433;Network Library=DBMSSOCN;Database=rPTDB;UID=", Me.strUser, ";PWD=", Me.strPassword, ";" })
[code]....
View 24 Replies
Oct 30, 2010
I have this little function for forcing a download of MP3 files. I have it integrated into my VB app but would like it to be converted from C# to VB so that I can use other functions in my APP_Code directory.
[code]...
View 4 Replies
Apr 11, 2012
Is there an English - Visual Basic dictionary thae translate my thoughts to code? I am taking courses at the local community college and having difficulty with this "foreign" language.
View 4 Replies
Jan 28, 2010
Translate c# to program?[cod]e...
View 1 Replies
Oct 12, 2010
I have found the following code which can get the harddisk no in VB6.0.I would like to translate it into vb.net code.I have tried the auto upgrade function in vb2005 and translated the following code to vb.net, but the outcome did not run probably.Can anyone give me some help to translate the following VB6.0 code into vb.net code?
[Code]...
View 2 Replies
Oct 26, 2011
I am currently trying to use a vb function in c#, i have to translate the following from vb to c#:
For index = LBound(CollectionChannelPanel.EkItems) To UBound(CollectionChannelPanel.EkItems)
View 2 Replies
Mar 11, 2009
I need a hand with something i need to translate the following code to VB...
[Code]...
im having some difficutly with syntax etc.
View 5 Replies
Feb 1, 2010
I am looking at this blog, and I am trying to translate the snippet to VB.
I'm having difficulties with this line:
NotifyCollectionChangedEventHandler handlers = this.CollectionChanged;
NOTE: CollectionChanged is an event of this ('this' is an override of ObservableCollection<T>).
View 3 Replies
Oct 10, 2010
public void Attach()
{
deviceHandle = capCreateCaptureWindow(string.Empty, WS_VISIBLE | WS_CHILD, 0, 0, (int)this.ActualWidth -150, (int)this.ActualHeight, new WindowInteropHelper(this).Handle, 0);
if (SendMessage(deviceHandle, WM_CAP_DRIVER_CONNECT, (IntPtr)0, (IntPtr)0).ToInt32() > 0)
[code]....
View 6 Replies
Jul 17, 2011
So, I'm taking Intro to Programming and I'm working through the exercises in a chapter about String Manipulation and the For Next loop.We haven't gotten to arrays yet, so I'm trying to do this just with what's been covered.The exercise is to translate a word into pig latin.If it begins with a vowel, you add "-way" to the end of the string. If it doesn't, you add "-" and then the first character to the end until you reach a vowel and "ay" to the end of that. So "Chair" would become "air-Chay".[code]
View 4 Replies
Jun 18, 2010
I am trying to translate some VB codes to C++. And I am not quite sure what this line does.
IIf (n& 1=1, 0.0005, -0.0005)
I know what IIf(logic, true_value, false_value) does, and I guess the & operator is supposed to concat two strings. But I am not sure what the intention of using "n & 1 =1".
View 6 Replies
Jun 1, 2011
I'm trying to convert old VB.NET code into C# and I'm not sure about the current line and what it means really.
[Code]....
View 5 Replies
Jan 7, 2011
In C, Pascal, and C++ it is possible to use the FormatMessage function to retrieve a "friendly" error message that corresponds to a COM HRESULT error code. This question contains sample code that demonstrates the C++ approach. Of course it would be possible to build a managed C++ assembly to perform this function for C# and VB.NET code, but I'm wondering: is there a way to translate COM error codes using the .NET system libraries?
View 2 Replies
Jun 14, 2011
I have an application written for the UK market that currently only supports English (UK) and a client wants to deploy part of the application out to a non UK site and syncronise the data back to the UK HQ.I can convert the application labels and messages using resource files and the loc culture information but was wondering how you would convert the database bound data.E.G.Here is the HQ based table
tblFault
ID ; Description
1 ; Not Functional
[code].....
View 3 Replies
Jul 12, 2010
I've got a method I'm trying to translate from c# to vb, goes something like this .. x.For(typeof(IRepository<>)).Use(typeof(Repository<>)); VB doesn't seem to like the idea of a IRepository(Of ) ... what's the syntax on that?
View 1 Replies
Oct 26, 2009
I have this code in c:
void Back()
for(i=1;i<=n;i++)
cin>>a[i]; 'display vector a[i] a[i] is a vector with 10elements
while(k>0) 'while k is greater than 0
[Code]...
View 4 Replies
Feb 24, 2010
I'm usually reasonably good at translating C# into VB, but I'm a bit stuck partially due to the ternary operator in this function and also because I don't fully understand what is happening with the "from x in dataSource.OfType<object>() select 1).Sum()"
[code]...
View 7 Replies
Sep 29, 2011
I need to translate line 4 in the code snippet below into VB. For some reason I cannot get this done tonight. I am either too tired or having a brain drain.[code]
View 5 Replies
Apr 28, 2009
I'm Trying to create a form that has 2 multiLine Textboxes one of which you enter text and the other that shows the text in piglatin.
View 2 Replies
Jul 1, 2011
How to translate from Chinese to braille?
View 3 Replies
Oct 1, 2010
I am using VS2010 & Framework 4 with all the latest updates. I have written a small app to read/write 9 pieces of metadata from/to a photo. I have created a class using Robert Wlodarczyk's code. Everything works as expected. I am using the following GetQuery("System.Photo.DateTaken") which returns a
[Code]...
View 1 Replies
Apr 28, 2010
I have a list of color values encoded as signed integers (OLE I think) in a legacy INI file that I need to translate into (A)RGB values with .NET. [code]...
gives an alpha-blended version of a color that is not at all what I expect. I think that a value like -2147483633 is supposed to represent a system-defined, or named color like ButtonFace. Is there a .NET method for translating these legacy colors properly? Note that pInvoke to OlePro32.dll is not an option.
View 1 Replies
Oct 14, 2010
My apps are crashing on Vista and W7 laptops, they produce a "System.OutOfMemoryException: Out of memory." message.
How can i determine what code in the app is using the most memory or causing this?
I have downloaded "procexp.exe" which gives you a more detailed description of what is running compared to the "task manager" but i do not understand how to translate or determine what is using all the memory.
HTML
System.OutOfMemoryException: Out of memory.
at System.Drawing.Graphics.FromImage(Image image)
at App.MouseRuler.Painting(Object sender, PaintEventArgs e)
[Code]....
View 6 Replies
Dec 9, 2010
I followed suggestion from vb.net convert string to date.But, it did not work.the code is as follows:
Dim Dt As DateTime
If DateTime.TryParse("Thu, 09 Dec 2010 16:03:24 EST", Globalization.CultureInfo.InvariantCulture, Globalization.DateTimeStyles.None, Dt) Then
MessageBox.Show(Dt)
End If
I need to have date populated in the format of "yyyy-mm-dd hh24-mi-ss".
View 3 Replies