|
I'm quite new to programming and VB.NET, so Idon't know if this is really obvious.
I ran my Rich Text Editor (using Telerik R.A.D. RibbonBar and your own ExtendedRichTextBox), and I got the following error:
An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object.
Stack trace:
at WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190<br />
at WindowsApplication1.My.MyProject.MyForms.get_frmMain()<br />
at WindowsApplication1.My.MyApplication.OnCreateMainForm() in C:\Documents and Settings\lucas\My Documents\Visual Studio 2005\Projects\LucasToolsEditor\My Project\Application.Designer.vb:line 35<br />
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()<br />
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()<br />
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)<br />
at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81<br />
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)<br />
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)<br />
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()<br />
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br />
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br />
at System.Threading.ThreadHelper.ThreadStart()
Thanks.
|
|
|
|
|
Sorry I did not mention this, but my RibbonBar has disappeared. Kind of. When I click on its area, it shows up in the properties window, but it is just blankon the form.
Sorry.
|
|
|
|
|
You're probably going to have to remove the RibbonBar from your project, then go through the code files for your form and remove all mention of the RibbonBar. This should let you reopen the form in the Designer. If it does, then you can try to readd the RibbonBar and resetup the properties you had setup for it.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Thanks, I'll just try that now.
|
|
|
|
|
Hi,
I want to access database which is kept on website in database folder.
Anybody could help me please? How to connect this database? What should be
connectionstring for it with detail code? i am developing it in Vb.net 2005 with MS Access database.
I am beginer for vb.net.
If possible please send me example.
Database path is like: http://XXX.XXX.XXX.XXX/abc/database
How to write the connection string; Also the database is password protected;
Kiran Sajanikar
-- modified at 9:14 Wednesday 11th April, 2007
|
|
|
|
|
You can't do that unless you want to open up a HUGE security hole. Most web sites, as I hope yours as well, will not allow you to write to folders over HTTP. You need to be able to open the database with both Read AND Write permissions to use it.
You can, however, still use the database. But, you have to write a web service, which runs on HTTP, to do all the database work for your application.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Thanx for your reply,
But as I told you that I am beginer to vb.net; so I am bit confused. Now how should i proceed to solve my problem. Give me some hints so I can strat my project.
Kiran Sajanikar
|
|
|
|
|
I already told you what you have to do.
It's either expose all the functionality of your database through a Web Service you have to write or you switch to a database engine that supports communication over TCP/IP, like SQL Server or mySQL.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Once again thnx for immediate reply,
I got your point.
I will Work on it now.
Kiran Sajanikar
Software Engineer
CleverBIT softwares.
Pune.
|
|
|
|
|
Hi
i am facing a poblem in using the api
the api is
Private Declare Function GetProfilesDirectory Lib "userenv.dll" Alias "GetProfilesDirectoryA" (ByVal lpProfileDir As String, ByVal lpcchSize As Long) As Boolean
and the code is
Dim sBuffer As String
Dim strPARENT As String
sBuffer = ""
GetProfilesDirectory(sBuffer, 255)
when the control comes to to the execution of the code line
GetProfilesDirectory(sBuffer, 255)
there occurs the following error
Attempting to Read or write the protected memory
this is often an indication that other memory is corrupt.
please help.
|
|
|
|
|
I take it you're looking for something to give you the path to the Documents and Settings folder??
You don't need the API to do it:
Imports System.IO
Dim profilesPath As String
profilesPath = Path.GetDirectoryName(Environment.GetEnvironmentVariable("USERPROFILE"))
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi! All,
Please help me to sort out my problem of copying files from a folder of FTP site. I am using Inet Control for this purpose but it is giving an error that "Unable to Connect to remote host." The FTP site which I want to access need userid and password, which I am providing but still no result. Please help me how to resolve this problem.
Virendra
|
|
|
|
|
First, are you using VB6 or VB.NET and which version of VB.NET?
Next, let's see the code you're using to connect to this FTP server and get the file.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hi! Dave,
I am using VB6. Main Code is as follows
Dim MyFTP as FTP
With MyFTP
'
' Initialize the FTP connection.
'
If Not .FTPInit(gsServer, gsUser, gsPswd, 0, 0, "", sError) Then
GoTo cmdReceiveError
End If
'
' Transfer the file(s)
'
If bSingleFile Then
Call .FTPGet(gsLocalDir, sFileType, gsFTPDir, sError)
If sError <> "" Then GoTo cmdReceiveError
Else
Call .FTPGetAll(gsLocalDir, sFileType, gsFTPDir, sError)
If sError <> "" Then
sMsg = sError
GoTo cmdReceiveError
End If
End If
'
' Close the connection.
'
Call .FTPClose
End With
lblStatus = sMsg
'
' cleaning.
'
Set MyFTP = Nothing
Dim bFiles As Boolean
Dim sFileName As String
Dim ofile As File
Dim ofiles As Files
bFiles = False
FTPPutAll = False
On Error GoTo FTPPutAllError
Set ofiles = fso.GetFolder(sLocalFolder).Files
For Each ofile In ofiles
sFileName = UCase$(ofile.Name)
If InStr(1, sFileName, UCase$(sFileNameString)) > 0 Then
bFiles = True
If Not FTPPut(sLocalFolder, sFileName, sFTPFolder, sError) Then
Exit Function
End If
End If
Next
Set ofile = Nothing
Set ofiles = Nothing
If bFiles Then
FTPPutAll = True
Else
sError = "No files found."
End If
Virendra
|
|
|
|
|
OK. I have no idea what the "FTP" class is, but it's not the Internet Transfer Control. If you're not using the ITC, you'll have to go back to the people that wrote the class you're using for support on it. I have no idea who that is or where the library came from. There's not enough information to track that down either.
The Internet Transfer Control has problems with it when using a Username and Password, as documented here[^].
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi every one,
I want to extract first word from a string (e.g. ASD XYZ)
then i want ASD to be stored in a separate variable.
Is there a vb function to do.
Thanx and rgds,
Ahmad
|
|
|
|
|
It must be the night of the stupid headers. How does 'help me urgent' not reflect every question asked here ?
The split method of the string class can turn your string into an array of two strings, ASD and XYZ.
dim s as string() = str.split(" ")
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
left("ASD XYZ", instr(1, "ASD XYZ", " ") - 1)
Regards
KP
|
|
|
|
|
If this was a VB.NET question, you shouldn't use the VB6 stuff, you should use the stuff that's in .NET. This is a lot more ugly than using split.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
left("ASD XYZ", instr(1, "ASD XYZ", " ") - 1)
Regards
KP
|
|
|
|
|
How Can i Start VB.NET ???
[]D @ []v[] []D @ []v[]
|
|
|
|
|
|
Try using Start --> All Programs --> Visual Studio.NET 2003 --> Microsoft Visual Studio.NET 2003 or if you have a different version it might go slightly different, but try doing something first before asking. Might solve a lot.
--Zaegra--
|
|
|
|
|
Buy a book and work through it before asking questions like this one. There's no way anyone can answer you in a meaningful way, as you'll have seen from the responses you've got.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|