|
seriously you want to avoid access if you can use SQL server instead. access has quirks galore.
hey...slang is the vernacular for the vernacular...wow
|
|
|
|
|
hello guys anyone can help me on how to populate MSHFlexgrid in VB.net!!!!! im still searching for any codes in the net.....hope anyone can give a sample code.
thank you!!!
|
|
|
|
|
Throw it in the bin and use a datagrid
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have developed a text editing software and I was wondering how to accomplish the following.
I have set all .rtf files to open with my program by default in Windows
I would like to know how to read the data from the .rtf file while my program opens
Thanks,
Taen Karth
|
|
|
|
|
|
I don't think I quite explained it well enough. I am using a RichtextBox control and VB.NET 2005.
I can read a .rtf fle into the richtextbox control using one simple command (.loadfile).
There has to be a more straight forward way to accomplish this.
Thanks,
Taen Karth
|
|
|
|
|
There's a single command which loads the RTF and you want something more simple ? I don't understand ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Obviously...
When the programs opens it needs to load the file that called it as the default app to open in...
My questions is how do you capture the file that opened it.
When windows sets a program as default editor for a file type...when that file type is clicked and it opens the program how does the program know what called it?
Thanks,
Taen Karth
|
|
|
|
|
I'm not sure it does. Or do you mean how does it know what file was being passed to it ? I'd say the filename is passed as a parameter.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yeah that is exactly what I mean. How does it discern the parameter and file that was passed to it and how do you code using it. I assume that the parameter it passes is the file system path to the file...which would enable me to use the .loadfile element of the richtextbox control to load the data.
Just not sure how to capture the parameter...
Thanks,
Taen Karth
|
|
|
|
|
Ah, OK. I still can't get that from the wording of the original question
Your program entry point is a static void main method. That method is passed an array of arguments. You can check that array, the first argument passed in there is going to be the file path, so you can capture it there, and use it accordingly.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hehe...sorry for the confusion but I, for the life of me, could not understand the logic of what was supposed to be happening. Now I understand it in theory and I am still too green to understand completely what you are telling me above.
I have no Static Void method in my project. If this is just an invisible method? that is assumed, how do I capture it?
Thanks,
Taen Karth
|
|
|
|
|
The syntax may be different for VB.
Man, I hate VB. It seems this is another thing that VB does by 'magic', instead of via code.
http://www.devx.com/vb2themax/Tip/18748[^]
It looks like you have to add the code to make things work in a more 'normal' way, via a main method.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
AHA! That's the stuff! I remember reading that before now.
Thanks for bearing with me... and have a nice week!
Thanks,
Taen Karth
|
|
|
|
|
My pleasure - glad to help.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello everyone. i posted before abot making a sudodu game generator and was given the answer that i need an array for that.
i would really apriciate if i could get some help with coding this array since this litte program is due Week 16 and my teacher is to senile to help me...
also i need to shed some light in how to generate blanks in a randomize code with only numbers.
i am not posting my code here because it is very long... but i could send it to people who would like to help me.
Thanks in advance
~Snake~
|
|
|
|
|
|
that link would be good if it was for VB6 though, but that array creation you vill have to explain some more
|
|
|
|
|
VB6 is no longer supported, people will assume you're asking about VB.NET unless you say otherwise. VB6 is useless, I'd have to ask why your school teaches it. VB.NET 2005 Express is free, they should be using that, if you must learn VB.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ok here:
Dim i() As Integer 'create a array of ints with 0 length
For j As Integer = 0 To 1000000000
ReDim Preserve i(j) ' redefine the array in memory, keeping the existing values
i(j) = j
Next
return i
advice:
1) everything is reference in VB (except integral primatives like ints )
2) arrays are declared to have a lengthh adn don't like it when their boundries are broken
3) mixing .count and .length lead to trying to remember which is "0 based" and which is "1 based"
4) if you get an indexOutOfRange violation check your iterators
5) redim is your friend
6) collections are often a better choice
7) avoid mixing collections and arrays (collections are 1 based and always have >= 1 member)
8) use for each when ever applicable (another reason to avoid mixing arrays with collections)
this really should all be in your textbook. Look it up...
good luck
hey...slang is the vernacular for the vernacular...wow
|
|
|
|
|
thank you, i will try some of this code ASAP ^^
and yes i agree, VB6 is old but i guess its all about the license stuff >_>
|
|
|
|
|
I have the source code of a vb program. What is the best way to convert or rewrite the code into vb.net?
|
|
|
|
|
There is no easy way. There is an upgrade wizard, but it's not very good, because the languages are so totally different.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I think… open your VB6 project by using Visual Studio (Wizard ), get an idea and rewrite, by creating a new project - is the best way. .
Regards,
Chatura Dilan
If at first you don't succeed, try; try again, so that you know
what not to do the next time. The answer is out there.
|
|
|
|
|
I am trying to create a winform with a datagrid. However I would like to reload/Refresh the data every 5 minutes. I am trying to use a timer but it doesn't look like it is working. I have it firing off an event every 6000 milliseconds (6 Seconds). When I change some data in my database the data in datagrid is not changing. I searched for timer and winform but couldn't find anything that helps. Any help would be appreciated.
Thanks for all the help
NewbieDave
|
|
|
|