|
Any help with where and how I should start?
I guess I have to parse each incoming file. What would be the best approach to use?
Thank you,
Alex.
|
|
|
|
|
alexfromto wrote: Any help with where and how I should start?
You could try to have the documents in a standard format if at all possible...
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
Thanks for your response, Dave Kreskowiak, although it looks like someone has erased it on the board.
What your note says makes sense but how do I get a copy of the global variables into the Child form if I don't get this from the global variables themselves?
Interestingly, the TitleBar gets the correct info each time using
Me.Text = MAIN.wsName
which refers to the Public variable held in the top of the MAIN Form.
Can you guide me further, please?
|
|
|
|
|
NigeLost wrote: although it looks like someone has erased it on the board
It didn't get erased. You're seeing the effects of a childish egomaniac who has nothing better to than to screw with websites and insult people.
NigeLost wrote: What your note says makes sense but how do I get a copy of the global variables into the Child form if I don't get this from the global variables themselves?
Interestingly, the TitleBar gets the correct info each time using
Me.Text = MAIN.wsName
which refers to the Public variable held in the top of the MAIN Form.
You're using global variables when you shouldn't be. The title bar sticks because each child form is using it's own copy of the text. You're not associating the Me.Text to the variable MAIN.wsName . It's getting a copy of the contents of that variable every time that code is run.
The solution is simple. In each of your child forms, expose properties that you can set so each child maintains it's own copy of the data it needs to redraw itself.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello Dave,
Thanks for the prompt response.
You say:
The solution is simple. In each of your child forms, expose properties that you can set so each child maintains it's own copy of the data it needs to redraw itself.
But you are talking to a beginner and I cannot understand what you mean!
I tried copying the MAIN.wsScore etc (global) variables into "locally DIMmed" vars, no go. Instead, I tried converting them to "Me.Text" strings & then converting those to the "locally DIMmed variables. Still no luck.
Would you be kind enough to elaborate so a person who is only two months old can follow? Sorry to be difficult, but it will be appreciated.
Thanks
|
|
|
|
|
OK. This is real basic Class stuff. I suggest picking up a beginners book on VB.NET before you tackle another project like this. But, the easiest way to expose a field is to declare it Public. But, mind you, this isn't the best way to do this:
Public Class MyForm2
Public HeaderText As String
Public Data() As Integer
.
. Your remaining form code...
.
End Class
Now, you just have to set the values from your main form:
Dim newChildForm As New MyForm2
newChildForm.HeaderText = "Some text..."
newChildForm.Data = SomeArray()
.
. Finish creating your child form as normal...
.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks, Dave.
I do have books, but find it difficult to get my head around the heaps of jargon and find them dry & tough going. As a result, I find it easier to operate on the basis of learning what I need to know for what I am doing - that makes me study & delve like mad!
I have used the "Build A Program Now!" - excellent for straightening me out on databases and have VB for Dummies (describes me perfectly!) and Murach. Both have been helpful.
Again, thanks for the pointer. Your patience is greatly appreciated.
|
|
|
|
|
I want to create a Banking Management System, and i have created all the forms in vb.net 2003. The database is created using Microsoft Access 2003. I have stored the username and password of the customers in the table named customer details. This means that each time a user wants to login to this system, they have to enter their username and password and click the login button. Whatever they've entered will be checked with the database. If the information they have entered is correct, then they will be able to login. Else they would not be able to do so, and an error message will pop up.
I want to know how should the code be written to be able to do as what i have explained above.
|
|
|
|
|
hope this little code will help you. here i am assuming that in 'customerdetails' table there are fields called 'uname' and 'pwd'. you call this function from you code and check for its return value, if it's true then the login is valid, or otherwise its invalid.
for the ConStr property contain connectionstring that will be used to connect to the database, you can use something like this : 'provider=microsoft.jet.oledb.4.0;data source=d:\database\BankingMS.mdb' where you can replace 'd:\database\BankingMS.mdb' with you actual database location.
'before placing this code, make sure you have imported system.data.oledb
public function IsLoginValid(byval ConStr as string, byval UName as string, byval Password as string) as boolean
dim c as new oledbconnection(ConStr)
dim cmd as oledbcommand=c.createcommand
dim da as new oledbdataadapter(cmd)
dim dr as oledbdatareader
with cmd
.commandtext="select pwd from customerdetails where uname='" & _
uname.trim & "'"
try
dr=.executereader
catch x as exception
messagebox.show("Cant connect to database.")
finally
c.close
end try
end with
if dr.hasrows then
dr.read
if cstr(dr("pwd")).trim=password.trim then
return true
else
return false
end if
else
return false
end if
end function
|
|
|
|
|
I used dataset and sqldataAdapter to retreive data from the sql database ,
I want to make few column of the database which are shown in the datagrid to be read only .
how can i do this ?
And which event should i use in order to validate the datagrid's entered data for each cell, and how it can be done?
Rajwant Mishra
|
|
|
|
|
I want to make few column of the database which are shown in the datagrid to be read only .
how can i do this ?
--->Use this : grid.Columns(2).ReadOnly = True
--->U want to specify the column number here.
And which event should i use in order to validate the datagrid's entered data for each cell, and how it can be done?
--->Use CellValidating event in the datagrid property.
Janani
|
|
|
|
|
i am using vb.net 2003 it is not there with this vb.net
I can use this event with datatable.column(index).readonly=true
but i am not able bind the datatable directly as i am fetching data from two table and giving the datagrid direcly using the dataset, by using datatable first i have to set it`s datasource to the result obtained by the query , and then i have to set the source of datagrid to datatable but i am not able do this with my app. it does not give any error but result in grid is empty....help lsss here...
again that cell changing event is also not here ,i want to validate each entry before filling it into the database so which is the right way to do this ? is there is any way in which i can achive my goal?
Rajwant Mishra
|
|
|
|
|
Hi,
I am working on what is, I suppose, a fairly ambitious project for a newbie!
As you can guess, I have hit a snag and would like some easy-to-follow assistance, please.
My program is for input of some information, storing this in a database, then using the information to build 4-point graphs in child windows when selected from a ListBox. The Row ID is gained from the ListBox Item selection, enabling identification & retrieval of the relevant data to build the graph and other data into a "template" child Window, which is then displayed.
All works great until....
A number of graphs need to be selected for display as comparisons. Clicking several items in the ListBox opens several Child Windows. They each open correctly BUT, from Graph 2 onwards, as each is opened, the previous graphs automatically change to the current item's data. As a result I end up with all graphs & info being exactly the same.
How can I ensure that, after creation, a Child Form accepts no further input, is immobilised, becomes inert, freezes its content,or whatever?
I have not found anything that helps me through this dilemma. Can you help me find the solution?
Many thanks.
|
|
|
|
|
You haven't come acrossed any information about this problem because it's a desgin flaw in your application. There is nothing that will stop a form from accepting input, at least in the form that your thinking about.
Basically, you have to change your child forms so that they are not dependant on data from outside of that form. Each child form should be operating on a COPY of the data it is graphing, not depending on an outside pointer to tell it what data to get. This is because that pointer can change, as is evident from your other forms showing the exact same graphs.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
How to close window on buttonclick.i used self.close();
but not working in firefox i need in firefox.
Thanks,vin1070
|
|
|
|
|
vin1070 wrote: but not working in firefox i need in firefox.
Does FireFox have a built in VB.NET interpreter?!
|
|
|
|
|
vin1070 wrote: Urgent
Noone cares. If it was that urgent, you'd be Googling it 'till your fingers bled.
And what does this have to do with VB.NET?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: If it was that urgent, you'd be Googling it 'till your fingers bled
Dave Kreskowiak wrote: what does this have to do with VB.NET?
Got me on that one
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
I am creating a remoting application which should be avaliable from IIS to different clients.
Now the problem is that when i choose HTTP channel then i have to stop IIS as remoting permits only one process to access port 80
Second when i tried using TCP channel it gave me socket exception while trying to access object from internet
How can i make sure that my objects are avaliable remotely over HTTP or TCP without stopping IIS.
|
|
|
|
|
The only solution you have is a Web Service. It runs as a website on HTTP, port 80, or whatever other port you want.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
You might be right but then on CodeProject and Microsoft I have seen that a dll is transferring data through remoting over using HTTP over IIS.
I am trying the same but not been able to sucessfully implement it.
Also there are pilot project going on which are using remoting to transfer data.
one such project is CABANA
http://www.ideablade.com/cabana/cabana.html?=msp&p[^]
|
|
|
|
|
Considering you can't have two different processes (IIS and a remote object) listening on the same port... good luck! A Web Service is a form of remoting, over HTTP.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i want to drag and drop a user control to a program out of my application.
how?
|
|
|
|
|
That's not really going to work. You may be able to inject the control itself onto a form, but it's not going to be stable, or integrated to the form.
Why would you want to do this ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
ive got some objects on my form that they have some data in their classes.
i just want to view this data in another application like excell using drag and drop method.
|
|
|
|