|
For what? I have no idea what you want it to do!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
ok end this topic , i will solve it
|
|
|
|
|
I work by VB.6 and I want to make a project that project should know the DIR of The windos and The DIR of the System32 file outomaticaly . How can I do that? Is there a code I can Use it to get the windows DIR and the system32 file DIR or not?????????????
Thank You For Help
soly
|
|
|
|
|
You're looking for the FileSystemObject[^] and it's Files collection.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I would like to retrieve records from a dataset and read the values as when performing an SQL statement on a database.
Datatable is created programmtically with the following columns:
...
With dtPlateauPositions
.Columns.Add("xPosition", System.Type.GetType("System.Int32"))
.Columns.Add("yPosition", System.Type.GetType("System.Int32"))
.Columns.Add("occupied", System.Type.GetType("System.Boolean"))
End With
...
I have tried filtering using the .select method of the datatable, however, it is not returning a subset (problem 1).
Public Function isOccupied(ByVal x As Integer, ByVal y As Integer) As Boolean
Dim rowToSearch As DataRow
Dim strExpr As String
Dim strSort As String
strExpr = "xPosition =" & x
strSort = ""
' Use the Select method to find all rows matching the filter.
Dim foundRows As DataRow() = dtPlateauPositions.Select(strExpr, strSort, DataViewRowState.Added)
foundRows = dtPlateauPositions.Select()
For example I want to retrieve (in SQL) Select occupied from dtPlateauPositions where xPosition = myX and yPosition = myY. Hence, how do I filter expressions with criteria on multiple columns?
Jon
-- modified at 14:23 Saturday 30th September, 2006
|
|
|
|
|
<br />
datatable.Select("xPosition="& myX & " and yPosition="& myY)<br />
add as many columns....
|
|
|
|
|
i made an application in which i made two forms
form1 have one textbox and one button,
form2 have only one button
i want when i click on form1`s button then form2 should show and when form2`s button pressed then
form1`s textbox.text should be any number(ex. 1111)
for show form2 i wrote code in form1`s button:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim f As New Form2
f.Show()
End Sub
ITS WORKING
for changing form1`s textbox.text i wrote in form2`s button:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As New Form1
a.TextBox1.Text = "111"
End Sub
NOT WORKING
someone know what the cause of its not working?
|
|
|
|
|
xmen_xwk wrote: Dim a As New Form1
a.TextBox1.Text = "111"
I'm at a loss as to why so many people do this. a is a NEW instance of Form1. It has nothing whatsoever to do with the instance of Form1 that already exists and is visible. a has the text 111, and the other instance keeps whatever text it had.
You need to set up a delegate between Form1 and Form2, so that Form2 can call a method in Form1 and pass through the value.
Also, you need to keep your controls private or protected. I guess you've come from VB6 ? VB.NET is an object oriented language, one of the things you should aim to achive in an OO language is to hide as many details of your class to clients as possible.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
man i m new in vb.net so please tell the codes
i dont know what is delegate ??
yeah you guessed right, i used vb 6 it was so easy
|
|
|
|
|
The problem is it's too easy on vb6.
Another way to do it is form2 return some values and a flag to indicate whether the values from forms 2 is valid, to whichever form that call form2.
Form2
Has public property of ReturnValue, which set some value depending on user action (drop down selected index changed, text box etc)
Has boolean flag IsValid to indicate the ReturnValue is valid (in case user didn't select anything, yada, yada)
On Form2 OK button, set DialogResult to DialogResult.OK
Validate return value, if validate OK, set IsValid to true else false.
Close Form2.
On Form1 button event
new Form2 and Show(), and save Form2 DialogResult
check Form2 DialogResult, if it is DialogResult.OK, check IsValid, if IsValid is true, take value from ReturnValue and put in Form1.TextBox.Text.
Passing Values Between Forms
|
|
|
|
|
hi i did it , to do code
1st i made a module and coded it:
Module Module1
Public t As Integer
End Module
then i wrote code in form2`s button:
t = 22
Me.Hide()
and then i wrote code in form1`s activated:
Private Sub Form1_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
TextBox1.Text = t
End Sub
now its working
|
|
|
|
|
OK - you're still using VB6 ? This will work, but, as I said, it's really a bad way to go about things. If you're doing hobby stuff, it probably doesn't matter, but I'd be speaking to anyone on my team who wrote code like this.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
VB6 *was* easy, in the process, it encouraged really bad habits.
My core recommendation - even if you're just coding for fun, anyone who wants to program, should be able to use google. This site is great, but it's also great to be able to actually find stuff out for yourself.
http://www.google.com.au/search?hl=en&q=vb.net+delegate&meta=[^]
There's plenty of info on the web about delegates. I deliberatly try to answer and give people the keyword that will give them all the info they need, if they can be bothered to look.
If you're going to use VB.NET, you should really forget the VB syntax, just like learning C#, I had to ignore the C++ syntax. It's a new language, and you need to learn it, not try to turn it into the one you used before.
By all means, keep posting questions here. But, do try to do some research first, you'll find things move a lot quicker for you.
Good luck !!
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thanks for doing that for me
now i understand the mean of delegate but i still not understand how to use , i m tring to know about it
it will more easy to undertand if someone help me through example than read in webs
|
|
|
|
|
I don't understand - if I write up an example, it will just be another example on the web.
I suggest reading the articles, trying to follow them ( it's really pretty easy ) and asking specific questions if you get stuck. That way, you give yourself a chance to learn, and we're still here to help if you really can't manage on your own.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
man im really confused because i have two big problems and i dont know which should be solved first. if you give me codes so i will learn \ understand my self to see them
i need just codes
please
thanks
|
|
|
|
|
Seriously - any code I give you will be no better than the code in an article. If you can't understand an article, then you won't understand the code from me. So, just try.
You realistically have three options
1 - stop coding
2 - pay some one to do it for you
3 - learn how to do it.
I don't have enough info to give you code any better than what's on 100 articles, but even if I did, that would not be helping you. What you want to do is very straightforward. Read an article, think about it, and try to write your own code that follows the (straightforward) example. Then, if you get stuck, at least you tried to write some code, and that alone will help you learn, even if you need to ask here again, posting your code and explaining what you've tried.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
man i read alot of articles but they dont have code that will help me
i can understand all code if you try to give or give any address for article
i search on google but nothing found
|
|
|
|
|
|
searching words
1.text change through form2 vb.net
2.form1`s text change
3.text changing
4. how to change textbox text from form2
5...... more
and man the address you give me i read all and i cant understand because it too advance and based on database,and im new in vb.net
thanks im still trying to get this
|
|
|
|
|
thanks man now the time is come to end this topic too , now i get the articles which can help me but they open only in vs 2005 , so now im thinking to buy it.however i read the codes of articles but it will more easy when it open as program
|
|
|
|
|
You needed to search for delegates - that's what I told you to use, so that's what you needed to search for.
xmen_xwk wrote: i cant understand because it too advance and based on database,and im new in vb.net
I reiterate - buy a book, a simple book, and work through it. Forget this project for now. If you can't understand those articles, then it's beyond you at this stage, so work up to it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi there
I`m a newbie to the programming in visual basic.
I have made myself a website in visual basic, and precompiling, and the ctrl+f5 utility is all working, and I`m pretty happy with the site.
But now let`s approach the problem:
I have tried to publish the site to my server, but al I get is a list of folders and files. The same happens when I upload via ftp.
I have a sql file attached to the website, but I dunno which program to use.
I`ve tried to use phpmyadmin, but with no luck.
Can anyone help a newbie please?
PS I use Visual Studio 2005
-- modified at 11:43 Saturday 30th September, 2006
-=Why Me?=-
|
|
|
|
|
Is ASP.NET running on the site ? If not, the server won't know what to do with an aspx file, you'll get a directory list or a message to say you don't have permission for directory browsing.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Well I don`t think that ASP.NET is running by default, But is there a way I can install it?
BTW thanks for the reply
-=Why Me?=-
|
|
|
|