|
Not the whole thing, just the suspect trouble spot in the code
I would single step through everything in the debugger. Also, use the code block tag at the bottom to make it easier to read.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
How to convert C# to visual basic....?
|
|
|
|
|
Are you talking about code or what ?
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
How about a more meaningful subject line?
Learn to google for code converters, you'll be amazed at what you can find
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Fire the C# guys and hire VB6 guys code monkeys...??
|
|
|
|
|
muhahahha.
What convert the code? Just call it from what you're working with.
|
|
|
|
|
drop all tabs, semicolons, curly brackets.
add an End here and there.
|
|
|
|
|
I'm converting a VB6 app that uses the MS COMM control that sends data to various types of printers. I'm now trying to remove the VB MSComm control references and instead use the System.IO.SerialPort class instead.
I need help with the following code block:
strInString = objComm.Input
objComm.InputLen = 0
sngCheckTime = Timer + 2
Do
DoEvents
If sngCheckTime < Timer Then
CheckPrinterStatus = 2
Exit Function
End If
Loop Until objComm.InBufferCount > 0
Is SerialPort.ReadLine the equiv of objComm.Input?
What should this be changed to? Loop Until objComm.InBufferCount > 0
Thanks for anyone who can shed light on this.
|
|
|
|
|
Hi All
I wonder if someone could help me with the following;
Our ogranisation would like to have access to a list of the QBDG's in our Active Directory, and then select a group to get a list of the members of the QBDG's via web pages (delivered by web project in VB 2005).
Within Active Directory, the structure is set up as follows;
company.com
- Business Unit
- Computers
- Groups
- Printers
- Users
- Business Unit
- Computers
- Groups
- Printers
- Users
- Business Unit
- Computers
- Groups
- Printers
- Users
.... and so on
The QBDG's therefore are in a number of different folders. I've tried various LDAP queries, but haven't got this at all, lol.
Please could someone help;
1) Obtain a list of ALL QBDG's based on the above structure
2) Obtain a list of Users of one of the groups once selected
Thanks for looking at my problem
Brian
|
|
|
|
|
hi,
How can i programmatically check whether SQL Server is installed on the system or not ?.Also how can i check what is the name of Server instance.
|
|
|
|
|
I would try Google [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Talk is silver, silence is golden....
|
|
|
|
|
Check to see if the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion exists. If it exists, then as expected it contains the version number of the installed SQL Server.
|
|
|
|
|
--> Study "SMO Objects". You will learn alot...!
J A Nasir K
|
|
|
|
|
I need to control the properties of a logitech webcam, such as the gain and apperture settings, via VB without using the properties window supplied by the driver software. I've contacted Logitech and got no help there, has anyone got the list of commands / method of writing directly to the webcam?
|
|
|
|
|
Something like this[^] helpful?
|
|
|
|
|
Hi All,
I am writing a program to open a word document located in the server from a client application using which is using VB6. the vb.net application is a setup as a web service on our server. i went to the dcomcnfg and did the necessary configurations and set impersonate to true with a user name and a password and that bit works fine.
But when it creates a document it gives the following error message which i have tried to workout for the last two hours without success.
This is my code
<webmethod()> _
Public Function Regional_Franchise_Agreement(ByVal BusinessID As String)
Try
With Check_Session(Context)
wa = New Word.Application()
'Open and change the Regional Disclosure Document 04 06 08
wd = wa.Documents.Open(stTemplate_Location & "/Regional_Franchise_Agreement_04_06_08.doc")
wa.Visible = False
If htMain.Item("Special_Conditions").ToString = "0" Then
wd.Bookmarks.Item("SpecialConditions").Select()
wa.Selection.Delete()
Else
Call Find_and_Replace("[Special_Condition_Text]", htMain.Item("Special_Condition_Text").ToString)
End If
'wd1.SaveAs(stOut_File_Location & "/" & htMain.Item("Company_Name").ToString & "_" & htMain.Item("ABN").ToString & "/Regional_Franchise_Agreement_04_06_08.doc")
wd.SaveAs(stOut_File_Location & "/Regional_Franchise_Agreement_04_06_08.doc")
End With
Catch ex As Exception
Insert_Signup_Warnings(BusinessID, 1, ex.Message)
Finally
wd.Close(Word.WdSaveOptions.wdDoNotSaveChanges)
wa.Quit()
wd = Nothing
wa = Nothing
ChDir("c:/")
End Try
End Function
Thanks in advance for ant help.
This is the error Message:
System.NullReferenceException: Object reference not set to an instance of an object.
at FMS4NET.FSO_Signup.Regional_Franchise_Agreement(String BusinessID) in C:\Inetpub\fms4net\kanchana.ratnayake\App_Code\FSO_Signup.vb:line 58
Kev
|
|
|
|
|
Hi,
Can anyone help me here to translate this? It´s from a help file that is only coded in vb.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
CType(objForm, Form1).Label2.Text = TextBox1.Text
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MyForm As New Form2()
MyForm.objForm = Me
MyForm.SetBounds(400, 400, 300, 300)
MyForm.Show()
End Sub
Public Property Form2Value() As String
Get
Return MyVal
End Get
Set(ByVal Value As String)
MyVal = Value
End Set
End Property
Thanks
|
|
|
|
|
nelsonpaixao wrote: help me here to translate this?
No. But, you can find translator utilities, though not always perfect, they are helpful. The code you supplied is very straightforward. You might want to read up on programming VB.NET and C#.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
You can use SharpDevelop[^]. There is build in tool to translate code from VB to C#
|
|
|
|
|
|
|
A translation of that code isn't really sufficient. You should clean up the code in the process.
nelsonpaixao wrote: CType(objForm, Form1).Label2.Text = TextBox1.Text
Why isn't the variable objForm of the type Form1 ? The only reason that you need a cast is that the variable is of the wrong type.
nelsonpaixao wrote: Dim MyForm As New Form2()
MyForm.objForm = Me
Don't expose objForm publically, send the reference in the constructor instead.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi, Guffa
The code is not mine, don´t ask me!!! I don´t understand it!!!
Thanks
|
|
|
|
|
Then why not try to find some better code to start from, perhaps even something in the language that you are using. What the code is doing is not very complicated at all, if you search the web for what you are trying to do, you should find several examples.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|