|
Hi,
I am new to VB.net and I am writing an application where I would like a user to be able to click on a button on a toolbar (which is on a parent form) and then be able to click on a child form to place a .gif or .jpeg
I have no idea where to start and haven't been able to find much of use on the net.
Any suggestions would be gratefully received.
|
|
|
|
|
when the user clicks on the child form, what happens? they place an image there? or you want to display an image on the form where they click?
------------------------
Jordan.
III
|
|
|
|
|
Jordan,
I want them to place an image on the form. I have been trying to work out ways of doing it by piecing together info I have learned from some GDI+ tutorials but to no avail.
Pete S
|
|
|
|
|
sry.. im sure u can get much better help from sum1 else, its just a matter of waiting a lil', hopefully.
what image will they be placing? where is this image coming from? could you maybe post some code relating to the event?
------------------------
Jordan.
III
|
|
|
|
|
Hi
I am looking for simple source code that allows me to get E-mail from an ISP onto a PC and strip it and re-build it ( I need to find certain text in the message body and copy it into the subject line.) The program then needs to act as a server and allow another program to use POP3 to retrieve the mail, any ideas?
Cheers
Eugene
|
|
|
|
|
Hai,somebody can help me to write a search function in my program using vb6
|
|
|
|
|
To search for...? In what -- a database? -- in text files? -- in all files?
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Lim Goh Tong wrote (via email):
Search in database. The records we search for must display in datagrid. can u send me same example of program?
That is an extremely broad, general question, and as such, is very difficult to answer in this kind of forum. Assuming that you are accessing the records from some ODBC, OleDb or SQL data source, you would typically design a form on which a user would enter search parameters, then, since this is VB6, build a query string to execute on an ADODB command, return a record set and bind the record set to a grid. The high-level, general nature of your question makes me think this is something you may not have done before. I suggest searching for general ADO programming samples and tutorials on VB-related web sites as a starting point; then if you have more specific questions related to a particular sample or some of your own code, post it back here.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Brendon,
I want to make sure we're still talking about Visual Basic 6; your earlier example and code led me to this conclusion, but if we are really talking about Visual Basic.NET, then there is much different approach.
The code in the VS.NET magazine article (here[^]) was an excellent example of running a query and binding it to a MS Hierarchical Flex Grid on a Visual Basic 6 form. If you boil it down to the most basic elements, it looks like this:
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cnn = New ADODB.Connection
Set rs = New ADODB.Recordset
cnn.Open "..." ' details omitted
rs.Open "SELECT * FROM Customers", cnn, adOpenKeyset, adLockOptimistic
Set MyFlexGrid.DataSource = rs
However, I get the feeling from your recent inquiries (via email) that you are also concerned about the SQL syntax for joining a Customer Orders table on one or more Customer records. That would be fairly easy to produce, but I have no idea what your table looks like, so I can only offer the most basic suggestions, if that is the case. Let me know, OK?
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
use the MSXML Library:
this is a sample code :
Private Sub Command1_Click()
Dim root
Dim xmlDoc
Dim child
Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.Load ("books.xml")
'Set root to the XML document's root element, COLLECTION:
Set root = xmlDoc.documentElement
'Walk from the root to each of its child nodes:
For Each child In root.childNodes
MsgBox child.Text
Next
End Sub
Private Sub Command2_Click()
Dim ElemList
Dim xmlDoc
Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.Load ("books.xml")
Set ElemList = xmlDoc.getElementsByTagName("AUTHOR")
For i = 0 To (ElemList.length - 1)
MsgBox ElemList.Item(i).xml
Next
End Sub
Private Sub Command3_Click()
Dim xmlDoc
Dim root
Dim newElem
Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.Load ("books.xml")
Set root = xmlDoc.documentElement
Set newElem = xmlDoc.createElement("PAGES")
root.childNodes.Item(1).appendChild newElem
root.childNodes.Item(1).lastChild.Text = "400"
MsgBox root.childNodes.Item(1).xml
End Sub
that reads this XML:
<?xml version="1.0" encoding="utf-8" ?>
- <COLLECTION>
- <BOOK>
<TITLE>Cosmos</TITLE>
<AUTHOR>Carl Sagan</AUTHOR>
<PUBLISHER>Ballantine Books</PUBLISHER>
</BOOK>
- <BOOK>
<TITLE>Catwings</TITLE>
<AUTHOR>Ursula K. Le Guin</AUTHOR>
<PUBLISHER>Scholastic</PUBLISHER>
</BOOK>
- <BOOK>
<TITLE>Home Town</TITLE>
<AUTHOR>Tracy Kidder</AUTHOR>
<PUBLISHER>Random House</PUBLISHER>
</BOOK>
</COLLECTION>
|
|
|
|
|
I have just create my project, now i want it run in windown nt service at start my windown.
please give me the VB code.
Thank's you
|
|
|
|
|
VB6: I suggest the NT Service Toolkit from Desaware.
VB.NET: there are several examples in the MSDN library, and perhaps here on CP as well.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Hello again. I'm back with another random and mostly useless request; anyone have or know of a component for VB.Net that captures feed from a webcam (through a USB port if you need to know)? I'm thinking it would be a window within the form, like the browser control, and the video would play on it. If there is no such component, then I could use some source code (maybe I'll code my own component ).
Thanks for the help!
As I sit here, I contemplate the last words of Socrates: "I drank what?".
|
|
|
|
|
Go to the site of the webcam's company and see if they have a developer site or an SDK. Logitech's is http://developer.logitech.com[^]. You can fill out a small survey, then download the SDK which will come with the stuff you want.
RageInTheMachine9532
|
|
|
|
|
Mine's actually an Intel, but I'll check out their developer site. Thanks for the help!
As I sit here, I contemplate the last words of Socrates: "I drank what?".
|
|
|
|
|
Ewwww... Intel doesn't have an SDK for their cameras. What they do have is links to an Open Source, on SourceForge, Computer Vision project called OpenCV. They also direct you to use Microsoft's DirectX, Video for Windows SDK, and Device Driver SDK. That's one of the reasons why I didn't pick Intel's hardware for a webcam.
RageInTheMachine9532
|
|
|
|
|
Blarg... figures. Heh. Well, I was planning on getting a new one at some point anyway, and when I am, I'll take that into consideration (i.e. I'll never get an Intel again). Thanks again for the input!
As I sit here, I contemplate the last words of Socrates: "I drank what?".
|
|
|
|
|
Check this site:
http://www.banasoft.net/AVPhone.htm
|
|
|
|
|
I have a VB application that needs to do a lookup on a dataset that has been filled early in my program. A FOR loop finds the data, but runs slowly.
I have been unable to locate documentation in VS that describes how to do this.
|
|
|
|
|
I have a legacy business application written in VB 6.0. (I expect I will need to upgrade this to VB.NET at some point.).
I need to activate this from a custom URL link on a web page in IE, passing parameters into it via the URL. This will bring up a form in the VB app from which I can hit a button and return to the IE window page, passing the return values again as a URL. Does anyone know how to accomplish this? I've looked at 'monikers', but I really don't understand how to use these and would appreciate some sample code from someone who has done this beforehand
|
|
|
|
|
Let me get this straight:
On a client machine with a web browser, go to a URL and have the server launch a VB6 Windows Forms App (not a web app), the server runs the app but the client sees the user interface and, pass parameters to the app and pass return code back to the client to some other app waiting there.
RageInTheMachine9532
|
|
|
|
|
Almost there: I expect that the browser, not the server, will launch the app in this case. I think it might have to be done via a URL moniker, like you get on the http://www.bitzi.com site. These will activate file sharing programs such as KaZaA and pass the download parameters into the program. My additional requirement is that the Windows Forms app can activate the browser instance (IE in this case) that created it and get it to navigate to a URL on completion of the process. Simple, eh? :-/
|
|
|
|
|
Monikers are used to tell a browser what application to launch based on the contents of the html page. For example, a PDF file moniker will tell the browser to launch AcrobatReader to render the content PDF content.
You can setup links to launch various programs, like Kazaa, but Kazaa won't return anything back to your browser since it's not written to do so.
Also, your windows app would have a difficult time determining which browser launched it, unless there was only one browser window open. Telling the existing browser to navigate to another URL would not be a trivial task.
RageInTheMachine9532
|
|
|
|
|
I Dim a graphic “Public Ax1g1 As Graphics = MYform1.CreateGraphics” and the call the “bitblt” function to capture the image and then I release the handle “Ax1g1.ReleaseHdc(dc1)”
On any subsequent call to this class “Ax1ThumbnailClass.AxCaptureImage” I get an invalid parameter exception on Ax1g1.ReleaseHdc(dc1).
I’ve tried not releasing the handles and I do not get the exception but the captured image is blank.
Help greatly appreciated!!!!
********************CALLING CODE***********************
Ax1Thumbnail.AxCaptureImage(MYform1.AxWebBrowser1.Location.X, MYform1.AxWebBrowser1.Location.Y)
Myform2.thumbScr1.Image = Ax1Thumbnail.Ax1Image.GetThumbnailImage(50, 50, Nothing, Nothing)
Public Class Ax1ThumbnailClass
Public Ax1g1 As Graphics = MYform1.CreateGraphics()
Public Ax1Image = New Bitmap(150, 150, Ax1g1)
Public Ax1g2 As Graphics = Graphics.FromImage(Ax1Image)
Public dc1 As IntPtr = Ax1g1.GetHdc()
Public dc2 As IntPtr = Ax1g2.GetHdc()
Public Sub AxCaptureImage(ByVal Browser1 As Integer, ByVal Browser2 As Integer)
CallBitBlt.BitBlt(dc2, 0, 0, 150, 150, dc1, Browser1, Browser2, SSRCCOPY)
Ax1g1.ReleaseHdc(dc1)
Ax1g2.ReleaseHdc(dc2)
End Sub
End Class
Public Class bitbltClass
<system.runtime.interopservices.dllimportattribute("gdi32.dll")> _
Public Shared Function BitBlt(ByVal hdcDest As IntPtr, _
ByVal nXDest As Integer, _
ByVal nYDest As Integer, _
ByVal nWidth As Integer, _
ByVal nHeight As Integer, _
ByVal hdcSrc As IntPtr, _
ByVal nXSrc As Integer, _
ByVal nYSrc As Integer, _
ByVal dwRop As System.Int32) As Boolean
End Function
End Class
Thanks, GregC
|
|
|
|
|
hi
i want to use the FtpCommand(API's function) with the command "Quote Site lrecl=80 recfm=fb" in VB6.but this FtpCommand function does not support this command and return an error with the subject of 500 INVALID COMMAND.i tried this function with other commands such as PWD,LS,GET,PUT but it also returns the same error,while this is the suggested function in MSDN for doing FTP.how can i use this function in my program specially with the command "Quote Site lrecl=80 recfm=fb"?i would be so happy if someone answers me.
|
|
|
|
|