|
You are drawing all 10 subitems at the same location on the page. You need to change the X location for each item. The code could be simplified by creating a loop and using a single Font element:
Dim TnrFont as Drawing.Font = New Drawing.Font("Times New Roman", 10)
e.Graphics.DrawString("PRINT", TnrFont, Brushes.Black, 50, H)
For Each Itm As ListViewItem In ListView1.Items
e.Graphics.DrawString(Itm.Text, TnrFont, Brushes.Black, 50, H)
Dim Left as Integer = 150
For subindex as Integer = 0 To 9
e.Graphics.DrawString(Itm.SubItems(subindex).Text, TnrFont, Brushes.Black, Left, H)
Left += 100
Next
H += 20
Next
|
|
|
|
|
Pls can visual basic 2010 do face identification and recognition. if yes how can i design it, am new in visual basic...Thanks.
|
|
|
|
|
You need to research what libraries are available that provide such a feature. And to be honest, this is quite an advanced subject for someone who, as you say, is new to VB.
|
|
|
|
|
Heavy stuff for someone new to VB!
It's not a case of can VB "do face identification" but "can I write code in VB.net that calls a library that does facial identification"
This article discusses some of the models that are available Introduction to Face Identification[^] N.B. The code is in python, I'm only including the article for the links to the models and the general discussion.
This article specifically discusses the EMgu tool - again it uses C# rather than VB but the principles are all there Image Recognition with C# and Emgu Libraries[^]
Most of the tools from the links in the articles will have resources to show you how to use them e.g. Code Gallery - Emgu CV: OpenCV in .NET (C#, VB, C++ and more)[^]
|
|
|
|
|
HOW TO CODE A REFRESH BUTTON IN VB.NET FORM PLEASE GUIDE
|
|
|
|
|
Depends on what you want to refresh. No one knows what you are talking about.
|
|
|
|
|
...and STOP YELLING at people. Typing everything in all caps is the equivalent to screaming at people on the internet.
|
|
|
|
|
in the onclick event of the button you write the code to refresh the magic thing you need refreshing.
I hope like hell you are not the accounting firm in London asking such a badly formed question.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Maybe it's the manager who decided to fire their only programmer because he read on a magazine that VB.NET is so easy anyone can write code in it?
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Mycroft Holmes wrote: I hope like hell you are not the accounting firm in London asking such a badly formed question. Wait for your coming colonscopy, and see the device running W98. Imagine a dependency on vbrun300.dll.
Have fun
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Hello;
I have image on PictureBox, Cinverted to Base64String string and saved in Database as following:
Dim ms As MemoryStream = New MemoryStream
Dim bmp As Bitmap = New Bitmap(PictureBox1.Image)
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.jpg)
Dim My_Photo_Str As String = Convert.ToBase64String(ms.ToArray)
myqry = "update MYTABLE set COLUMN1=" & "'" & My_Photo_Str & "'" & "where COLUMN2=" & 50
mycmd = New OleDbCommand(myqry, conn)
mycmd.CommandTimeout = 0
mydr = mycmd.ExecuteReader
Now that image need to retrieve it or shows on PictureBox, So I used the following:-
myqry = "select * from MYTABLE where COLUMN2=" & 50
mycmd = New OleDbCommand(myqry, conn)
mycmd.CommandTimeout = 0
mydr = mycmd.ExecuteReader
mydr.Read()
Dim PIC As Byte()
PIC = mydr("COLUMN1")
Dim My_Photo = New MemoryStream(PIC)
PictureBox1.Image = Bitmap.FromStream(My_Photo) <<<<<-----HERE GOT ERROR
the error on last line while try to set image to PictureBox, and error said that cannot convert Byte() to image, If any help will so appreciated
thanks
|
|
|
|
|
|
Why are you converting the image to a Base64 string? You don't have to do that to save it it in the database.
Databases support blobs (Binary Large Objects) natively, so conversion to Base64 is not necessary.
You can't directly use the Base64 string to create a Bitmap object from it. You have to convert the Base64 string back into an array of bytes, then create the Bitmap from that array.
|
|
|
|
|
|
ffmpeg.exe will not save file names with a number since the first "output.avi" and exists but a new one that has "output(1).avi" will not be accepted. What can I do here.
|
|
|
|
|
I figured out how to do it :-) :-D
|
|
|
|
|
Hello,
I am making a VB.NET forms application and need to connect with SQL Server over the internet using the following connection string:
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
From what I could glean from the internet, apparently this kind of connection string is vulnerable to being hacked. Thus what should I do to encrypt this string and also enable decryption only at the remote server.
Whenever I search the internet, I only come across ways to encrypt web.config and app.config. This apparent security flaw does not seem to be covered anywhere.
Thanks in advance,
Khalid.
|
|
|
|
|
An SQL server should never be directly exposed to the internet. You normally expose the database functionality through a securable web service and your application talks to the web service to handle all the database work.
|
|
|
|
|
Dave Kreskowiak wrote: n SQL server should never be directly exposed to the internet. You normally expose the database functionality through a securable web service and your application talks to the web service to handle all the database work.
Ok, can you point me to a webpage or post regarding how to go about this?
I am sorry if my questions appear rather naive but this is the first time I am going about this whole thing.
Khalid.
|
|
|
|
|
Any tutorials on "VB.NET create web api". Then you need the client side, so "VB.NET consume web api".
|
|
|
|
|
Dave Kreskowiak wrote: An SQL server should never be directly exposed to the internet Sort of. SQL Azure is accessible over the internet.
|
|
|
|
|
True, but your normal SQL Server doesn't have the defenses in front of it like an Azure SQL instance does.
|
|
|
|
|
Member 15377440 wrote: this kind of connection string is vulnerable to being hacked Not sure what you are asking.
1. Is the string able to be hacked? No, because it sits in app.config and hopefully you have that on a secure server.
2. Can the SQL server be hacked? Yes, anything can be hacked. But, you can certainly secure it. Sql Azure is accessible via IP address.
Is your sql server not in the same place as where your forms application will be running?
|
|
|
|
|
Member 15329613 wrote: 1. Is the string able to be hacked? No, because it sits in app.config and hopefully you have that on a secure server.
If I am understanding this correctly, my app.config file will be on my development/deployment machine. Should not be an issue as long as I am accessing my SQL Server database on the same machine.
My fear is that if I want to keep my SQL Server database in the cloud and try to connect with it through a connection string, that string could be easily be read by a third party over the internet.
Thus, how do I ensure that my connection string containing the database credentials cannot be hacked while being sent over the internet.
If I encrypt the app.config file on my local machine, is that enough to secure this issue. How will the jumbled connection string be de-crypted at the remote server?
Member 15329613 wrote: Is your sql server not in the same place as where your forms application will be running?
Presently it is on the same machine, but as I said above, my plan is to keep in the cloud eventually.
BTW, thank you for addressing my query, else in most cases, people simply write some cryptic answers which lead nowhere!
|
|
|
|
|
Member 15377440 wrote: If I encrypt the app.config file on my local machine, is that enough to secure this issue.
NO! Not even close. Think about it. If your code can decrypt the connection string, so can someone else.
|
|
|
|