|
You're a tool, change your attitude or you might as well start flipping burgers now.
|
|
|
|
|
The calendar controls have nothing to do with databases. All they do is supply a Date or DateTime object. You use the values you get out of the object supplied and incorporate that into your SQL via (preferrably) a Parameter object to your query.
My bad - I misread the question...
modified on Friday, October 16, 2009 11:24 AM
|
|
|
|
|
Hi, I have a customer that has a VB6 COM application that are calling my WCF service in .NET C#.
I (we) are using windows integrated security and using nettcp binding. How should/can my customer set password and username at his xml, so that my service understand. Is this possible in VB6? The VB6 application is using an object that´s called XMLHttpObject. He has used it to talk to other web services (not in WCF)...one thing that differ now is that we are using integrated security.
I saw on msdn something about a service moniker http://msdn.microsoft.com/en-us/library/ms733928.aspx[^], but then my customer has to make/create his own .net application locally on his machine. Is this the only way?
thanks in advance for all feedback!
//Sara
|
|
|
|
|
I would be telling your customer that VB6 is no longer supported, it has not been for some years. VB6 is a dead language and he should not be using it as a current development platform. I suggest you go with the MSDN solution requiring dotnet.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
How to find the coordinates of text marked in blue after the ocr process. And if i want to copy/save the same marked area as image in some other control like picture box then how can we do that.
If i am trying to copy the area marked in blue and exporting it thru MODI.IMiSelectableImage object but its giving error "Object or With block variable not set"
When Selecting the image one red rectagle comes then only it copies the same. So how we can make visible the selection through code.
Because i have tried after selecting it manually its working fine but i want to use the same through code.
Please Help....
Sanj
|
|
|
|
|
mailtosanjeev.jha wrote: how to find the coordinates of text marked in blue after the ocr process. And if i want to copy/save the same marked area as image in some other control like picture box then how can we do that.
One cannot mark text in an image. You can draw a selection on the picturebox. You'd read the MouseEventArgs to get to position, after which you copy that part[^] of the picture. Then, OCR that part of the picture, and you'll have your "selected text".
mailtosanjeev.jha wrote: If i am trying to copy the area marked in blue and exporting it thru MODI.IMiSelectableImage object but its giving error "Object or With block variable not set"
Is MODI equal to null? Has the COM-object been registered correctly?
Good luck
I are Troll
|
|
|
|
|
Can some one tell me what is wrong here, I keep getting an error on line 14 char1 on this script
I am trying to get a count of folders and files as well as sub folders and files in the same directory tree structure...
Thanks..
<br />
Dim totFileCount,totFolderCount<br />
Set fs = CreateObject("Scripting.FileSystemObject")<br />
startFolder = "C:\Home\"<br />
<br />
totFileCount = fs.GetFolder(startFolder).Files.Count<br />
CountSubfolderFiles fs.GetFolder(startFolder)<br />
CountSubfolderFolders fs.GetFolder(startFolder)<br />
Wscript.echo "TOTAL FILES = ", totFileCount<br />
Wscript.echo "TOTAL FOLDERS = ", totFolderCount<br />
Wscript.Quit<br />
<br />
Sub CountSubfolderFiles(Folder)<br />
For Each Subfolder in Folder.SubFolders<br />
totFileCount = totFileCount + SubFolder.Files.Count<br />
CountSubfolderFiles Subfolder<br />
Next<br />
End Sub<br />
<br />
Sub CountSubfolderFolders(Folder)<br />
For Each Subfolder in Folder.SubFolders<br />
WScript.Echo Folder.Path<br />
totFolderCount = totFolderCount + 1<br />
CountSubfolderFolders Subfolder<br />
Next<br />
End Sub<br />
|
|
|
|
|
Well, don't give too much away. What error? Which line of code - without copying, pasting and running which is line 14? Have you tried debugging in any way?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Can some one tell me what is wrong here, I keep getting an error on line 14 char1 on this script
I am trying to get a count of folders and files as well as sub folders and files in the same directory tree structure...
Thanks..
Dim totFileCount,totFolderCount
Set fs = CreateObject("Scripting.FileSystemObject")
startFolder = "C:\Home\"
totFileCount = fs.GetFolder(startFolder).Files.Count
CountSubfolderFiles fs.GetFolder(startFolder)
CountSubfolderFolders fs.GetFolder(startFolder)
Wscript.echo "TOTAL FILES = ", totFileCount
Wscript.echo "TOTAL FOLDERS = ", totFolderCount
Wscript.Quit
Sub CountSubfolderFiles(Folder)
For Each Subfolder in Folder.SubFolders
totFileCount = totFileCount + SubFolder.Files.Count
CountSubfolderFiles Subfolder
Next
End Sub
Sub CountSubfolderFolders(Folder)
For Each Subfolder in Folder.SubFolders
WScript.Echo Folder.Path
totFolderCount = totFolderCount + 1
CountSubfolderFolders Subfolder
Next
End Sub
|
|
|
|
|
I'm using Vb.Net 2003
I'm having a problem that the listbox SelectedIndexChanged event fires when a selected item is clicked. It seems logical to me that clicking on an item that is already selected wound not fire the event since the index does not change - but so much for logic.
Is there a way to prevent this from happening?
|
|
|
|
|
miwtech wrote: Is there a way to prevent this from happening?
I don't think so.
Several WinForms Controls have a XxxChanged event that fires somewhat more frequently than one could hope for.
Most often executing an event handler should not cause side effects, so all that is wrong with it is it wastes some CPU cycles, and possibly causes additional screen flicker by Controls being repainted (assuming some properties get changed inside the XxxChanged handler and doublebuffering isn't used). In rare occasions, side effects might occur; to avoid these one should remember and compare the current and the previous state, and only act on a real change.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Actually the logic of the event is correct. It fires twice when you change the selected item.
1 when the selection changes from the current item to null, I trap this in the event and simply return (if selecteditem = null then return)
2 when the selection changes to the item the UI activates.
So onSelectedItemChanged is precisely what you get.
|
|
|
|
|
Hi Everyone,
I'm new to this forum and I am impressed with the information disseminated here.
So..., I thought I would ask for some help on the following puzzle:
1. I am creating datasets from xml files.
2. In many cases aggregate functions must be performed against some of the columns within the datasets.
3. Is there a way to do this, using existing functions such as Min, Max, StdDev, etc.?
cb
|
|
|
|
|
I found the answer to my own question.
I guess if all else fails, read the directions.
Here is the solution, in case anyone cares::
Create the dataset.
Dim tmpDS as DataSet = fGetNewDataSet()<br />
<br />
Dim tmpVal as Integer = tmpDS.Tables(0).Compute("SUM(Col1)", "Col2>10")
The above works nicely on numeric columns. Non-numeric columns, containing numeric data are no implicitly converted.
cb
|
|
|
|
|
I have problem (that seems to be obvious since I am posting here). I have an application that fetches a 64 base string out of a database and converts it, successfully to an image.
Here is the code:
Dim strImage As String = myRow("itemIcon")
Dim readmem As MemoryStream = New MemoryStream(Convert.FromBase64String(strImage))
Dim myIcon As Bitmap = New Bitmap(readmem)
readmem.Close()
Every control seems to understands the data from myIcon as being a valid bitmap, but when I import the image to an imagelist there seems to be an unreported error (or something like that) and it just doesn't display the image.
Dim tempItem As item
For Each tempItem In mainArrayList
img2.Images.Add(tempItem.ItemID, tempItem.ItemIcon)
img3.Images.Add(tempItem.ItemID, tempItem.ItemIcon)
' img3.Images.Add(imagekey, bitmap)
Next
When I do, by example "me.backgroundimage = tempItem.ItemIcon " it displays quite nicely the image, but it just doenst work with an imagelist.
Anybody an idea?
|
|
|
|
|
Hi,
from a quick read I can see ImageList imposes some limitations on the images, such as a maximum size of 256*256. Your example me.backgroundimage = tempItem.ItemIcon suggests you might exceed that.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
That seems not likely since the images are all 32px x 32px each. It would be a blow since the data from the imagelists are to be used in a listview.
Then I need to cut away the imagelists. Is there anyway I could apply the image to a listviewitem without the imagelist?
|
|
|
|
|
Never mind. I solved it. It had nothing to do with the imagelist.
|
|
|
|
|
Hi there,
I have an if statement where i would like to link a serail code e.g b3c to a text documenbt e.g serial.text
i have already tried everything but don't seem to be able to link the document with the if statment. I have looked all over google and i really do nned some help.
my if statement is currently
if txtserial.text = ......... then
my.forms.form2.show
please help me
Dan
|
|
|
|
|
what txtserial supposed to be? Is user supposed to enter some serial number?
And I see you are trying to compare that value and opening the Form2.
Now I really don't get this statement.
offroaderdan wrote: I have an if statement where i would like to link a serail code e.g b3c to a text documenbt e.g serial.text
If you fail to plan, you plan to fail!
Books are as useful to a stupid person as a mirror is useful to a blind person. - Chanakya
|
|
|
|
|
yeh the user enters a a serial number in txtserial and if this is correct then form 2 is shown.
serial.text checks the textserial to see if the number on the text box matches what is in the text document.
Hopefully that explains it a bit better.
|
|
|
|
|
Well, how is it not working? Does it just never show form 2? If that is the case then the serial is never matching the value from the file. Are you sure you are grabbing the value from the file properly? If so, perhaps it's a situation like having an extra space at the end, or the user typing in lower case instead of upper case. Perhaps you need something like this:
txtserial.Text.Trim.ToUpper = strValueFromFile.Trim.ToUpper
|
|
|
|
|
ummmm its just not finding the value from the file.
i could do a simple if statement that would display form2.
if statement =
if txtserial.text = "hi" then
my.forms.form2.text
i really don't know how to check a txt file
All i need is a simple piece of code that consists of checking a text box aggainst a txt file.
txtserial.Text.Trim.ToUpper = strValueFromFile.Trim.ToUpper 'how woulds i use this to link for example a text file for example serail.txt
thanks
|
|
|
|
|
How about something like this:
Dim strFilePath As String = "C:\Serial.txt"
Dim strSerial As String = String.Empty
If System.IO.File.Exists(strFilePath) Then
strSerial = System.IO.File.ReadAllText(strFilePath)
End If
If strSerial <> String.Empty AndAlso txtSerial.Text.Trim.ToUpper = strSerial.Trim.ToUpper Then
My.Forms.Form2.Show()
End If
|
|
|
|
|
do i put this code under a button?? Is this the only code i need?? Will this code read and find a code e.g DC3 if i have 250+ differnet codes
|
|
|
|