|
Hi all,
I use DDE with API and it runs fine with texts. Now I need to "transfer" a picture from my app to MS Word. I have a picture in the PictureBox, and I need to move it to a ByteArray.
How may I do that ?
Best Regards
Christian
|
|
|
|
|
Do you have any examples of retrieving a Word Document (Blob) stored in SQL Server into Microsoft Word using VB.NET?
Arthur D. Lorenzini
Database Analyst
State of South Dakota
arthur.lorenzini@state.sd.us
|
|
|
|
|
You'll have to convert the BLOB back into a file, then open it with Word. Three distinct steps. There are many example of retrieving blobs all over the Web. Try this[^] for a start. The rest is easy, save it to a temporary file and the launch it using ShellExecute.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I try, but a message appears! "Can't use event from base classes (or similar)"
so I wrote a shadows Event in the inheritate class to replace the original Event, but no other object what subscribs to the shadows Event don't capture it!
What can I do?
Example
Class BaseCls
public Event OnMessage()
End Class
Class A
Inherits BaseCls
Public Shadows Event OnMessage()
......
Sub DoSomething
Raise Event OnMessage
End Sub
End Class
Class Other
private withEvents Obj1 as A
sub new
...
addhandler Obj1.OnMessage, AddressOf SubDel
end sub
.....
sub SubDel()
'this don't work???
'Event capture don't work
End Sub
....
End Class
Gabriel
|
|
|
|
|
Hi Gabriel,
Just implement a function or sub in your base class that actually contains the code to raise the event, then call that function or sub from your derived class.
Pete
|
|
|
|
|
How to insert a Document File (Word Doc) into a form in VB6.0.
And user cannot change anything , just show ints contain to user.
If the contain too long , It will show scrollbar so that user can scroll it and view.
How can i do that?
(Use OLE, i dont know how to use it?)
Thanks
Ask More - Learn More
JohnJone
|
|
|
|
|
You'll need to locate a 3rd party "viewer" control you can drop on your form an use. Or you can use the components that are installed with Office. There's a catch with that though, the controls are heavy and are a pain to use if all you want to do is view a document.
\
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Tell me the detail please.
I dont know what to do now.
Ask More - Learn More
JohnJone
|
|
|
|
|
I want to check a string if it has " charector or not in VB... how can i check for it??
Thanks
Boomi.
|
|
|
|
|
You have to use a regular expression :
<br />
Imports System.text.RegularExpressions<br />
<br />
Module RegExpTest<br />
<br />
Sub Main()<br />
<br />
Dim Str As String = "fazerty""uiopqsd"<br />
<br />
Dim RegQuote As New Regex("""")<br />
<br />
Console.WriteLine(RegQuote.Match(Str).Success)<br />
<br />
Console.ReadLine()<br />
<br />
End Sub<br />
<br />
End Module<br />
And, by the way, it's "character", not "charector"
|
|
|
|
|
Actually i'm asking how to check this in VB... how to use regular expresions in VB..?? I think u have given the code in .NET... pls help..
Thanks
Boomi.
|
|
|
|
|
Ow sorry I thought you asked in VB.NET
|
|
|
|
|
If you use the InStr func, it will look something like this:
Dim WhereIsTheQuote As Integer
WhereIsTheQuote = InStr( 1, original_line, Chr$(34), vbTextCompare)
As you might have guessed already, 34 is the ASCII Chr$acter code for the quotes. If there are any quotes, the place where they first appear on the string will be returned. If there are some more quotes, other than the first ones, they will not be reported by InStr(), keep that in mind.
Pablo.ar
|
|
|
|
|
Thank u... i got the solution now...
Thanks
Boomi.
|
|
|
|
|
How do I link my basic exe VB program to a dll in order to access the prototypes available in the dll?
I downloaded the DLL and now it's sitting around cos I don't know how to access it...
|
|
|
|
|
If it's a plain library .DLL, you'll need the docs on it. Without them, you'll be groping around in the dark. You can get the function names using the Depends utility that came with Visual Studio 6, but you won't be able to get the parameters that each function takes. It's simply not available from the .DLL itself.
There are exceptions to this, of course. First if it's a COM registered .DLL, you set a reference to the .DLL instead of using Declare yada yada yada . All public functions will be available with their parameter lists. Or, if the .DLL comes with a .TLB file, you can import that as a reference instead.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
im wondering how you can setup a form so it cannot be closed?
i am trying to have a form so that the only way to get rid of it is to press a button on the form, which will only .hide() it. and another button on different form will .show() it, restoring all of it's window settings, etc. this is including when the user presses alt+f4 or hits the X (close) button, to hide rather than close the form.
...
i was just reading up on it, and it seems to work like this:
Private Sub BrowserForm_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing<br />
e.Cancel() = True<br />
Me.Hide()<br />
End Sub
this the proper way to do this?
thanks for any input.
------------------------
Jordan.
III
|
|
|
|
|
When envoked, I need my VB application to grab the current contents of the IE browser window. The app will take current browser window HTML and parse. Any code examples or suggestions?
|
|
|
|
|
please somebody kind enough to show me an example of coding to connect to database using webservices....thanks a lot
given2fly
|
|
|
|
|
If your application goes through a web service, it won't have any direct connection to the database. The web service should handle all interaction with the database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Try to check the information from here.[^] And let me know whether this information is match what you need or not.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
hi
i wish to know how to create a extra menu in vb.net
this extra menu is the same as the menu we get when
we click the right button on windows
i wish to do this menu on datagrid
can it be done?
if cant kindly tell me
if can kindly guide or provide me with any article i can refer
thank you in advance
Gary
|
|
|
|
|
hi gary, the menu you refer to is called a context menu. it can be used in conjunction with a datagrid or any other windows form element.
just handle the mouseclick, mousedown, or mouseup event of the datagrid, check the event args to see which button was clicked and display your context menu appropriately. you should be able to find some help on msdn here[^]
hope this helps.
-jim
|
|
|
|
|
hi jim
thank you..it do help a bit
all i have to do is make it compatible with my program
Gary
|
|
|
|
|
hi
i need to know how can convert from number to words
thank you
|
|
|
|