|
Means Web camera try this.
Webcam componet name:vc1
Picturebox name is: pic1
VC1.EditCopy()
Pic1.Image = Clipboard.GetImage
|
|
|
|
|
This is a pretty petty item, but I'm bored so here it is:
I created a snippet. Everything with the snippet literals/objects work fine. When I insert the snippet, a blank line is inserted and then the snippet text. Is there a way to get rid of the blank line that gets inserted everytime?
It's Friday!
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
REmove the carriage return at the head of the snippet
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: REmove the carriage return at the head of the snippet
Sorry for the long delay...
There isn't a header carriage return that I can see in the snippet (looking at the raw file). Posted the snippet code here (xml nodes were getting stripped during preview on the boards here).
Not sure what the heck I am doing wrong to get the blank line inserted before the snippet is pasted in.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
modified on Monday, November 24, 2008 8:26 AM
|
|
|
|
|
Found the problem..... the blank line is inserted based on how the snippet is invoked.
For example, if you use CTRL+K, CTRL+X to find and run the snippet - this gives you the expected behavior.
If you use the shortcut name and press tab, the snippet is executed but inserts a blank line at the beg.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hello,
I am creating a program in VB.Net that reads data from a specific file type (one that I didn't create). Part of my program reads the file to determine some of the data in it, references an embedded resource image (choosing which image based on said data), and displays that image in a picturebox.
I would like for these files to display a thumbnail of that same image in Explorer. I'd be all right with an explorer-like interface in my program that does this, but I'd much prefer if it could be applied to Explorer, so I can see these thumbnails even without the program running.
I've looked for information on how to do this everywhere, and I can't find any.
In a similar vein, I would like to associate these files with my program, so that when I double click them, my program launches and knows what to do with that file (basically it would run the functions it runs now, only without the need for an openfiledialog).
Any help (or points in the right direction at least) would be really appreciated. Thanks everyone!
As I sit here, I contemplate the last words of Socrates: "I drank what?".
Pokémon Pearl Friend Code: 4554-2418-6836
|
|
|
|
|
Associating the file extension is easy. You just have to go into Explorer >> Tools >> Options >> File Types tab >> New button. THen type in your file extension and click OK. When you get back to the list, click on your file extension, then click on Change. Click on the Browse button and file your application. That's a start anyway. You might have to tweak the final result for your requirements.
Writing a Shell Extension, on the other hand, isn't so easy. It is highly recommended that you do NOT do this in any managed language (C#, VB.NET, ...) but instead, write it in plain Visual C++. But, you can read up a bit on it at http://msdn.microsoft.com/en-us/magazine/cc188741.aspx[^]
If you're not familiar with Shell internals, I suggest postponing this project until you do a ton of research on the topic. You can start here[^]. This was the first in a series of three articles on the subject.
|
|
|
|
|
The file association has to be done programmatically, for deployment purposes... although that method would be fine for my personal use (if I could then figure out how to set my program to know what to do once the file is opened in this fashion).
I'll look into those links you provided. I may be in over my head, but something tells me someone else has tried something like this. Thanks!
As I sit here, I contemplate the last words of Socrates: "I drank what?".
Pokémon Pearl Friend Code: 4554-2418-6836
|
|
|
|
|
CodeMonkey85 wrote: The file association has to be done programmatically, for deployment purposes... although that method would be fine for my personal use (if I could then figure out how to set my program to know what to do once the file is opened in this fashion).
Get the association to work in your dev environment first. Then you can look in the Registry, under HKEY_CLASSES_ROOT to show you what you have to reproduce in your installation code to do it.
As for the image preview in Explorer, yes, other people have done it, and that's what they had to go through to accomplish it. There is no "template" project where you just modify a little bit of code, compile it call it Done!
|
|
|
|
|
Hello friends,
I am Usind MSAccess for loading some txtfiles from a folder to the SQL server. These txtfiles are gnerated from a testing tool. My Access will autoload the files to the server i.e my application is scheduled to call from scheduled task, twice a day. It will check the folder for txtfiles , if the folder is empty, the applicaton exits. Else it will load the files to server and move all loaded files to another folder.
My problem is if both tool(my MSAccess and the testing tool which creating txt files) are running simultanously these is a chance of half generated txt file(generating by testing tool) to be loaded in the server. I dont want that. That file has to be loaded next time.
How to prevent the half generated txtfiles from loading to server.
Hope u got my problem
Regards
Jishith
|
|
|
|
|
One way is to check the file size, wait say 10 seconds and check it again. Repeat until there is no change.
Hope this helps
Bob
Ashfield Consultants Ltd
|
|
|
|
|
In the old days (VAX/VMS) I used to be able to open a file either as "Shared" or "Exclusive". What you want here is to open the file, "Exclusive", so that you are guaranteed that that no other process is touching it.
You will need to test this out with OpenTextFile in MS-Access.
Just and idea.
|
|
|
|
|
We use a first pass flag. We know the write does not take more than x seconds so the loop sets a time flag the first pass. Second pass if the time flag is > wait setting then the file is loaded.
I almost like the exclusive idea (and will test it Monday) except you are programming by error (one of my favourite rants) ie try and open the file, if it fails then deal with it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
the txt file may take minute for complete write.. And its with the customer side..i dont want to fail my application while opening..Want to load other file skipping the file which is still in writing process..
|
|
|
|
|
jishbalan wrote: Want to load other file skipping the file which is still in writing process.
That is precisely what we do. If the file has not been resident in the folder for #n seconds then the loop progresses to the next file in the folder and ignores the potentially locked file. Next pass it will get the file it ignored.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks a lot..
These is exactly what i want...
But
"If the file has not been resident in the folder for #n seconds" What it means? and how to check?
"potentially locked file" How can i check for these?
|
|
|
|
|
You need a table/list of filenames with a datetime field.
Start loop (foreach file in directory)
check if the file is in the list
add the file to the list with the time (first pass)
if the file is there has enough time passed (check time flag in list for this file)
if time passed > Setting then process
end loop
A potentially locked file has been in the folder less than #n seconds/minutes. You really don't care if it is actually locked, just make sure the time to wait is > than any possible locking period.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello all!
How can I delete listbox contents populated through a database? Here's my code for the delete button...
If Adodc1.Recordset.RecordCount <> 0 Then
res = MsgBox("Are You Sure You Want To Delete This Record?", vbYesNo, "System Message")
If res = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Requery
Adodc1.Refresh
MsgBox "Recored has been Deleted"
lstpromo.RemoveItem lstpromo.ListIndex
End If
Else
MsgBox "No Record to delete"
End If
However I get the error "Either BOF or EOF is true, etc...". Is there a method in vb6 that I can use like the in odbccommand in .Net?
Aim small, miss small
|
|
|
|
|
Your code isn't deleting specific records in the database. You're going through the listbox, but not matching those items to records in the recordset. You're not even looking at the first record in the recordset.
Judging by your verbage, you're not binding the listbox (if that's even possible in VB6) to the recordset. This means that you have to look at each item in the listbox, find the corresponding record in the recordset, then delete that record, and continue with the search.
|
|
|
|
|
Hey thanks! Kind of a noobish question there but thanks for the aid. Incidentally I wasn't matching the items to the recordset as you said. Got used to vb.net DB manipulation I forgot it was different here in VB6. Agin thanks for the help
Aim small, miss small
|
|
|
|
|
Try to this query.
str="delete from tablename where field name=" & "'" & List1.Items.Text & "';"
Execute this query then refresh the database and remove the all item from list and add up once again.
|
|
|
|
|
Hi All
In my project i want to load a English Dictionary(similar in MS Word Dictionary)and find spell check?Is there any Reference in vb.net?
Give me an idea....
Thanks in Advance
|
|
|
|
|
The only way you can get this for free is if your users have Word installed and you can interop with it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi all...
I am creating a program in VS2005 which accepts a username and password to execute the program.
I have done all things but I want to give a checkbox below password textbox so that users can see their passwords.
What should I write in checkbox.checked event so that the password character (*****) would appear in its original text format (12345).
Thanks.
Gagan
|
|
|
|
|
Hi
Change the password char property in check box click or change event.
If checkbox1.checked then
textbox1.Passwordchar="*"
else
textbox1.Passwordchar=""
end if
Hope this helpfull.
Thanx
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|