|
Hello,
I have a listview with a playlist, in column 0 are the names of the songs and column 1 is the parth/url of the song.
True a textbox i want to search for a song, column 0.
When i press for example ab, all songs beginning with ab must come to top of the listview, all other song under that.
Can anybody help me out with this???
Regards,
idi
|
|
|
|
|
This is another example of using a control to store application data. This is the wrong method to use.
A visual control should show you the data stored in the application in a certain manner, not be used as a repository to store data, which is what you're doing. You should be maintaining this list in a collection (lookup Dictionary or Hashtable) or array or objects, which will be very easily searchable, and filling the ListView with a copy of this data only when needed.
|
|
|
|
|
Hello Dave,
First of all thank you for the reply!
This morning i sarched like you said but i can't find an example of hashable with searching in listview, can you give me a url with sample code or project so i can analyse and learn true that? This would be very helpfull for me as this is totally new for me.
With kin dregards,
idi
|
|
|
|
|
Like I said - forget the ListView. It's not involved in a search at all.
You use a Hashtable or Dictionary, which are both key/value pair collections, to store your data. You've already found thousands of examples of using a Hashtable or Dictionary when you Googled for "vb.net hashtable".
|
|
|
|
|
I would like to know how to send messages phone the computer program to the cell phone, using vb.net
|
|
|
|
|
By using an SMS gateway, there's at least one article on this site, but people who try to use it, quickly find they need to find a local SMS provider.
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 )
|
|
|
|
|
Hello every one,
I have a VB 2005 application in which i let the user to store an image in DB.
The users upload really huge images, which are of no good for the application as well.
Is there any method by which I can resize / reduce / shrink the image's physical size, in vb.net
Regards
Nishkarsh
|
|
|
|
|
Sure - you can call a method on the bitmap class to return a thumbnail, or you can manually resize it, by creating a new smaller bitmap and drawing the image onto it.
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 for the response
I was trying things like that on my own and saw something which i need some support on to make my understanding
- I created a sample application with one picture box, one button and one text box
- I loaded a picture(JPEG) in the picture box at design time, of size 2834 KB and dimensions 2816x2112
- On the click of button first thing i do is sane the image from the picture box to "c:\picorg.jpg" as jpg, the size of this picture got reduced to 494KB and dimensions were same as 2816x2112
- Now after that i took ".3" which was entered in the text box and reduced the picture and saved it... I got a really low size and picture dimensions also reduced..
I issue who did the size of picture reduced when i had only loaded it in picture box and the dimensions did not changed..
Regards
Nishkarsh
|
|
|
|
|
The orginal JPEG was probably saved at 90% quality. GDI+ JPEG by default saves it at 75% quality.
|
|
|
|
|
Can we control the quality of image save?
Also, which are the functions of bitmap class were you referring to, can you give some examples also...
I will explain you the whole issue..
- I want to first find the image size
- If the size id bigger then a predefined sizes then reduce the image size and then send it to DB..
Hope that you can help me out with the needful
Regards
Nishkarsh
|
|
|
|
|
You get the original image size from the dimensions of the image and the PixelFormat, but I think you are interested in the file size which you can get a variety of ways from IO. You change the encoder quality by the Quality EncoderParameter. There is no direct relation between file size and encoder quality other than lower quality results in smaller files.
|
|
|
|
|
Hi guys i am working in vb.net 2005,
i want to get some user interface like help ,i cannot develop some good interfaces or i have
nomore new ideas to develop some other interfaces .can any body help me out how to improve my
interface development skills , any link from where i could get some good interface based applicaions.
hello
|
|
|
|
|
There is a microsoft book on interface design, I guess you could buy that
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 write some values into HKEY_CLASSES_ROOT but when i try to do so i get the message that i don't have the permission. (Using Vista). So, is there any way to let my program run as Administrator, without the user right-clicking on the file and choose Run as Administrator?
Thanks in advance,
--Zaegra--
|
|
|
|
|
Nope, there's not a way to run an application as admin without having to log on with an admin account. You need to write registry values to a different part of the registry (HKEY_CURRENT_USER in stead of HKEY_LOCAL_MACHINE) or use .NET's isolated stored functionality which I'd prefer...
|
|
|
|
|
I would've done so, if only I wasn't registering a filetype, which has to be stored in HKEY_CLASSES_ROOT. So there is no way doing this, without the user right clicking on the file and run as administrator?
|
|
|
|
|
In that case, you need to register file type (i guess for file type association) during setup and not from within your application. Else you should require the correct permissions and not run the application if the user doesn't have sufficient rights..
|
|
|
|
|
Good Morning All
I have a Login(frmlogin) form and an MDI form(frmmain), i have a Function that check against the DB if the username and password exists and if they do, it will return '1', if it ruturns '1', i will know that the login is valid, and i will have to Close the login form and show the main Window. in my Application "frmlogin" is a Startup form. i have written the explain procedure like this.
Dim frmmain As New frmmain<br />
<br />
Dim strusername As String = txtusername.Text<br />
<br />
Dim strPassword As String = txtpassword.Text<br />
<br />
Dim obj As New BLL.Client<br />
<br />
Dim bl As Integer<br />
<br />
Try<br />
bl = obj.Check_Login(strusername, strPassword)<br />
<br />
If bl = 1 Then<br />
frmmain.Show()<br />
<br />
frmLogin.ActiveForm.Close()<br />
<br />
Else<br />
<br />
MessageBox.Show("Invalid Login")<br />
<br />
End If<br />
<br />
Catch ex As Exception<br />
<br />
MessageBox.Show(ex.Message)<br />
<br />
End Try
This is the code in my "frmlogin", My problem is that when the login is Valid, The frmmain window is Shown, but the login does not Disappear.
What is the Problem?
Thanks
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
|
|
|
|
|
Hi,
U can't close the statrup form so my suggestion is
Make the Mdi form as a startup form and on load event of mdi open the login form if login is authorized then ok other wise u can end the application or prompt that enter valid user name n password
The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth
|
|
|
|
|
The Problem was Solved this way
I used a Main method in a module as my startup object:
Friend Module Startup <br />
Public Sub Main()<br />
Dim loggedIn As Boolean<br />
dim login As New frmlogin<br />
loggedIn = (login.ShowDialog() = DialogResult.OK)<br />
If loggedIn Then <br />
Application.Run(New MainForm)<br />
End If <br />
End Sub <br />
End Module
my login form would look like this:
Dim strusername As String = txtusername.Text<br />
<br />
Dim strPassword As String = txtpassword.Text<br />
<br />
Dim obj As New BLL.Client<br />
<br />
Dim bl As Integer<br />
<br />
Try<br />
bl = obj.Check_Login(strusername, strPassword)<br />
<br />
If bl = 1 Then<br />
<br />
Me.DialogResult = Windows.Forms.DialogResult.OK<br />
<br />
Else<br />
<br />
MessageBox.Show("Invalid Login")<br />
<br />
End If<br />
<br />
Catch ex As Exception<br />
<br />
MessageBox.Show(ex.Message)<br />
<br />
End Try
Now the login dialogue will be dismissed if and only if the user either successfully logs in or cancels the operation. If the user does not successfully log in the app will exit without ever creating an unnecessary main form
Thanks
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
|
|
|
|
|
just try Hide instead of close and before that open the MDI. So the application will continue to be in running state or else the application may close
thanks
Mohanraj D
RAJA
|
|
|
|
|
Hi,
I wanna deploy my Vb.net application so i created SetUp for it,
but the problem is that when i install it on Client's Pc it ask for first install .Net Framework (Which is not installed in Pc)
So is there any way to create SetUp Completely(.NetFrameWork+CrystalReport+Sql Server) Without seperately installation of .Net Framwork ,Crystal Report and Sql Server
Thanks with anticipation
The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth
|
|
|
|
|
|
Thanks 4 ur reply
The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth
|
|
|
|