|
Lots of them. But your going to have to get alot more specific about what your want to do and how you want to do it...
RageInTheMachine9532
|
|
|
|
|
i made a basic program that adds info to an acess database and displays it in a datagrid, i want to edit the info though the grid and update the database....
|
|
|
|
|
you can find very usefull documentation at Visual Studion.NET help.
concisely you must use and Update column at the DataGrid and use the Update method of the DataSet you used to create the DataGrid to update the data to Access database.
if you won't find any example at vs.net help i can send you a small sample code about updating database with dataset
Manos Papaoikonomou
|
|
|
|
|
I would like to know if there is any tool available for Visual Basic 6.0 which can reproduce MATLAB's 3D surface plotting, like the fill3 MATLAB function?
Thanks
Luiz Carlos Junior
|
|
|
|
|
Is it possible to set a form's location and size before displaying it? I have a couple of resizable forms in my current project. I'd like to have the app remember the size and location of the forms when the user last closed them.
|
|
|
|
|
I'll leave the part about saving and retrieving the values up to you since there are so many methods of saving these values somewhere...
You can set the Size, Location and StartPosition properties of the form before you call the form's Show or ShowDialog method:
Dim newForm As New Form2
newForm.Size = New Size(100, 200)
newForm.StartPosition = FormStartPosition.Manual
newForm.Location = New Point(50, 50)
newForm.Show()
RageInTheMachine9532
|
|
|
|
|
Perfect. And by inserting the middle three lines into the Load event, and changing 'newForm' to 'Me', I've managed to change the main form as well. Don't worry about the saving - I've got that bit sorted out.
Thanks for your help.
|
|
|
|
|
Hi..I want to configure the data adapter to select all columns from a aspecific table in my database then fill the dataset with this data and do some functions on the data and then i want to display the results in a datagrid how can i do this and can i find any VB.NET code example to do it ?
Thanks
|
|
|
|
|
If you create the dataset using the Fill command of dataAdapter - for example
dtAdapt.Fill(myDataset,"TableName")
then you write:
myDataGrid.DataSource = myDataSet.Tables("TableName")
Manos Papaoikonomou
|
|
|
|
|
Thanks for your reply but I don't want to display all the data from the dataset I want to do some functions on some columns from the dataset and then display the results in the datagrid any idea ?
|
|
|
|
|
maybe you can create a DataTable in your DataSet containing the results
Dim workTable as DataTable = New DataTable("Results")
you fill the DataTable "Results" with the results of your functions maybe with a Do While Loop or a For Next loop from the original table and then you add the DataTable in the DataSet
myDataSet.Tables.Add("Results")
Finally you can bind your DataSet with the DataTable results
wrkGrid.DataSource = myDataSet.Tables("Results")
Manos Papaoikonomou
|
|
|
|
|
Hi everyone!
(sorry for posting twice, but I posted in the wrong "area"(NET Framework) earlier)
New member and also new to VB.NET I'm planning to learn it, in order to creat nice user interfaces to databases.
The problem:
I have som code for moving nodes between treviews, and everything work fine as long as there already is one node in the destination treeview (we're talking drag and drop here).
However, I want to be able to check if there is NO destination-node, and in those cases run alternativ code.
I can only make it happen if I use OnErrorResumeNext statement in the sub, but I understand that is not a good way to handle exceptions like this.
Public Sub TreeView_DragDrop(ByVal sender As Object, _<br />
ByVal e As DragEventArgs) _<br />
Handles TreeView2.DragDrop, TreeView1.DragDrop, TreeView3.DragDrop<br />
<br />
Dim NewNode As TreeNode<br />
If e.Data.GetDataPresent("System.Windows.Forms.TreeNode", False) Then<br />
Dim pt As Point<br />
Dim DestinationNode As TreeNode<br />
<br />
<br />
pt = CType(sender, TreeView).PointToClient(New Point(e.X, e.Y))<br />
DestinationNode = CType(sender, TreeView).GetNodeAt(pt)<br />
<br />
<br />
NewNode = CType(e.Data.GetData("System.Windows.Forms.TreeNode"), TreeNode)<br />
<br />
On Error Resume Next 'don't want to use it here<br />
If Len(DestinationNode.Text) < 1 Then 'error occur<br />
'If Err.Number <> 0 Then MsgBox(Err.Description)<br />
CType(sender, TreeView).Nodes.Add(NewNode.Clone)<br />
Else<br />
DestinationNode.Nodes.Add(NewNode.Clone)<br />
DestinationNode.Expand()<br />
End If<br />
'Remove original node<br />
NewNode.Remove()<br />
End If<br />
End Sub<br />
Thing is, if I don't drop the data on an existing node, "DestinationNode" has no value, but even if I try to check for Null-values an error occur, and the code stop running.
I want to be able to check for a valid value within DestinationNode, and make descision based on that, without causing an error. (IF there is no DestinationNode, THEN...)
How do a do this WITHOUT using On Error Resume Next?
Andreas
//Sweden
|
|
|
|
|
Look into Try/Catch blocks...
Try
[Some code that might fail goes here]
Catch [Grab exception type here]
[Code to handle exception goes here]
Catch [Grab a different exception type here]
[Code to handle a different exception goes here]
Finally
[Code that always runs no matter what happens goes here]
End Try
RageInTheMachine9532
|
|
|
|
|
You could also just check if DestinationNode is Nothing:
pt = CType(sender, TreeView).PointToClient(New Point(e.X, e.Y))
DestinationNode = CType(sender, TreeView).GetNodeAt(pt)
If DestinationNode Is Nothing Then
...
RageInTheMachine9532
|
|
|
|
|
The "IS NOTHING" worked great!
...and I learnd something about Null and Nothing!
Thanks Again!
|
|
|
|
|
I used a textbox control with the flexgrid to get data from user at runtime. I managed it programatically in Visual Basic 6.0. But I struck up in getting inputs from user by using flexgrid with in VB.NET.Can anyone help me out.
Thank You
with rgds,
prash
|
|
|
|
|
Is it possible to write C++ code directly into a form or module as a function or such?
|
|
|
|
|
I don't think so.
Maxwell Chen
|
|
|
|
|
No. It's has to be written into a seperate project and then you can reference it from your VB.NET app. The opposite is also true for C++. Mixing code languages can only be done at the project level. Your solution can have a project written in VB and another project written in C++. The two languages cannot appear in the same project.
RageInTheMachine9532
|
|
|
|
|
Thankyou, this seems to be the solution to my problem.
|
|
|
|
|
hey,
im wanting to make who wants to be milionaire type game, but i am only a beginner, does anyone have some suggestions, or previously made code for this type of thing that will help me in my process.
Thanku in advance.
|
|
|
|
|
Doesn't that game already exists in its PC Version?
Real Programmer isn't who just knows how to use a programming tool, Real Programmer is who knows how to write cool stuff in any language, 'cuz he/she/(it!!?) thinks like a machine .
|
|
|
|
|
I was working with a datagrid control connecting to a small 3 column access database. I have everything working but i have a save button and i want the save button to become active right when you edit something in on of the fields. I have accomplished this by using a timer and saying
if dataset.haschanges then<br />
btnsave.enable = true<br />
end if
But this only enables the button when you stop editing that cell i want the button to become active right when the editing begins. Thank you
|
|
|
|
|
Try this event!
dragrid1_edit
I don't remember exactly!
Do you want a loans with good services? Do you want to improve your finance?
This web site will be helpful
www.c-loans.com
You will love our services!
|
|
|
|
|
Am inserting a calender control programmatically into a web form but when I browse/ preview it & try to select, a date, the form gets 'reset' All controls apart from the buttons disappear It seems their is some hidden javascript that I can only see in the html, when browsing & not when developing.
What should I do to be able to submit selected dates to a database? (And not 'reset' the form)
|
|
|
|