|
Does anyone know how to get a copy of an existing form (at design time) in same project?
I t tried copy & paste, but it shows an error message, when I load the copied form at the design time.
Failed to parse method ‘InitializeComponent’, The parser reported the following error ‘Error HRESULT E_FAIL has been returned from a call to a COM component.’ Please look in the Task List for potential errors.
In Vb.Net 2003 I can simply do it by adding a new form and coping & pasting ‘windows Form Designer Generated Code’ of the existing form.
But VB.Net 2005 I cannot do it.
I don’t know how
Thank You,
Regards,
Chatura Dilan
|
|
|
|
|
Hello!
Click on the form in the Solution Explorer of which you want to create a copy of. Then hit 'ctrl + c' and 'ctrl + v'. It will create a copy of the form with name 'Copy of FormName'.
regards
Mubashir
-- modified at 4:23 Wednesday 3rd May, 2006
|
|
|
|
|
Mubashir,
I did it your way, but it shows above error too.
Failed to parse method ‘InitializeComponent’, The parser reported the following error ‘Error HRESULT E_FAIL has been returned from a call to a COM component.’ Please look in the Task List for potential errors.
Regards,
Chatura Dilan
|
|
|
|
|
Dear Sir/Madam,
I am currently design an application using VB.Net as an interface and Microsfot SQL Server 2000 as a data store. Our clients want to apply the unicode with it.
For the display of Unicode in Khmer, my country language is fine. However, I face a problem with search.
For example when I search for a person name using the SQL statement at the querry as well as embeded code in VB.Net the return value is emply. I had double checked on the name and it's stored in the database.
Can someone out there help me with this?
Kind Regards,
Sithy
Sithy
|
|
|
|
|
What is the Datatype which you are using in SQL server ?
I worked with Unicode and use the NVarchar in SQL . and while searching like a table with names I shall pass this query with using "N" keyword
Select * from TableName where Name = N'Name in your Language'
other wise if you are using varchar then you must have to define default language while creating the database.
So this will return me the answer.
Regards
Rizwan Bashir
|
|
|
|
|
Thank you sir for your help. The data type is Nvarchar. At first we created it as varchar but we've changed to NvarChar.
For example I want to search for a particular guy called Sithy from the table called TName, and the attribute is FullName i would write:
Select FullName from TName where FullName = N'Sithy'
Is the statement correct?
Thank again
Sithy
|
|
|
|
|
yes the statement is correct . and since it is not searching. open the SQL server and check in table the record is readable or not. if not then remember that during insertion it should go this way
insert into Tname(FullName)Values(N'Sithy')
this will insert the data properly and then try to fetch and I am sure it will work. as my all the applications are multi-lingual and working 100% on this criteria.
Rizwan Bashir
|
|
|
|
|
thank you sir for the reply.
Will it works for insertion of variable rather than constant like this?
Regards,
Sithy
|
|
|
|
|
yes it will work . like
' txtName is the textbox and the code is
insert into Tname(FullName)Values(N'" & txtName.text & "')
Do let me know your problem is solved or not. also tell me the regional language on which you are working ? ( Just for information )
Regards
Rizwan Bashir
|
|
|
|
|
thank you for your help
The original language is Khmer (a Cambodian language)
By the way, do you know how to split windows with data grid in VB.Net. I am encountered problem with that. My clients want to have the ability of splitting windows such as the Excel application where we can fix the column heading and row heading
Regards,
Sithy
|
|
|
|
|
I dont know about the MS grid if it do this or not. but there is a infragistic grid control which do this.
Rizwan Bashir
|
|
|
|
|
Dear Sir,
Thank you very much for your help. By the way, does infragistic grid control work with VB.Net. If you don't mind, please help me with this and show how to work with it.
Kind regards,
Sithy
|
|
|
|
|
thank it works now.
Regards
Sithy
|
|
|
|
|
Dear ALL,
I have encounter problem when I deleting a record in my program. Error msg as follow:
OleDbException was unhandled.
No value given for one or more required parameters.
I think I have declare the correct statement but it still prompt me...
My code as follow:
Public Sub delRec(ByVal column As String, ByVal table As String, ByVal value As String)
'create connection instance with connection string
Dim myConnection As New OleDbConnection(ConnString)
'sql delete query
Dim query As String
If table = "SALPASS" Then
query = "DELETE FROM " & table & " where " + column + " = " + value
Else
query = "DELETE FROM " & table & " where " & column & " = " & value
End If
'create sql command instance with the delete query
Dim myCommand As New OleDbCommand(query, myConnection)
'open database connection
myConnection.Open()
'execute sql delete command found in query string
myCommand.ExecuteNonQuery()
'Close the connection
myConnection.Close()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If GroupBox1.Text = "Sales" Then
If TextBox1.Text = "" Then
'display error message box
MsgBox("Error!" + vbCrLf + vbCrLf + "Please select User Id to delete", MsgBoxStyle.Exclamation, "Deletion Error")
Else
'deletes record from database
delRec("USER_ID", "SALPASS", TextBox1.Text)
lblLabel.Text = "Record Deleted"
'refresh table
getsaltable()
End If
end sub
I just want to delete the user id and password.
Please advise.
Thanks
Jack
Jack
|
|
|
|
|
Do one thing. the query you build in the function. Copy that Query and run that directly in the SQL Query analyzer or what ever the database you are using. this will clear you that the query is fine.
Also check on which line it creates the problem ?
|
|
|
|
|
ur query i think is somewhat wrong. It should be
query="DELETE FROM '"& table &"' where '" + column + "' = '" + value+"'
format should be
<string_variable>="<insert,update,delete> from '"+<table_name>+"' "
all runtime values should be entered inthis format
'"+<variable_name or="" parameter_name="">+"'
if + sign doesn't work try &
|
|
|
|
|
Thanks Will try on that
jack
|
|
|
|
|
i would like to view record from the dataabse.but i dont know how to write the coding..sir,pls help me.
|
|
|
|
|
Search for ADO.NET tutorials on this webpage. You will find many resources.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi ,
please i'm just a beginner in this way i hope to be a good developper , well i'm not going to write a story abt ma life but i wanna know somethings i hope you can make them clear to me
well let start with difecult words
Assembly
.config files
XML
just this three words can you explain what they mean i know this is not a correct question in a forum but when i hear this three words i feel really stupide & weak i think that i'm not & i will never be a good programmer
i wanna know if i'm a programmer even if i don't know how to use those things & i wanna know what those mean & when can we use them & why ??
thank you very much
if you can't answear i will thank you because i will do the same if i see like this stupide question in a vb.net forum but i hope you understand
try to be good if you can't be the best
|
|
|
|
|
Try searching for these terms on Wikipedia[^] or on Google[^].
You'll get quicker and possibly more comprehensive answers there.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Back in the good ol' days (dark ages) when real programmers used punched cards, all printout was mono-spaced. We didn't use proportional fonts; we didn't even HAVE proportional fonts. It was easy to make a report mock-up, convert it to fixed positions on the page, and convert that to code (COBOL, Fortran, ASM, whatever).
Now, I'm trying to put together a report with vanilla VB.Net code, not Crystal Reports or anything like that. Now, everything is trial-and-error. I add a couple of items to the page, and run a test. Then I add a couple more and repeat the cycle. I'm thinking that there has to be an easier way. I've found lots of code that writes to the printer. But I've not found any references that explain how to shorten the trial-and-error cycle. I am using PrintPreview, so I'm not taking the time and trees to actually print the report. But the testing cycles are still too time-consuming.
When the boss brings you a sheet of paper with a report scribbled on it, how do you make a pretty report with a minimum of fuss.
Thanks for the help. This is definitely in the category of teaching an old dog a new trick.
HamCoder
|
|
|
|
|
i am using an active-x control but wherever i run the project i got the error that "Active-x Component can not create object" whats is the cause of that error and second thing is that what is the use of somefilename.exe.manifest file" need help here really stucked
From the Dust u r and to Dust u will Return
|
|
|
|
|
Zulnurain wrote: wherever i run the project i got the error that "Active-x Component can not create object"
Ensure that the ActiveX control is properly registered on your system.
Zulnurain wrote: what is the use of somefilename.exe.manifest file"
It's used (in some cases) to specify to Windows what objects to use for UI style rendering. Typically when using a VB6 program on XP so that XP visual styles are applied.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
I have Initial and Final Date and Time, Post Time and Days, Preview Days and Time. All are fields of task, I have a list of task that today is of alarm day and Time. Help me to do make the algoritm.
|
|
|
|