|
What you want is insane. Why are you using VB6 anyhow ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You can't get just the toolbar. Those tools will only work on a Word document. You have to host Word inside your application to use that toolbar, and you'll have to show the rest of Word too so the user has a Word document to work on.
If you're going to go that far, why would the user even use your application??
vipul2 wrote: Instead of i creating seperate buttons 4 every formatting tool.
What's the problem?? Why not?? Why are you complicating your app more than it needs to be??
|
|
|
|
|
Hi Dave,
Yes i got it. So it is clear that i can't just the tool bar but instead i can get the entire word in my project which is't required.
Anyways thanks for the suggestion
VIPUL
|
|
|
|
|
Hi All,
I am writing a non MFC Application using Opengl (Win32 Project) but i am using
some MFC Headers below
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxdhtml.h>
#include <afxdlgs.h>
////////////////////////////////////////////////////////////////////////
I want to use Web Browser Control On my project (Activex) but i am not
using any form i want create web browser using createWindow function
////////////////////////////////////////////////////////////////////////
It will be really help full if anyone please send me sample code
Thanks,
Soumyadipta De
|
|
|
|
|
What would possess you to ask this in the VB forum ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi!
i have a simple question.
i have a simple server client program that i am recently doing my question is how do you queue the data from the client in the server side?
tnx!
FUNGAS!
|
|
|
|
|
You haven't said anything about your application or data. Do you want messages from the client queued up on the server?? Or on the client side in a sometimes-connected environment?? What are you queueing?? Have you implemented some kind of queue on the server-side already??
At this point, about the only thing I could recommend is looking into MS Message Queueing and the System.Messaing[^] namespace.
|
|
|
|
|
oh im sorry my client sends an iso8583 message to the server. yes i want the messages queued up on the server side because the client only connects once it has a message ready. on the server side the message catcher is an infinite loop once a client connects it catches all the data being sent my problem is if two or more client simultaenously connects how do i queue up the data here is a sample code from my server program:
Sub Main()
Dim server As TcpListener
server = Nothing
Try
Dim port As Int32 = 13000
Dim localAddr As IPAddress = IPAddress.Parse("127.0.0.1")
server = New TcpListener(localAddr, port)
server.Start()
While True
Dim data = New [Byte](1024) {}
Dim clientdata As [String] = [String].Empty
Console.WriteLine()
Console.WriteLine("Waiting for a connection... ")
Dim client As TcpClient = server.AcceptTcpClient()
Console.WriteLine("Connected!")
Console.WriteLine()
Dim stream As NetworkStream = client.GetStream()
Dim bytes As Int32 = stream.Read(data, 0, data.Length)
clientdata = System.Text.Encoding.ASCII.GetString(data, 0, _bytes)
client.Close()
End While
Catch ex As SocketException
Console.WriteLine("SocketException: {0}", ex)
Finally
server.Stop()
End Try
End Sub
tnx!
FUNGAS!
|
|
|
|
|
If you use MSMQ, you don't need the TCP/IP code. In the way you've implemented this, you'd have to write an entire queueing system. That's WAY too much information to put in a forum post.
|
|
|
|
|
do msmq have its own communication protocol?
FUNGAS!
|
|
|
|
|
Why don't you click on the link in my first reply and read up on it.
|
|
|
|
|
Hi, I would like to know how to detect whether adobe acrobate reader is installed my computer by using the code in vb 2005?
Thank in advance
|
|
|
|
|
You either look for the AcroRd32.exe somewhere under Program Files or you can look in the Registry under HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\version . Look for version number keys, or you can even look a little deeper for the Path value under the Installer key under each version key you find.
|
|
|
|
|
Dave Kreskowiak wrote: You either look for the AcroRd32.exe somewhere under Program Files or you can look in the Registry under HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\version
In my opinion, looking in registry is better. But if acrobate reader is not install it mean the registry should be like this: HKEY_LOCAL_MACHINE\SOFTWARE\Adobe or HKEY_LOCAL_MACHINE\SOFTWARE\ ? If so then i will write my code to detect the path in the registry and determine whether acrobat is install or not.
Thank you very much for your reply
|
|
|
|
|
I have to develop a weigh bridge software.
I am able to read data in Hyper terminal.
But the problem is that i have to get the weight in text Box.
thank you,
sri.
|
|
|
|
|
.NET offers the SerialPort class, and CodeProject holds several articles about it.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi All,
Long story short: I have a program that writes data to a database, and it will be corrupted if a person logs off during this process.
My question:
How do I handle the WM_QUERYENDSESSION in VB.Net to cancel the Windows Log Off?
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_QUERYENDSESSION Then
'Return sometime to say no log off
End If
MyBase.WndProc(m)
End Sub
Thanks =)
|
|
|
|
|
You're going overboard here. All you have to do is handle the Closing event of your startup form and set the eventArgs Cancel property to True.
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If e.CloseReason = CloseReason.WindowsShutDown Then
e.Cancel = True
End If
End Sub
|
|
|
|
|
Is that for .NET 2003? I cant find FormClosingEventArgs under System.Windows.Forms
|
|
|
|
|
Yep, that's 2005. 2003 has something similar, but the event name is different and you don't get a ClosingReason property. You have to write the code to track if there is a database operation going on, then just deny closing the form if there is a transaction in progress.
|
|
|
|
|
Thanks for your responses, youve been very helpful.
However I am still encountering an issue. Windows keeps showing a messagebox to End Task because my program is taking too long, when a person clicks Shutdown or Log Off. I need the program to completely cancel Windows Log off, and not have this error show up.
Thanks in advance
|
|
|
|
|
Where's my head at?? After waking up, you can handle the SystemEvents.SessionEnding[^] event to do this. It's still a cancelable event.
|
|
|
|
|
Im sorry, your dealing with an idiot =(. No idea how to go about that
EDIT: I tried the example on MSDN.
It still brings up that "End Program" box even if I cancel the event, saying that my app has taken too long. That cant happen.
-- modified at 12:56 Tuesday 16th October, 2007
|
|
|
|
|
You have to wire up the event yourself.
Imports Microsoft.Win32
.
.
.
Private Sub Form1_Load(blah, blah) Handles MyBase.Load
AddHandler SystemEvents.SessionEnding, AddressOf MySessionEndingEventHandler
End Sub
Private Sub MySessionEndingEventHandler(ByVal sender As Object, ByVal e As SessionEndingEventArgs)
If TransactionPending Then
e.Cancel = True
End If
End Sub
TransactionPending is a variable that you set somewhere to notify this code that a database update is still going on somewhere.
The reason that code exists in the link I gave you is because your code must unhook this event before your form closes! (RemoveHandler SystemEvents.SessionEnding, AddressOf...) You would normally put this code in the form's Closing event. The problem is that there is no guaranteed order of the SessionEnding and Form.Closing events! The FormClosing event could fire first, unhooking the SessionEnding event handler, then the SessionEnding event could fire.
|
|
|
|
|
You've been extremely helpful, and I thank you for your patience with me =)
I will give the code a run and let you know.
|
|
|
|