|
Since Visual Studio can create different project of Visual Studio VB or Visual Studio C++, can we convert a project Visual Studio VB to project Visual Studio C++? If so how can I do it?
Certain methods will not be converted 100%, but it will be corrected faster than create a new C++ from the scratch!
Thank to any help!
|
|
|
|
|
Google "VB to C++ converter" (you'll see us there and find other useful links).
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
C++ to C++/CLI Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
Do you want to convert your code of VB to VC++?
|
|
|
|
|
Hello,
I have got a little test application, which provides an WCF service and wants to consume it as well. The access does only succeed for the case, that the consumption is done by another application instance, but that's not really the thing I want. My question now is, if my problem is gernerally solveable, and if so, in which way I have to change my code.
Thank you for your help!
Robert
ITestService.vb
<br />
<ServiceModel.ServiceContract()> _<br />
Public Interface ITestService<br />
<br />
<ServiceModel.OperationContract()> Function HelloWorld() As String<br />
<br />
End Interface<br />
TestService.vb
<br />
<ServiceModel.ServiceBehavior()> _<br />
Public Class TestService<br />
Implements ITestService<br />
<br />
Public Function HelloWorld() As String Implements ITestService.HelloWorld<br />
Return "Hello World!"<br />
End Function<br />
<br />
End Class<br />
FrmMain.vb
<br />
Public Class FrmMain<br />
<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
' Provide the service!<br />
Dim host As New ServiceModel.ServiceHost(GetType(TestService))<br />
host.Open()<br />
MsgBox("Service started.")<br />
End Sub<br />
<br />
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click<br />
' Connect to the service!<br />
Dim address As New ServiceModel.EndpointAddress("net.pipe://localhost/TestHost")<br />
Dim binding As New ServiceModel.NetNamedPipeBinding()<br />
<br />
Dim service As ITestService = ServiceModel.ChannelFactory(Of ITestService).CreateChannel(binding, address)<br />
MessageBox.Show(service.HelloWorld())<br />
End Sub<br />
<br />
End Class<br />
|
|
|
|
|
app.config
You can find the configuration file at this location. It was not possible to display it here in a suitable style.
|
|
|
|
|
hello sir,
i am new in .net. i had made a window application in vb.net
as front end and sql-sever as back end.
now the problem is that how to install sql-server ,.netframework,and execute sql-script and my project on client computer step by step. plz give me details .
|
|
|
|
|
You would need to script an installer application to install those for you (i am guessing thats what you want to do)
Try out
http://www.microsoft.com/downloads/details.aspx?FamilyId=5FBC5470-B259-4733-A914-A956122E08E8&displaylang=en&displaylang=en
or
http://nsis.sourceforge.net/Main_Page
|
|
|
|
|
Please don't cross post. You posted this same message in the .NET Framework[^] forum, and the C#[^] forum as well as here, all within about 10 minutes of each other.
The people that answer questions on these forums do so on a volunteer basis and may not respond to your post as quickly as you might prefer. Posting the same question multiple times is only a way to help ensure that you don't get an answer.
|
|
|
|
|
|
Hi All;
I'm writing a small app that is displaying information in a datagridview from a FoxPro table. I am having issues on the update side of things. I am trying to write my own update statements using the ODBCCommand object, and parameters. However, the statement is failing, with only the message of Syntax Error. When I try to get the actual command text, it shows the sql statement with the @VarName placeholders. Is there anyway to get the final sql statement? Or should it show as the command text, and I am setting this up wrong. Here is what I am doing:
<br />
sql = "UPDATE table1 SET Descript = @Desc "<br />
sql += "WHERE RefNum = @RefNum "<br />
<br />
cmd.CommandText = sql<br />
<br />
parm = New OdbcParameter("@desc", SqlDbType.Char, 120)<br />
parm.Value = oRow.Item("description").ToString().Trim() <br />
cmd.Parameters.Add(parm)<br />
<br />
parm = New OdbcParameter("@refnum", SqlDbType.Char, 12)<br />
parm.Value = oRow.Item("ref num").ToString().Trim()<br />
cmd.Parameters.Add(parm)<br />
<br />
cmd.ExecuteNonQuery() 'This fails with Syntax Error<br />
This is a shortened version, there are around 15 variables I am using. When I check the value of CommandText, it shows as: "UPDATE table1 sET Descript = @Desc WHERE RefNum = @RefNum"
I am guessing this is what it should show, but is there anyway to see what is actually being sent to execute?
Thanks
|
|
|
|
|
Whenever I've used parameters, I've always had to do a cmd.DeriveParameters before I could set the parameters value...I'm not sure if it is a required call but you may want to look into it.
Also, I do not believe there is a way during debugging to see what the actual statement being sent is. You could try putting in a try-catch block and quickwatching the exception, it may have more detailed error messages.
Hope this helps.
|
|
|
|
|
I dont think that cmd.DeriveParameters is a valid statement in vb.net, at least not for an OdbcCommand. I thought about the try-catch, just reports the same error, "Syntax Error". I really hate FoxPro...
And now, adding color, a group of anonymous Latin American meat packing glitterati
|
|
|
|
|
go through the item list and and concat all the values using a delimiter like a pipe or something
|
|
|
|
|
When printing a report from the reportviewer to the Zebra TLP2844 it does not print the report in landscape. When printing to the HP laser printer landscape works fine. Is there something I need to do to get the Zebra to print in landscape?
When printing a word doc to the Zebra printer it does print in landscape.
I do have the lastest version of the reportviewer.
|
|
|
|
|
I need to get the folder list of an ftp site
I found some code that (after adapting a small bit) does exactly that but if I try to request the folder list for a specific folder it doesn't work anymore.
Order of events: I check to see if the folder 'ftpmap' is present in the root directory of the ftpserver
if not: I create it
---untill here everything works perfectly
I check to see if the folder 'test' is present in the folder 'ftpmap'
---this is where things go wrong
I get an error:
The remote server returned an error: (450) File unavailable (e.g., file busy).
from what I'v been able to figure out is that the folder 'ftpmap' is still in use by the previous request. But I closed everything I could think off.
here is the code that requests the folders (and files) of a ftpserver:
Public Function GetFolderList(ByVal ftppath As String) As List(Of String)
Dim folderlist As New List(Of String)
'Try
Dim result As New System.Text.StringBuilder()
Dim reqFTP As FtpWebRequest
reqFTP = DirectCast(FtpWebRequest.Create(New Uri(ftppath & "/")), FtpWebRequest)
reqFTP.UseBinary = True
reqFTP.KeepAlive = False
reqFTP.Credentials = New NetworkCredential(ftpuser, ftppass)
reqFTP.Method = WebRequestMethods.Ftp.ListDirectory
Dim response As WebResponse = reqFTP.GetResponse() ' THIS IS WHERE THE ERROR HAPPENS
Dim reader As New StreamReader(response.GetResponseStream())
'MessageBox.Show(reader.ReadToEnd());
Dim line As String = reader.ReadLine()
While line IsNot Nothing
result.Append(line)
result.Append("" & Chr(10) & "")
line = reader.ReadLine()
End While
result.Remove(result.ToString().LastIndexOf(Chr(10)), 1)
Dim sall As String() = result.ToString.Split(Chr(10))
For Each s As String In sall
If Not s.Contains(".") Then
folderlist.Add(s)
End If
Next
reader.Close()
response.Close()
Return folderlist 'result.ToString().Split(Chr(10))
'Catch ex As Exception
'End Try
Return folderlist
End Function
does anyone know why this is happening or does anyone have a better way of doing this.
-- modified at 10:11 Friday 19th October, 2007
is there anyway I can extract the number (450) from the execption?? besides the contains methode
because if I can do that I can have my programme working perfectly
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
How can I set my program to only download if a newer version is available? My program right now is set to download a file from my site every time it opens but I dont want it to do that. I would like to only download the file if the time and data has changed in the FTP?
|
|
|
|
|
|
hi friend
i have edting the value of app.config in windows application. code work properly its not give any error but its not change the value of app.config
plese help code:-
Public Sub asaas()
Dim XmlDoc As New XmlDocument()
'XmlDoc.Load(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)
Try
XmlDoc.Load(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)
' Navigate Each xml Element of app.Config file
Dim NodeList As System.Xml.XmlNode = XmlDoc.SelectSingleNode("/configuration/applicationSettings/filesave.My.MySettings/setting/value")
' Save app.config file
NodeList.InnerXml = TextBox1.Text
XmlDoc.Save(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
app.config:-
(?xml version="1.0" encoding="utf-8" ?)
(configuration)
(applicationSettings)
(filesave.My.MySettings)
(setting name="filesave_localhost5_Service" serializeAs="String")
(value)http://localhost/file/Service.asmx(/value)
(/setting)
(/filesave.My.MySettings)
(/applicationSettings)
(/configuration)
plese help argent
Piyush Vardhan Singh
|
|
|
|
|
hi All
Am Trying to sending an E-mail from my Windows Vb Application, i want to know the namespace that am going to import. am using vs2003. please provide me with an Example code, tutorial or an Article for sending an E-mail in a wndows application.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Did you Google this at all?
Plenty of examples are out there.
http://www.jscape.com/articles/sending_email_using_vb.html
http://www.freevbcode.com/ShowCode.asp?ID=6401
http://www.codeproject.com/vb/net/epsendmail.asp
|
|
|
|
|
hi svanwass
i always Google, before i post, i got .NET 2.0 or web Example, that couldnt help , because i needed it for Windows Application.
thanks for you help
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I have an datagrid who is filled automaticly by an .csv file
<br />
Private Sub frmCsv_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
Dim file As String = "steelandt.csv"<br />
Dim pad As String = "C:\"<br />
Dim dataset As New DataSet<br />
<br />
Try<br />
Dim bestand As System.IO.File<br />
If bestand.Exists(pad & file) Then<br />
Dim ConStr As String = _<br />
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _<br />
pad & ";Extended Properties=""Text;HDR=Yes;FMT=Delimited\"""<br />
Dim conn As New OleDb.OleDbConnection(ConStr)<br />
Dim databaseAdapter As New OleDb.OleDbDataAdapter("Select [PO],[Item],[Due Date],[Item Description] from " & _<br />
file + " WHERE PO>0 order by PO ASC", conn)<br />
databaseAdapter.Fill(dataset)<br />
End If<br />
<br />
<br />
Catch ex As Exception<br />
MessageBox.Show(ex.ToString)<br />
End Try<br />
<br />
DataGrid.DataSource = dataset.Tables(0)<br />
<br />
Now as you can see I import just 4 columns (PO, Item,Due Date and Item description)
When I run the program everything works except :
It doesn't load the item and due date colum....
and to make it worse, it imports just a few values of the column item
How come ??
|
|
|
|
|
How To Disable a Control without changing the style( backcolor,Forecolor...)
|
|
|
|
|
someControl.Enabled = False
|
|
|
|
|
just change the backcolor after you disable it, if it is a richtextbox there is no solution.
|
|
|
|