|
Ok I'll bite - why.
Having a single method to service the multiple textboxes seems the most efficient (assuming you do not want to reuse it outside this form)
Ah, I had to read that 5 times to get it - set the destination/next textbox. I would have thought either hard code the target or use the form tab order to identify the next control.
Oh sh;t now I remebered why I hate these things, I just envisaged a complete UI class to handle all the silly operations that can crop up shudder.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yeah, I guess it depends on if you expect to reuse it across several forms, etc. If you had three textboxes and that was it, you could just have a switch statement or use the tag on the textbox to identify the next one or something.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi
i want to ask if i have one connection to accesses database how con i writ it ons and use it in all forms do i have to write it in model and call it form lode
also i have some function and i want to use it in more than one form do i write it in model and the type is public
thanks
|
|
|
|
|
If I understand your questions correctly, here are the answers.
If you need to access a database from multiple forms, put all of the database code in a module and call the functions or subroutines from there.
The same answer applies to the functions: put them in a module.
Also, think about reusing the code in other projects. Don't hard-code connection settings, etc, pass them into the functions.
Tim
|
|
|
|
|
thanks that what i mean
but i want to ask do i have to but it in form_lode sub and it will be visible to all functions and sub in the form
|
|
|
|
|
Add a seperate module to the application and make the functions/subroutines public. They will then be visible to the entire application.
The database access does not have to be done in the form load; it can be done wherever your application needs it.
|
|
|
|
|
What you are asking about (use better title) is a data access layer and it is a basic class/library every developer requires. Try some google research
clickety[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I think the reason people marked this question as bad is because of the bad subject. asking... doesn't really tell us anything.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thanks
i will write Better title next time
|
|
|
|
|
Hi
i wrote a function in MATLAB and made a DotNet dll using deploy tool of MATLAB. I imported this dll in my DotNet application and it works but my question is: is this necessary to have MATLAB installed on the pc or not. i want to publish my application but some one told me that this needs MATLAB on the pc!
A.E.K
modified on Wednesday, April 30, 2008 8:04 AM
|
|
|
|
|
I would expect so. I know what Matlab is, vaguely, but I don't know of anyone who uses it, bar students. I would say you need to test it, to be sure.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Probably, but you're going to have to test it to be sure. Otherwise, your best source of information is going to be a forum that deals specifically with MATLAB. CP is not that place.
|
|
|
|
|
Hi This is Ali from Pakistan
can some body help me out please????
I m working on a web application that is created in simple ASP, while its some packages are created in Oracle forms using oracle developer.
Is it possible to comiple a oracle form into a java applet code that could b called through any web-server. I want oracle application server out from buisness...
Waiting for your reply
|
|
|
|
|
And the technologies are:
Oracle Forms
Oracle Developer
Oracle
ASP
Nope no VB for the VB forum.
Good luck getting an sensible answer for that question in this forum. You may do as there are a wide range of skills here.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi guys
i am working in vb.net 2005 i have a class library but i cant see my
assemblyinfo.vb in this project, why ?
thanks in advance
hello
|
|
|
|
|
Add a reference to you class library project under My Project
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You do not see it because that is one of the hidden files of the solution when viewing in the solution explorer. To fix this issue, highlight the solution in the solution explorer then in the menus goto 'Project' then 'Show All Files'. Although various files are different in different langauges this will work with C#, VB, and I believe C++. Their is also a shortcut to the 'show all files' in the toolbar at the top of the solution explorer.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hello,
I am trying to understand the basics of XML, and I have a very simple idea which doesn't seems to be so simple I used INI files before and decided it was time to try XML. But I didn't came further than
Dim xmldoc As New XML.XMLDocument
I have the following INI file which I want to store in a XML file:
[Settings]
WindowState=0
etc..
Can someone show me how to store this in a XML file?
I am using VB.NET and Visual Studio 2005.
Thanks,
--Zaegra--
|
|
|
|
|
One obvious example would be
<Settings>
<WindowState>0</WindowState>
</Settings>
I suggest you read up on what XML is, and how it works. You'll need to read up on XPath to be able to find your settings within this file, too.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I know the structure of an XML file, but I'd like to know how i can store these values in an XML file in the proper way. Could you tell me how to accomplish this? I searched CodeProject but i didn't really find what i needed
|
|
|
|
|
If I am using an XML source I use a dataset to manage the data in the app and read/write it using the dataset.readxml methods. This really is a nobrainer if all you want is to manage the data via xml. If you want to do any more then as Christian suggested you will need to devote some study time to it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: This really is a nobrainer
Well, everybody needs to start somewhere, doesn't he . But thanks for the reply, I'll try it.
--Zaegra--
|
|
|
|
|
Zaegra - I did not want to imply nobrainer was personal. Dataset to and from XML really is simple to use but it will not give you ANY insight into using XML.
And yep we ALL started somewhere, I have almost no working knowledge of XML as I rarely use it.
However I have 1 strong caveat, do NOT use XML for transporting large volumes of data, XML is so verbose your data size will may become an issue. Use CSV instead.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The 'proper' way really doesn't exist, XML is a loose format, you can structure it any way you like.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Another method of handling this is with XMLSerializer, you use it to persist classes in XML. So you could have an INI object that you fill with data and then serialize it to disk, then when you want the data back you just de-serialize it. It is pretty simple have a look on msdn for code samples.
This way you can have a class that has the property WindowState, you then set this property in an instance of the class to 0 (obj.WindowState = 0) then serialize the object (something like serializer.Serialize(obj, path))
then just reverse this to fill the class and read its properties like any other class.
Hope that's of some use.
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|