|
Can you make an effort to explain more clearly your problem?
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.
|
|
|
|
|
look if v have 3 options in combobox say A, B, C
if i select A then in temp variable 10 shud be assigned..
like
if combobox1.selected = "A"
then temp = 10
if combobox1.selected = "B" then
temp = 8
nw if i select nthing means combobox is empty
then temp = 0
tell me its coding..
thanks
|
|
|
|
|
if you're using VB6, try the following:
Select Case cmbLetters.Text
Case "A"
lTemp = 10
Case "b"
lTemp = 8
Case Else
lTemp = 0
End Select
(where cmbLetters is you ComboBox)
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.
|
|
|
|
|
Sir/Madam,
I have two records in my database.From the form , I am chosing the id and want that record to get displayed in the crystal report.There are two tables in the database and there is a primary and foreign key relationship between them.Now the problem is , both the records are comming.I have created links between both tables in the reports.Is there any way to create the crystal report dynalically or can i pass the parameter to show the report.
Parameter means that id which has primary and foreign key relationship.
But I don't know the code how to pass the parameters.
and parameters should be passed at both ends (I mean in the crystal reports as well as on the coding side)??
I don't want to generate the window that ask me which id u want to select .
Please help.
Thanks and regards
Pankaj
|
|
|
|
|
Sir/Madam,
I wanted to know in which condition I should write the following line of code.I mean what is the utility of that.
application.Run(new formname)
Thanks and regards
Pankaj
|
|
|
|
|
amaneet wrote: I wanted to know in which condition I should write the following line of code.I mean what is the utility of that.
It runs you windows forms based application. If you don't write that no form will appear.
|
|
|
|
|
Sir/Madam,
I wanted to know the basic difference between implicit and explicit conversion.
Thnaks and regards
Pankaj
|
|
|
|
|
Link :Data Type Conversion[^]
In Visual Basic, data can be converted in two ways: implicitly, which means the conversion is performed automatically, and explicitly, which means you must perform the conversion.
|
|
|
|
|
wht i want to do is
on first click --text in label change
on second click again text change?
how to do this
|
|
|
|
|
You have to do a two states button, either using the text itself to identify the current state or by means of an auxiliary variable.
For instance:
(1) If myButton.Text="ON" Then myButton.Text="OFF" Else myButton.Text="ON"
(2) IF bIsON = True Then
bIsON = False
myButton.Text="OFF"
Else
bIsON = True
myButton.Text="ON"
End If
where,of course, bIsOn must be a variable of the Form (or a Static one inside the event handler).
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.
|
|
|
|
|
You don't add the event twice. You haven't given enough detail about the problem to describe an accurate solution. Where is this text comming from? How is it stored? Change the text to what?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have been given a project which was developed by someone who has just left our company and is not contactable.
He developed the project and put it live but didn't save a development copy. The live version doesn't contain the .vb files
and just everything is saved and compiled as .dll.
Does anyone know how I could open the .dll filesd to see the .VB code??
macca
|
|
|
|
|
|
i want to create dynamic crystal report,
in which columns will be chosen at runtime
|
|
|
|
|
Iam having a table containing 7 columns which already have information. But I want to display a single field data/information present in the field into a grid
How to set this using Dataset?
Priya
|
|
|
|
|
Add a table to the dataset then in columns tab in this table add the number of columns u want. then in the grid put the datasource = the dataset and dataMember the table u have just created.
good luck
|
|
|
|
|
If iam giving like this means I will get all the columns to the datagrid.but I want only one or two columns then how to code that
Priya
|
|
|
|
|
If Iam giving thru the suggestion given by you,
Add a table to the dataset then in columns tab in this table add the number of columns u want. then in the grid put the datasource = the dataset and dataMember the table u have just created.
Then I will get all the data into the grid.but I want limited columns data i.e. only one or two columns/fields from the whole table
Priya
|
|
|
|
|
I suggest u change ur select * statement in ur stored procedure to select column-name. Then u will retreive only the specific column(s) u specified.
I.E. create ur adapter based on a select column-name & not select * then genertae the dataset and put it as data source for the grid.
Hope that works cause i cant think of any other way right now.
|
|
|
|
|
How to set an application Path in Connection string in VB.Net?
Example: Iam having a database of name xyz in D drive and the application is also present in the same path
Generally in VB6 We Can use App.Path but in VB.Net how to set this?
Priya
|
|
|
|
|
Application.StartupPath will give u the start up path
like:
Ds_Items.ReadXml(Application.StartupPath & "\" & "Item.xml")
hope this asnwers ur question
|
|
|
|
|
Priya_2007 wrote: Iam having a database of name xyz in D drive and the application is also present in the same path
Generally in VB6 We Can use App.Path but in VB.Net how to set this?
Hence you want to know the application path; then use
Application.StartupPath .
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.
|
|
|
|
|
You don't set this path, you retrieve it. The equivilent in VB.NET is Application.StartupPath .
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Setting an Application path in VB.Net
Priya
|
|
|
|
|
Your header is the forum name, and your post looks like it would have made a good header. Do you have a question ?
What do you mean by ApplicationPath ?
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 )
|
|
|
|