|
thanks -but i couldn;t get them to work, and I also think that enums are more elegant than long lsits of constants anyway: so really, i'd like to know why the code i quoted cannot find the constant: especially as i want to remove that declaration and put it into a separate class.
So a class of Database access routines/methods/functions can access a class of public enums, which have grouped together public constants.
Oh, i ought not have said "convert", it *is* a complete re-write: my terms were wrong
I have 6 files so far, and will end up with about 60 i think, so i really want to get it right, right from the start. The asp version is a real mess, so I welcome the need to start again and build up a new clean project
If only i can get my public constants into a class of enums
It ought to be simple? I keep find samples that quote what I have done, but i get the "not-declared" wiggly blue line every time
aitch
--x--
|
|
|
|
|
Sorry, I see the problem. You can't just do the name. IF you have an enum called MyEnum and it has values of val1 and val2, you can't say val1, you need to say MyEnum.val1.
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 )
|
|
|
|
|
Hi, and thanks.
So i guess i really have a bigger question: WHat do you think is the best way to use constants in a VB.net app?
I have recently discovered i can use project-references to libraries as i did in VB, but could not do in asp: so the adovb.inc include can be replaced by a library/project reference rather than a need to copy in the constants into a class -
But for my own constants, where i thought enums would be a better way to structure their storage, i would then need to qualify every constant use which i don;t really want to do.
Given i will have 100's of constants, some of which make sense to be enums, (well, they are currently grouped together with sequential numbers), am I better off using enums that then need to be qualified, or constants?
Either would work.. but what is better?
Ditto, what is the *best* way to use adovbs.inc constants?
Though i have just ordered yet-another VB-2005 book, so maybe i had better wait till i have read that one before asking more queries... I find it very difficult getting back into a programming enviornment, that is "same same but different" to what i was familiar with a few years back
I need a work-environment and an expert and a template to get me started...
thanks -
aitch
--x---
|
|
|
|
|
I was doing the deployment in vb.net 2005 .
There are few things that i want to incorporate into my setup.
like my messages during the setup .As such .... I will not be able to do these implementation with the help of deployment wizard which is provided into the visual studio 2005
Can i do it manually .I want to start from the scratch.So which kind of knowledge should I acquire , so that i can accomplish this problem.
|
|
|
|
|
You need to write a C++ program that doesn't use .NET, so you know it will run on the target machine, which does the installation. You'll find it much easier to write a program which launches your MSI.
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 )
|
|
|
|
|
Christian , What is MSI
|
|
|
|
|
It's an installer program.
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 )
|
|
|
|
|
currently i am working in vb.net .U suggested to write a program in C++.
If i am going to write the program at official timing then....boss will fire me.Bcos i am suppose to wite programs in vb.net
Is there any other another way out . Does vb6 has anything to do with this problem.
|
|
|
|
|
Nilish wrote: .U suggested to write a program in C++.
Yes, a program that does the install would need to be C++.
Nilish wrote: If i am going to write the program at official timing then....boss will fire me.Bcos i am suppose to wite programs in vb.net
Then your boss is a moron.
Nilish wrote: Is there any other another way out
No, if you want to write your own program that does installation, it's a dumb idea to start with, but it needs to be in C++, unless you know for sure that all the machines you deploy to will have .NET installed
Nilish wrote: Does vb6 has anything to do with this problem.
No, why would it ? VB6 also requires a runtime AFAIK, but I never use it, it's worse than VB.NET. If it can make an exe that runs anywhere, you could use it. Your core idea is dumb tho, you should not write your own installer program, you should create an MSI. Writing an installer will take you a long time, if you do it properly.
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 )
|
|
|
|
|
well,
there are articles about customizing your setup program in codeproject itself, try to search for those articles.
Vilsad P P
MCTS (Windows Applications) .Net 2.0
|
|
|
|
|
I'm working on a regex code that will display the no. of times that a string appears before 'Says', like in the examples below:
1. "JohnnyBoy234 Says"
2. " Top 5 - Group Writing Project Day 3 Says: "
String regex = "([a-zA-Z]*[_:/ ]* [Ss][Aa][Yy][Ss] ";
The regex will return the string in front of 1. but not for 2. WHAT could be the problem. I'd appreciate some help with my regex statement, especially the special characters & spaces as seen in example 2.
THANKS!!!
Belief is a beautiful armour.
Knowledge is the sword.
|
|
|
|
|
expresso is the program you need.
Your problem is that there's a colon in your regex, it thus matches 2 and not 1. Remove the colon and it matches both, because * means any number of chars, including 0. It won't match the whole string, your match is any number of alpha chars, followed by any number of _:/.
dsfsdf::says
matches
dsfsdf::a says
only matches 'a says'
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 )
|
|
|
|
|
i have one doubt about dll hell problem.Suppose i have added a component called imagecombobox in the GAC. i am using that component in my First application.after that i made some changes in that component and again added the same component in GAC with different Version.i am using that component in my Second application.After This my first application will use which component?..................can anybody explain me?............
|
|
|
|
|
I've never once added a component to the GAC, I think it's a waste of time. Far easier to distribute dlls with your app ( which is how they are now solving dll hell )
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 )
|
|
|
|
|
how to delete a value in datagrid from vb.net windows apllication?
|
|
|
|
|
here is a good code for you....
Public Sub DeleteRowFromGrid(ByVal intRowNo As Integer)<br />
EmployeeDS.Tables("Employee").Rows(intRowNo).Item("RowState") = "deleted"<br />
End Sub<br />
<br />
Public Sub ReBindData()<br />
Dim objDataView As New DataView<br />
objDataView.Table = EmployeeDS.Tables("Employee")<br />
objDataView.RowFilter = "RowState<>'deleted'"<br />
dgDetails.DataSource = objDataView<br />
End Sub<br />
<br />
Private Sub btnDeleteRow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeleteRow.Click<br />
Dim intRowNo As Integer<br />
intRowNo = Val(InputBox("Please Enter Row Number to Delete"))<br />
If IsNumeric(intRowNo) Then<br />
DeleteRowFromGrid(intRowNo)<br />
ReBindData()<br />
MsgBox("Deleted Row Number :" & intRowNo.ToString() & " Succsfully.")<br />
Else<br />
MsgBox("Please enter an Number")<br />
End If<br />
End Sub
Remember it will not delete any entry from database.....
Tirtha
Miles to go before I sleep
|
|
|
|
|
how to search a record in datagrid from vb.net windows application by selected a value in combobox
|
|
|
|
|
This question has many answers, all of which depend on what your database looks like and what you're searching for, be it a primary key in a table, or text in a table, or ...
Details, man! The answer lies in the details of your question, of which you haven't given any detail at all! If you ask a question and use less than 100 words to describe the problem, I guarantee you've left out critical information needed to answer your question.
This simplest form of a search is for a specific record based on a unique, primary key value to identify that record. In an SQL statement, it looks like:
SELECT someField, someField, someField
FROM someTable
WHERE someIdField = someIdValue
|
|
|
|
|
hi...
i am trying to show a video clip on a track at some postions
is there any code available in vb.net...
if anybody knows this
plzz send a mail to me..
thanks & regards
|
|
|
|
|
Use the windows media player control.
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 )
|
|
|
|
|
what is the vb.net windows application code for edit a record in datagrid from vb.net during runtime
|
|
|
|
|
You don't edit the record in the datagrid, you change the data in the datasource the grid is bound to. And how you do that depends entirely on your datasource, be it a DataSet object, DataTable, or some other collection or array.
|
|
|
|
|
what is vb.net windows application code for this c# code?
Response.Redirect("mailto:kumar@indocanapparel.com?Bcc="+sb.ToString());
|
|
|
|
|
your question is utterly confusing....
windows application has nothing to do with Response.redirect It actually takes you to another Page in case of a web application....
what do u want....???
Go to another Form from one Form ???
Or Simple the corresponding VB.NET version of your one liner code...then it is
Response.Redirect("mailto:kumar@indocanapparel.com?Bcc=" & sb.ToString())
I am quite confused........
Tirtha
Miles to go before I sleep
|
|
|
|
|
Remove the semicolon. This is just calling a framework method, so it's the same.
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 )
|
|
|
|