|
If u able to know process ID u can end that process.
|
|
|
|
|
That's not what his post said he was looking for. That's kind of like killing the patient because he's got a cold.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I want to compare an image to each image in an ImageList.
I tried this:
For Each Img As Image In ImageList1.Images
If Img Is [ComparePicture] Then
...
Next
What am i doing wrong?
I also tried: If ImageList1.Images.Contains([ComparePicture]) Then
...
End If
But then i get the message: "Specified method is not supported"?
Help pls?
|
|
|
|
|
You can't compare Image objects like that. If you want to compare the actual pixels, you'll have to write some code that will take both Image objects as arguments and do the comparison yourself. You'll probably want to first make sure that the images are the same dimensions, then the same color depth and pixel format, see if they have the same options (like a transparency), then go through each pixel, one-by-one, and compare them. If every pixel is the same, and all the other tests pass, then the images are equal.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks, Dave
--Zaegra--
|
|
|
|
|
Hello,
VS 2005
I have 2 datagrids.
The 1st datagrid will contain parts that the user will select and then click a button that saids add part. This part will be added to the 2nd datagrid. Which is the best method to add these rows to the datagrid. The fields will remain the same in both datagrids. So no need to change them.
Once the required parts have been entered into the 2nd datagrid they will be saved to the database. What is the best method so save the data in the 2nd datagrid, as the user can save periodically.
Many thanks in advance,
Steve
|
|
|
|
|
ive got a problem about adding flash in my apllication the system says failed to import the active x control what can i do i added active x please help
|
|
|
|
|
hi there,
I am new to VB2005 Express, and would like to know if it is possible to change the location of a picturebox via code at runtime.
In my program i have the screen cut into quarters and would like to display an image from one of the quarters to full size. The top left works like a charm. The others only fill half the screen from where they are.
Thank you.
|
|
|
|
|
You can change the Location, or Top and Left, properties to move the entire window. You then change the Size, or Width and Height, properties to change the controls size to whatever you want. All the properties of a PictureBox control are changable at run-time.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
when changing location, be sure to specify it as New . For example:
PictureBox1.Location = New Point(x,y)
Posted by The ANZAC
|
|
|
|
|
Thanks for all your replys.
|
|
|
|
|
Hi how do i kill explorer off, so it won't come back and how do i get a list and am able to control all the windows, any help apreciated
|
|
|
|
|
Explorer doesn't manage the windows. It's a shell that supplies the Desktop, Task Bar, and a navigation tool for exploring the file systems. It can be replaced, but it is not what gives you the look and feel of the windows themselves nor does it do any management of the windows.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i want to replace explorer, but in VB.net, any examples etc?
|
|
|
|
|
Not that I know of. There are commercial replacements out there, but nothing open source that I know of.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
do you know how to get the active windows and am able to get the process that the window bellongs to?
|
|
|
|
|
|
|
Ok thank you guys. But can any one help me with this? My program would have a initial setup screen where the system admin will suply all the necessary informatoin such as the server name, pasword, username and stuff like that... all this information would be written to a text file somewhere on the hard drive. The program should then take the server name, user name and password from the text file to create the connection string to connect to the database (sql 2000)
How do i go about using the information from the text file to create my connection string so that my program can use it? I can't program the connection string in the project because i don't know the name of the server they will be using and they might need to put it on other servers..
Please help!!
Nab
Nab
|
|
|
|
|
JustmeNick wrote: How do i go about using the information from the text file to create my connection string so that my program can use it?
string.Concat() ?
|
|
|
|
|
that doesn't say much..give a an example..plz
Nab
|
|
|
|
|
JustmeNick wrote: that doesn't say much..give a an example..plz
String.Concat works like this:
String.Concat("Server=", serverName, ";Database=", databaseName)
However, I don't know enough about how you need your connection string to be made up.
Sorry, but if you want more then you'll have to give more. Be more explicit in your request.
|
|
|
|
|
I must have bypass that section in the book i was reading... I am just saying thank you for helping me out... now i can use this information to read from an xml file or a text file..so that the system admin will be able to configure their system when ready for use...
this is what i did just for testing...and it worked like a charm..thanks to you guys... if i didn't get this part..my project would be stuck..
Dim severname As String = InputBox("Enter server name...")
Dim databasename As String = InputBox("Enter database name...eg DBfhms")
connectionString = String.Concat("server= " + servername.Trim + "; packet size=4096; trusted_connection=true; database= " + databasename.Trim)
above is just a test run..if you notice i don't have any user name or password..i think it is much better if i let the system admin control that part from windows by adding the user to a group so only those persons in that group would be able to access the system's data.. what do u guys think..is that the right approach or should i supply a user name and a password for the connection string?..
...
Thanks again..guys..
Nab
|
|
|
|
|
JustmeNick wrote: i think it is much better if i let the system admin control that part from windows by adding the user to a group so only those persons in that group would be able to access the system's data.. what do u guys think..is that the right approach or should i supply a user name and a password for the connection string?..
Yes, allowing trusted connections is more secure than adding a user name and password.
Just remember that once you have your connection string to cache somewhere (in memory during the course of the application - not to disk) it and keep using the cached version. If you end up with two bits of code that create a connection string and they are in any way different (even although they evaluate to the same database with the same credentials) you won't get the benefits of connection pooling.
|
|
|
|
|
JustmeNick wrote: pasword, username and stuff like that... all this information would be written to a text file somewhere on the hard drive
I wouldn't leave the password out in plain text.
|
|
|
|