|
Master Mind`z wrote: I used configuration file. But I m scared that if by mistake any user makes any changes in that file then my application will not run. Isn't it riskey??
Is this way followed by professionals?
If you are developing a commercial software product, it should have a EULA[^] defined which details the liability limitations for your company if faults occur. Typically, this would state that the end user would be held liable for any problems that arise as a result of improper use of the software. This is something that your management should have put in place, so check with your boss. If you want to store sensitive information in the configuration file you could consider encrypting it, but this causes other problems i.e. where to store the encryption key.
Master Mind`z wrote: what is the advantage of ODBC then?
The advantage of ODBC is its ubiquity. You can use a standard syntax to connect to a wide variety of data sources. This comes at the expense of performance. The generic nature of ODBC means it cannot be optimized for particular providers. This is why you should use the .NET SQL Server provider over ODBC when connecting to a SQL Server database.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thank you so much for the help.
I was using SQl class only but because of this doubt i wanted to switch to ODBC.
Thanks once again!!
|
|
|
|
|
Can anyone please assist me with tutorials or links to sites that can assist me to learn VB.Net faster. I have been using VB 6.0 all along and, thanks to this forum, I understand it's now a dead language.
|
|
|
|
|
hi
i Suggest you buy a Book "Introduction to Vb.net", www.murach.com. Articles or Tutorials covers only certain parts of Vb.net, but if you have a book, it will take you to all the changes you need to know in order to upgrade your Skills. ok, i have a site where you can download a e-book for free , still you must buy a book
http://www.ebooknetworking.com
hope it helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
|
Hai,
I had done one Address Management program in Vb.Net 2005 and Ms-access 2000.
The database consists of only one table with 5000 records in fifteen fields.
I had given one search option to retrive the required data from database.
I didn't use any algorithm in the program.
Simply i had used select query for finding the record.
So that i causes time delay to retrive the record from the database.
I think if i use any Search alogrithm in my program,it will reduce the time delay.
If my idea is correct,please suggest me which alogorithm i can use and how can i implement it my program.
Regards,
G.Manivannan M.Sc.,[IT],
Software Programmer (VBA),
AKUVA Infotech, Bangalore.
|
|
|
|
|
Hi,
Your Idea is right, searching alorithms certainly reduces searching time.
If your data is sorted then you may try to implement the Binary Searh technique.
For more information regarding binary search technique, you may visit the followin link:
http://en.wikipedia.org/wiki/Binary_search[^]
I hope this helps.
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
|
How do I automatic move the X & Y to create a ellipse function as
below, DrawCircle?
Or there any sample source code out there?
I want it move down by user input. How can I achieve this? Thanks.
Imports System<br />
Imports System.Drawing<br />
<br />
Public Class circle<br />
<br />
Private Sub circle_Load(ByVal sender As System.Object, ByVal e As<br />
System.EventArgs) Handles MyBase.Load<br />
<br />
End Sub<br />
<br />
Private Sub mainTab_Paint(ByVal sender As Object, ByVal e As<br />
System.Windows.Forms.PaintEventArgs) Handles Me.Paint<br />
Dim myPen As New<br />
System.Drawing.Pen(System.Drawing.Color.Black)<br />
myPen.DashStyle = Drawing.Drawing2D.DashStyle.Solid<br />
<br />
Dim widthPen As Integer = 10<br />
myPen.Width = widthPen<br />
<br />
Dim x1 As Integer = 10<br />
Dim y1 As Integer = 20<br />
Dim y2 As Integer = 70<br />
e.Graphics.DrawLine(myPen, x1, y1, x1, y2)<br />
<br />
x1 = x1 + 25 + widthPen<br />
e.Graphics.DrawLine(myPen, x1, y1, x1, y2)<br />
<br />
myPen.Dispose()<br />
End Sub<br />
<br />
Private Sub DrawCircle(ByVal sender As Object, ByVal e As<br />
System.Windows.Forms.PaintEventArgs) Handles Me.Paint<br />
<br />
' Create pen.:rolleyes:<br />
Dim redBrush As New SolidBrush(Color.Red)<br />
<br />
' Create location and size of ellipse.<br />
Dim x As Integer = 75<br />
Dim y As Integer = 25<br />
Dim width As Integer = 75<br />
Dim height As Integer = 50<br />
<br />
' Draw ellipse to screen.<br />
e.Graphics.FillEllipse(redBrush, x, y, width, height)<br />
<br />
End Sub<br />
<br />
End Class<br />
|
|
|
|
|
Well, first, you have to two methods handling the Paint event. I'm not sure what that will do for you other than confuse people who look at the code.
Second, you have no facility in your code to change the coordinates of the circle. You hard code them into the drawing code (x, y, width, height). You have to store the coordinates outside the painting code, add code to change those coordinates and invalidate the form to force a paint event.
|
|
|
|
|
I posted this question the otehr day and Dave Kreskowia has given me some great help, but I'm afriad I need more. It is hard me to read as I have a eye sight problem.
I've added Microsoft Shell Controls and Automation, then Imported shell32 namespace.
I wrote a test code to view the application windows that are currently running as follows:
Dim shlApplications As Shell
Dim obj As Object
shlApplications = New Shell
For Each obj In shlApplications.Windows
MsgBox(obj.GetHashCode.ToString)
Next
The only problem is that it is not returning the name of the application(s) that are running.
Can you help please?
Thanks
Graeme Guildford
I am always greteful for any help!
I am always greteful for any help!
|
|
|
|
|
Hi,
I am not familiar with the Microsoft Shell Control and Automation but...
why do you display obj.GetHashCode? I expect that to be a silly number, not a Windows title.
Isn't there a more appropriate property such as obj.Text or obj.Title?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Sorry Luc
it was meant to be obj.ToString which is the only appropriate property to use.
I am always greteful for any help!
|
|
|
|
|
OK.
Maybe you want to have a look at the System.Diagnostics.Process class.
It has a static GetProcesses() which returns all the running processes.
For each of them, you can inspect:
- the MainWindowTitle property;
- the StartInfo property, which holds many things, such as FileName, Arguments (=cmd line),...
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Thanks Luc
I have written a small utility using the System.Diagnostic.Process class. The only problem is that Windows Exploerer is only listed as exporer.exe in the processes list and hwen I have Windows Explorer open and pointing to a folder/directory for eg H:\ it still only displays exploere.exe even though there might be a number of instances of Windows Exploere opened.
Dave Kreskowia suggested that I use the Shell.Application COM object by adding the Shell32.dll (Microsoft Shell Controls and Automation) refrence to my project. This is where I need help, as I've added this reference and imported the namespace, but have problems with finding the correct information.
Thanks
Graeme
I am always greteful for any help!
|
|
|
|
|
This will only return the Explorer windows, not ALL windows. It returns only the windows that belong to the Explorer process.
So, you have to enumerate BOTH the Processes AND the Shell Windows to get what you've described.
|
|
|
|
|
Is there any easy way to convert accented characters to ASCII, such that "déjà" would become "deja"? Converting the string to an ASCII byte sequence and then back to a string via
dim st_bytes as byte()
st_bytes = System.Text.Encoding.ASCII.GetBytes(st)
st = System.Text.Encoding.ASCII.GetString(st_bytes)
yields "d?j?". I could probably build a mapping table using culture-sensitive comparisons (if character+"b" sorts between that "ea" and "ec", that character must be some sort of "e") but that seems rather hokey.
|
|
|
|
|
supercat9 wrote: Is there any easy way to convert accented characters to ASCII, such that "déjà" would become "deja"?
Nope, not that I've seen.
supercat9 wrote: I could probably build a mapping table using culture-sensitive comparisons (if character+"b" sorts between that "ea" and "ec", that character must be some sort of "e") but that seems rather hokey.
Hokey, but about the only thing you've got that will do this.
Trying to convert using codepages will replace the accented characters with question marks.
|
|
|
|
|
Dave Kreskowiak wrote: Hokey, but about the only thing you've got that will do this.
Well, I tried writing some code to do the conversion. Not terribly elegant, but if I allocate 64K for an array of pre-translated characters the slowdown should be minimal.
I append an "8" to the character to be translated an check to see whether that puts it between "A" and "Z9". If so, I check that against "B", "C", etc. until I either find a character that's greater or have passed "Z".
In this particular application I didn't need upper and lower case, but that could probably be handled by comparing a character with its forced-to-uppercase version. If they match, the character is uppercase; otherwise it's lowercase.
One interesting quirk I discovered: "-B" (a hyphen followed by the letter B) sorts between "A" and "C". That's why I append a digit to the string. Depending upon localized sort rules, "-8" may be before "A" or after "Z9", but it shouldn't be between them.
|
|
|
|
|
C# code next...
string accentedStr;
byte[] tempBytes;
tempBytes = System.Text.Encoding.GetEncoding("ISO-8859-8").GetBytes(accentedStr);
string asciiStr = System.Text.Encoding.UTF8.GetString(tempBytes);
...quick & short!
|
|
|
|
|
Interesting that translates accented letters as letters rather than question marks. Useful to know. Is there any handy list of variations one could use (e.g. is there a version which would translate "þ"; as "th" or "ß" as "ss" (those characters still translate as question marks).
Also, out of curiosity, is there any function which would translate a Unicode string into a pure-ASCII string that would retain Unicode's linguistic sort order, though not necessarily appearance (e.g. so that "ßb" would sort between "ssa" and "ssc", and "β" would sort between "α" and "γ"?)
|
|
|
|
|
Alrighty well the story is im working on a database and using VBA with a WebBrowser control. So what i wanna do is be able to go to. www.amazon.ca and search there database with a segment of code for a specific item.. like lets say that im searching for the game "need for speed" i want to be able to click on it so that it switches to the page with the webbrowser control and searches on amazon.ca for it.. i dont want to link all the games since there are many games and would take a long time.. But also the fact that there are going to be many new stuff added to the database and it would be much easier for it not to have to have each item hyperlinked to the pages.. and im also using 3 different sites to search. one is amazon.ca the other is Futureshop.ca and bestbuy.ca i hope that you guys are able to help me out fairly soon.
|
|
|
|
|
Only thing I can think of is if they offer an SDK that allows you to do this. I don't know if they do.
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
I have a problem!!I can't get or edit data in MySQL using VB.NET. I have to used many ways to do it,for example: CoreLib.NET(MyDirect and UniDirect) and ODBC connection, but there are no results!!
What should I do to load(to ListView) or edit data in MySQL???
|
|
|
|
|
What is the code you are using to get the data?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|