|
Layout your form how you want it with the Back button displayed. Write down the Location values for each button. Now, layout the form how you want it without the Back button. Again, write down the Location values for the remaining buttons.
When your code that decides when to show, and not show, the Back button executes, change the Location values for the buttons to match how you want them laid out.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
A better way than writing down the location:
In code:
'after hiding the button<br />
btnCancel.Location = btnBack.Location
|
|
|
|
|
|
My front end is vb.net .Can i connect to a oracle db installed on linux as i do with oracle installed on windows
|
|
|
|
|
Of course! The DB server O/S doesn't make any difference to your application or the database provider its using.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
I want to display those columns i get from list box to show on the crystal report.
User need to choose the item(s) from my list box and the system will display the whole column info in the crystal report.
fire85.
|
|
|
|
|
Well for Column I am not sure but there are sections in the report. you can make them visible true or false. may be this helps you for hiding columns.. check this code
Dim opt as new report1
' blnShow is my boolean variable to decided either to show the section or not
' dsEmployee is the section in the report
If blnShow = False Then
opt.dsEmployee.SectionFormat.EnableSuppress = True
End If
May be with this code you will find the way of hiding columns...
best of luck
|
|
|
|
|
I want to create a new thread and the attached method with previous thread has 2 params . How can I do that ?
Hung
|
|
|
|
|
This question is too general to provide much of an answer.
However a simple scenario for using threads is to design a class that contains the code needed to create and start the secondary thread. The same class also exposes all parameters needed by the secondary thread as properties.
The parent thread creates an instance of the class, sets all the required property values, then calls the class method to launch the secondary thread. The secondary thread runs whatever task it is supposed to run, and then notifies the parent thread either when it is done or the operation fails.
Notification can be by events (easiest) or by callback functions (more code reqiuired but generally a much better approach).
Robert
|
|
|
|
|
But I need the second thread must return the value. So, if I create new Class to run second-thread, how can I do that ?
Hung
|
|
|
|
|
Just create a module level variable for the return value, have the thread set the value and expose the value as a third public property. In this scenario, the parent thread creates the class, sets the two input parameter property values, starts the secondary thread execution, and when the parent thread is notified that the secondary thread has completed, it can read the return value from a third public property.
Robert
|
|
|
|
|
I have a designed a form which contains 5 Textbox.I have done OlEdb connection as a source code.When i click save button,the data will not be sending to the database ..please help me
|
|
|
|
|
what error occurs...and if possible send me the code ur using for saving the data into database..i do my best for the solution of ur problem.
|
|
|
|
|
i have about 3 pages in my ms word document. i want to set first and third page to portrait and second page to landscape.
anyone can help me?
|
|
|
|
|
Can you tell me the diffrency between A(,) and A()() ?
Hung
|
|
|
|
|
A(,) is a two dimensional array. A(5,2) will always have 5 lots of 2 elements.
A()() is a jagged array. A(5)() will contain 5 arrays of type A, each can be a different size.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello All,
I am trying to extend the GroupBox control. It compiles cleanly, but when I add a new control to a form (say GroupBoxNew) and then drag other controls onto its design surface, the other controls are added to the form's controls collection instead of to the GroupBoxNew controls collection.
Can anyone point me to what I am doing wrong? Thanks!
Have a great day!
j2associates_NO_SPAM_@yahoo.com
|
|
|
|
|
I don't know in detail your source code of the GroupBoxNew. However, I try creating GroupBoxNew simply by declaring a usercontrol which is inherited from GroupBox. As a result, I can manipulate on the GroupBoxNew like available GroupBox. I think that maybe you override some functions of the GroupBox during creating the GroupBoxNew. good luck to you! <vtalau>
|
|
|
|
|
Hi all,
I'm using VB.NET and I can read my XML into a dataset and display it into a DataGrid with no problem. But what I would like to do (if possible) is select certain elements via an id attribute.
For example, if my XML had the following nodes:
<br />
<mynode id="someid">innertext</mynode><br />
<mynode id="someid">someotherinnertext</mynode><br />
<mynode id="someid">more innertext</mynode><br />
<mynode id="someotherId">innertext</mynode><br />
How would I be able to display only those nodes with id="someid" and bind my dataset to my Datagrid.
Is this even possible to do or will I have to create another XML document to parse and hold only those specific nodes?
Any help would be much appreciated! Thanks.
|
|
|
|
|
My example got cut off...it was: if my XML had the following nodes:
<&mynode id="someid" > innertext </mynode>
<&mynode id="someid" >someotherinnertext </mynode>
<&mynode id="someid" >more innertext </mynode>
<&mynode id="someid" >innertext </mynode>
|
|
|
|
|
oops...and then another line:
<mynode id="someotherId" > more text </mynode>
A different id should be included! sorry!
Again...how would I select only those text values where id="someid" ?
|
|
|
|
|
I am making a small program. Actually on my form there are two comboboxes. From these two comboboxes, user specify the search criteria.
In first combobox, there are alphabets from A-Z. In second combobox, there are selection criteria like "search By Author", "search by publisher" etc.
I just show data in a datagird.
I use the following code.
''' This code is used for concatenation % sign to use in like operator'''''''
Dim var1
var1 = Me.ComboAlphabets.Text()
var1 = var1 & "%"
MsgBox(var1)
''''Gettiong values of combobox'''''''''''''
Dim searchby
searchby = Me.ComboSearch.Text()
MsgBox(searchby)
Dim da As New SqlClient.SqlDataAdapter("SELECT * from books where '" & Me.ComboSearch.text & "' like '" & var1 & "' ", cn)
Dim ds As New DataSet
If da.Fill(ds, "books") = Nothing Then
MsgBox("No Record Found")
Me.ViewBookGrid.Hide()
Else
ds.Clear()
Me.ViewBookGrid.Show()
Try
da.Fill(ds, searchby)
Me.ViewBookGrid.DataSource = ds.Tables(searchby)
Catch ex As Exception
MsgBox(ex.Message)
End Try
MsgBox("Records Found")
End If
Everything is run fine , but there is a problem in select query after the where clause. Actually i want to select those records from database which user has mentioned from combobox. Like if user select "Publisher name" from combo box, then it select record from "publishername" column only.
I use the query, it works 100% fine
'Dim da As New SqlClient.SqlDataAdapter("SELECT * from books where publihsername like '" & var1 & "' ", cn)
At "publishername", i want to mention combosearch.text values. Means if i select "Publishername" from combobox, then my query becomes.
'Dim da As New SqlClient.SqlDataAdapter("SELECT * from books where publihsername like '" & var1 & "' ", cn)
If i select "AuthorName", then my query becomes
'Dim da As New SqlClient.SqlDataAdapter("SELECT * from books where authorname like '" & var1 & "' ", cn)
I try a lot and use this query
Dim da As New SqlClient.SqlDataAdapter("SELECT * from books where '" & Me.ComboSearch.Text & "' like '" & var1 & "' ", cn)
But this query cannot fetch correct result. If i exclude me.combosearch.text from query and replace this with "publishername" or "authorname", then it works fine.
kindly tell me that how to refine this querty, so that it will work fine,
plz reply
eshban
EsHbAn BaHaDuR
|
|
|
|
|
eshban284 wrote:
Dim da As New SqlClient.SqlDataAdapter("SELECT * from books where '" & Me.ComboSearch.Text & "' like '" & var1 & "' ", cn)
You're putting quotes around the tablename. You shouldn't.
Also, LIKE doesn't do anything unless you put % on either side of the string. And finally, you're wide open for SQL injection attacks with this code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
Also, LIKE doesn't do anything unless you put % on either side of the string
% is the wildcard so having Like 'A%' searches for anything beginning "A" - it is not necessary to have the wildcard on either side.
|
|
|
|
|
Christian Graus wrote:
You're putting quotes around the tablename. You shouldn't.
I think you mean column name and not table name. And to clarify, you shouldn't be putting single quotes around the column name.
|
|
|
|