|
It seems to be a problem when sending the node byref,
using byval I don't get the error... O_o
So, the code could be just like this:
Imports System.Windows.Forms
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TreeView1.ExpandAll()
End Sub
Private Sub Recorre(ByVal Nodo As TreeNode)
Dim i As Integer
For i = 0 To Nodo.Nodes.Count - 1
Recorre(Nodo.Nodes(i))
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
For i = 0 To TreeView1.Nodes.Count - 1
Recorre(TreeView1.Nodes(i))
Next
End Sub
End Class
Time to come clean...
Vive y deja vivir / Live and let live
Javier
|
|
|
|
|
I have multiple list boxes and have different items as follow :
ListGroup1 ListGroup2 ListGroup3 ListGroup4 ListGroup5
g1_items1 g2_items1 g3_items1 g4_items1 g5_items1
g1_items2 g2_items2 g3_items2 g4_items2 g5_items2
g1_items3 g2_items3 g3_items3 g4_items3 g5_items3
listallitems
g1_items1
g4_items3
g4_items1
g5_items2
g2_items3
g4_items2
g3_items3
g2_items2
g3_items2
g5_items3
g1_items2
g1_items3
g2_items1
g5_items1
The Items aboved are added from a combobox which is linked from a table.
So what I want to implement is that on a ListGroup's DoubleClick event as I removed the listgroup Item
from the listGroup I should corresponding delete thesame item from listallitems...
how can I implement this?
|
|
|
|
|
You could create a generic sub that binds all the listboxes to the same method (tacking on the all appropriate listboxes at the end of the method declaration).
Private Sub RemoveAllMatchingListBoxRecords(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick, ListBox2.DoubleClick, ListBox3.DoubleClick
'Add code here to delete the appropriate record from each listbox in whatever means you need.
End Sub
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
hi to all,
Another problem here
I want to re size the sockwave object(a flash image) dynamically the same size as the form size.(since size of the form may differ with different resolution monitor). But its not happening. I tried with acnhor property too.
Can anyone give me the exact syntax how to do it?
thanks in advance
I am a beginner
|
|
|
|
|
Hi to All,
Here is one more problem I am facing. While creating the Set Up and deployment project. Every time I try to change the property of set up project as released, but it changes to debug every time. And as a result it always makes the setup into debug folder. please tell me, Why so? or is it normal?
Also it creates 2/3 files . setUP, windows installer package . what are these exactly? which one has to be shipped to the client?
Thanks in advance
I am a beginner
|
|
|
|
|
Debug and Release are only a setting in your designer. Normally you develop your application in Debug mode, so you can test it. Then when you are ready you change the mode to release, and (re)build the solution (not just the project).
The build process will create an Setup.ini, Setup.exe and YourAppName.msi These three files need to be shipped to the client. Also, if you have referenced any third party drivers, you may have to include those as well. Best is to install your app on a test PC and start it. That will tell you if you have all the necessary files.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi People, I am Writing a Windows application on a 1028 * 800 Screen Resolution Computer....I want to install it on a 800* 600 Computer but the Controls and the Forms look awful, I have tried using the Anchor and Dock properties with no avail...is there any Code that i can use and like call it on every Form based on the Screen Resolution given?
|
|
|
|
|
You should have designed and layed out the application for the minimum resolution you were willing to support. There is no one piece of code that can fix this for you. You have to go back and relayout your controls with the proper and appropriate use of FlowLayout and TableLayout controls, Anchoring, Docking, and other miscellaneous container controls, such as the Panel.
It's a bit tricky to do and takes a lot of trial-and-error to figure out how everything works with your setup, but in the end, it makes your form scale to larger resolutions pretty much automatically.
|
|
|
|
|
hi to all,
could anyone please tell me which is the correct merge module to deploy the crystal report in vb.net2005
is it x86,x64 or IA64
I don't understand the what are these..
Also please tell me,can we deploy a project(include crystal report) without merge module? Because, it is running in my system, so may be i have to add some reference to my project. Thats how I thought.
Please suggest
I install the merge module x86, and i am getting the following error while installing the setup
Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
Thanks in advance
<div class="ForumMod">modified on Tuesday, March 10, 2009 6:59 AM</div>
|
|
|
|
|
hi to All,
Here is a problem i am facing to create a setup for my project.When i try to install the setup file i am getting the a message box stating setup installer is interrupted, re-install the setup file
|
|
|
|
|
|
Hi Experts!!!
I m building my own user control. Know I m doing a property list.
My problem is Grouping similar property in the Group just like sub menu Ex:- Font Property.
This is example for creating single property. like this I m creating other properties.
<Category("CP Main")> _
<Description("Get or Set the Size of the DropDown Panel")> _
<MergableProperty(True)> _
Public Property CP_value() As Double
Get
CP_value = Label12.Text
End Get
Set(ByVal txtValue As Double)
Label12.Text = txtValue
End Set
End Property
Thanks in advance...
|
|
|
|
|
The Font class exposes those "grouped" fields as public properties of the Font class. These properties can be base types, like Integer, String, UInt64, ... or they can be other classes, exposing other public fields themselves. There is probably also going to be custom UITypeEditor classes for a few of those properties too.
|
|
|
|
|
hello every one
i want to generate one of the field of database as auto increment in my project for that i wrote code as:- 'database is in Sqlserver 2005'
Dim newid As Integer=Val(obj.getvalsfrmtbl("select max regi_code from regi_mast")) +1
Me.txt4.Text = newid
Me.txt4.Enabled = False
where obj.getvalsfrmtbl is a function in class for getting one by one values from database... like
Public Function getvalsfrmtbl(ByVal str) As String
Try
Dim res As String = ""
If cn.State = ConnectionState.Open Then
cn.Close()
End If
cn.Open()
Dim cmd As New SqlCommand
Dim dr As SqlDataReader
dr = cmd.ExecuteReader
If dr.HasRows = True Then
dr.Read()
res = dr.Item(0)
Else
res = ""
End If
dr.Close()
cn.Close()
Return res
Catch ex As Exception
Return 0
Finally
cn.Close()
End Try
End Function
to this i got solution like
Public Function getvalsfrmtbl() As Integer
Try
Dim res As Integer
If cn.State = ConnectionState.Open Then
cn.Close()
End If
cn.Open()
Dim cmd As New SqlCommand("select max(regi_code) from regi_mast", cn)
cmd.CommandType = CommandType.Text
Dim dr As SqlDataReader
Dim dr As SqlDataReader
dr = cmd.ExecuteReader()
If dr.HasRows = True Then
dr.Read()
res = CInt(dr.Item(0))
Else
res = 0
End If
dr.Close()
cn.Close()
Return res
Catch ex As Exception
Return 0
Finally
cn.Close()
End Try
End Function
Dim newid As Integer = Val(obj.getvalsfrmtbl()) + 1
Me.txt4.Text = newid
Me.txt4.Enabled = False
but this is not true for database having more then one table ..
so what shall i do
please help.....
|
|
|
|
|
Hi,
I trust the notion of "auto-increment" appears in each and every SQL manual.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
This is the same question you asked 6 hours ago. Don't spam the boards with the same question.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi all,
I am doing a School Management project in VB.Net and backend as MySql.. In that we have to use a calendar to show the list of holidays, absent students list, add an events etc.,.( it should be like Google calendar)
I am trying with Month Calendar, Is there any option to Increase the size of the calendar and the cells of the calendar?
Please help me...
Thanks
VVV
VB.Net
|
|
|
|
|
AFAIK, no. You'll have to make your own custom control. It isn't that difficult; you could probably get away with using a Panel. Get the month, use that to get the number of days. Iterate from 1 to number of days, dynamically create a control and add it at the previous control's position, plus a little for padding and the size of the previous control
|
|
|
|
|
Hi,
thanks for the reply..
But i didnt get u.. can u please give me a detailed information on this.. y bcoz i am new to .Net..
Thanks in advance
Victoria
VB.Net
|
|
|
|
|
Try not to use text speak, bcoz should be because and y is why.
|
|
|
|
|
Thanks for your suggestions.
VB.Net
|
|
|
|
|
Okay, I'll break this down for you:
Create a custom control, and add a label. Put the month name in it
Get the number of days
For every day, create a label with the text being that day number. Add it to the custom control
Those controls you added can be wired up to a common event handler. Cast sender to a Label
|
|
|
|
|
Hi,
Thank You.. I Will try it out.. If i got any doubt or strucked somewhere i will put the message..
Victoria
VB.Net
|
|
|
|
|
Hi,
You told that, for every day create a label and add those labels to custom control right. Then where can i create those labels.. Is that in normal windows form? I am trying to create those labels in the custom control itself.. But that custom control form is not visible in the Solution Explorer Properties, to directly run that particular form only.
Thanks,
Victoria
VB.Net
|
|
|
|
|
Hi,
I am in framework 1.1 of vb.net. If I click a row, which is in the data grid, I want to change the entire row back ground color. How I can do?. tnx in adv.
Balasubramanian K.
|
|
|
|