|
I tried this Simple Database Application - Part 1
using thread allows access to the database by several users at the same time and perform all processing updates on the database (identification, addition, modification, consultation, delete, printing ..) and memory management.
thank you once again
|
|
|
|
|
Hi everybody,
I have two form, in the first one I fill some data, then I open another form, fill some more data, and now I need to Call a function from the first form, using the data filled in the first form and pass the data from the second.
What is the best way to do that ?
C.R.E.A.M
|
|
|
|
|
Delegates are the ONLY real way to do that.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Can you give me an example or refer me to one ?
C.R.E.A.M
|
|
|
|
|
|
Hi,
I have two parameters as follows:
string scriptText = MsgBox "hello";
string MachineName = "targetMachineName"
I would like to create a file called sample.vbs which will have the scriptText in it.
This file will have to be saved in the c directory of the MachineName.
How is this done please?
Thanks
|
|
|
|
|
File.WriteAllText ?
What have you tried ? What is the target machine, is it on your network, and if not, how is it your target ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I think this is to do with the streamwriter or something similar.
Target machine is any machine on the network.
Thanks
|
|
|
|
|
File.WriteAllText with a network path, if you have access to the machine. If you don't, then you don't, no matter what.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I didn't realize it was that simple.
Many thanks
|
|
|
|
|
helo every body! (Sorry, english of my bad!)
I want make a program Dictionary, i use one table have 3 two field: words, mean and pronoun. Please tell me the way. thank you very much!
|
|
|
|
|
Well, you could read this[^].
Apart from that, if you have your table layout, the next thing you need is typing. Lots, and lots of typing.
What answer were you hoping for ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
You could maybe use a dictionary, using the word as the key and a definition class instance as value?
Something like:
public class Definition
{
public Definition(string meaning, string pronoun)
{
Meaning = meaning;
Pronoun = pronoun;
}
public string Meaning { get; private set; }
public string Pronoun { get; private set; }
}
Dictionary<string, Definition> definitions = new Dictionary<string, Definition>();
public void AddDefinition(string word, string meaning, string pronoun)
{
definitions.Add(word, new Definition(meaning, pronoun));
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
you can use .netframwork generics or extended generices called powercollection.
|
|
|
|
|
i use Visual C# t build this project.
|
|
|
|
|
I want make a program Dictionary, i use one table have 3 two field: words, mean and pronoun. Please tell me the way. thank you very much!
|
|
|
|
|
Please edit your posts instead of creating new ones.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
we know that there are at least two ways to convert a string to a number, let's say, int:
int.Parse('100')
convert.toInt32('100')
I also read from one book that Convert is at cost of some performance. why? does it mean that it is better to use .Parse() instead of using Convert?
thanks!
|
|
|
|
|
If one were "better" than the other, one of both would be obsolete
If the value you're converting is NULL then Parse [^] will throw an exception, while ToInt32 [^] sets it to the number "0".
I are troll
|
|
|
|
|
OK, I agree your comments,but I concern mainly that which one is more performance efficient, espeically when such function is
used lot of times.
|
|
|
|
|
You should really only ever use TryParse unless you're *certain* there's a number in there. Both operations are costly, they both involve parsing the string and turning it into a number.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
Convert.ToInt32 is slower because it additonally checks the null value which int32.parse does not do. Checkout the Int32 function returned by .NET Reflector:
public static int ToInt32(string value)
{
if (value == null)
{
return 0;
}
return int.Parse(value, CultureInfo.CurrentCulture);
}
Convert.ToInt32 also uses int.parse internally. So int.parse is better as far as the performance is concerned. but it may throw exceptions if string value is not specified or an empty string is specified etc. I hope it helps.
Regards
Saank
Either you love IT or leave IT...
|
|
|
|
|
Great, thanks, this is what I want!
|
|
|
|
|
Great to know that this is what you wanted.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
Hi,
I wan't to create a timer that starts at a given time! The start time will be set in a configuration file in a format HH:MM. After that the timer shall fire off with given intervals. The interval is configured in my configuration file in fomration HH:MM.
How can I do that?
/Håkan
|
|
|
|