|
zaksoftwaredeveloper wrote: You need a .NET Reflector
How will that help to make a program platform independent?
|
|
|
|
|
He wasn't replying to the OP, he was replying to you. Perhaps he just thinks you want Reflector and have forgotten where it is now since Lutz sold it.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: Perhaps he just thinks you want Reflector
Still
|
|
|
|
|
If you've written your application in .NET, then it's not platform independent. It will only run in Operating Systems that have the .NET framework. You could possibly compile against Mono, but that still isn't platform independent, for instance it won't run on an old VAX server.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
shakins wrote: convert d source code into .exe
You'll need a d compiler. Very few people here use d.
shakins wrote: make it platform-independent
That's unachievable.
|
|
|
|
|
Hi -
I'm looking to automate the switching on/off of my 2nd monitor.
I can do it manually, via the Windows Desktop/Properties dialog. Is there a API or baseclass that can do this?
Any help is appriciated!
Thanks,
Bill
|
|
|
|
|
hi , i want to develop an application where one person will share screen with several people joining the conference , just need some help for start up. please share some links or help code to begin with.
with regards
|
|
|
|
|
Hi friend,
I also want to develop screen sharing application.
if u got any help or link or code please send me.
|
|
|
|
|
What is a recommended means of storing an expression/formula in a database field, to be evaluated at runtime in a report. The reporting Engine will likely be Telerik or SSRS. I have several production performance categories, measured in tons, count, percentage etc. that all must be able to have a unique formula for calculating the performance rating, in the appropriate unit of measure.
|
|
|
|
|
Write the expression in the database and during the evaluation of the formulas, use Infix to Postfix or Prefix and then evaluate.
|
|
|
|
|
I had download a online website. when i running site on local.I found the error:
"The virtual path '/Templates/mysite/Main.master' maps to another application, which is not allowed."
plz help me.
Thanx
uttam
uuttam.xevoke@live.com
|
|
|
|
|
uttam kr wrote: plz help me.
What do you want help with? You haven't asked anything only made the statement that you copied someone else's work and can't figure out how to do it on your own.
only two letters away from being an asset
|
|
|
|
|
I'm trying do run the Ole DB below with OleDBCommand but I'm getting a strange error, OleDB doesn't have some functions implemented?
SELECT
[Plan1$].[Cliente] AS [Cliente0],
CONVERT(varchar, DATEPART(q,[Plan1$].[Data]) % 2 + 1) + 'S/' + DATENAME(yyyy,[Plan1$].[Data]) AS [Data1]
FROM [Plan1$]
ORDER BY [Plan1$].[Cliente] ASC, [Plan1$].[Data] ASC
ConnectionStr: Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\works\Clientes.xls";Extended Properties="Excel 8.0;HDR=YES;"
Error: System.Data.OleDb.OleDbException: Sintax error 'CONVERT(varchar, DATEPART(q,[Plan1$].[Data]) % 2 + 1) + 'S/' + DATENAME(yyyy,[Plan1$].[Data])'.
|
|
|
|
|
Hi, Is there not a VB6 forum here? please direct me where to find it as my question is related to VB6.
I'm connecting client to server using VB6 Winsock Controls
'==========Server side============================
Winsock1.Protocol = sckTCPProtocol
Winsock1.RemoteHost = strParm(0)
Winsock1.RemotePort = 1002
Pause (7)
MsgBox "Before Connecting" 'just to do something, and give time to establish connection
Winsock1.Connect
MsgBox "After Connecting"
DoEvents
'Delay2 = 1
Pause (10)
Winsock1.SendData ("Starting dropship refresh...")
It works fine with the MsgBox between the Connect and the Senddata, but without it gives an error when firing Senddata method, seems because connection is not established quick enough.
Please help, how can I ensure connection before sending data?
I have tried some 'delay' processes which works 1 minute and doesnt the next.
Thanks in advance
P
|
|
|
|
|
There is a Visual Basic forum.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
VB6 has some rudimentary error-handling. Wait a sec, try to connect, and if it fails then try again in two seconds. Repeat for three to five times, and show a message that there's connectivity-problems if you cannot connect after that.
I haven't got a VB6-IDE at home, but this should give you a basic idea;
Private Sub WaitForAwhile(howLong as Int)
Dim currentTime
currentTime = timeGetTime
While (timeGetTime - currentTime) < howLong
DoEvents
Wend
End Sub This should allow a pauze while processing continues. Next, to the connection-routine;
Private Sub TryConnect()
On Error Goto myErrorHandler
Dim Tries%
Tries% = 0
TryAgain:
Winsock1.Connect
WaitForAwhile(1000)
Winsock1.SendData ("I will gladly beam down to the planet, Captain!")
Exit Sub
myErrorHandler:
Tries% = Tries% + 1
If Tries% < 5 Then
Goto TryAgain
Else
MsgBox "Cannot connect, try the sneakernet :)"
End If
End Sub
I are Troll
|
|
|
|
|
Hi Thanks Eddy,
I did put in some sort of delay similar to yours, it works the one minute and the next it doesnt, I even increased the time delay to maximum, but still same problem.
How can I get rid of this problem permanently.
P
|
|
|
|
|
she-Developer wrote: I did put in some sort of delay similar to yours, it works the one minute and the next it doesnt, I even increased the time delay to maximum, but still same problem.
Did you get an error-message of any kind? I can't debug from here, so I'm kinda guessing.
Perhaps you can let the application dump the contents of a ping (shell a command, "ping >C:\result.txt") to check connectivity if the loop fails five times.
I are Troll
|
|
|
|
|
I just had a look of some of my own code and found that every time, before I connect I follow the following logic:
(I cut out alot of irrelevant code such as error handling etc. so I may have made a mistake somewhere but you should get the general idea)
Sub AttemptConnectionToRemoteHost()
'(wsh is my client winsock control)
If wsh.State <> sckClosed Then
wsh.Close
End If
wsh.RemoteHost = RTrim(LTrim(txtAddress))
wsh.RemotePort = CLng(txtPort)
wsh.Connect
Await()
If wsh.State = sckConnected Then
'Report success!!
Else
'Report Failure
End If
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Await()
'Allow x seconds to for connection
Dim x As Long
Dim EndTime As Single
x = CLng(5) 'Allow 5 seconds for connection attempt
EndTime = Timer + x
Do
DoEvents
Loop While (wsh.State <> sckConnected) And (EndTime > Timer)
End Sub
This should do the trick for you. I found that, always checking that the port's state is sckConnected, before attempting anything with it, is a good failsafe. Use the Await() procedure above to ensure that the port is CONNECTED before continuing. You could bring the 5 seconds down to as little as 1 second for local LAN applications.
modified on Thursday, October 22, 2009 2:39 AM
|
|
|
|
|
We have a transport class, one of the members is
private object _containerObject; with get/set methods. In our system this container object can contain every .net type, every class in our B.O layer, or a List<T> of those types, we also have a WebService with a method returning a transport class object, the problem is that this fails:
GenericTransportObject resoultGTO = new GenericTransportObject();
TestService.Service1 ourService = new TestService.Service1();
resoultGTO = ourService.WS_Input(gto);
The error I get is:
System.InvalidOperationException: The type BOLayer.UserInformation was
not expected. Use the XmlInclude or SoapInclude attribute to specify types
that are not known statically.
what happens in the web service is that the method creates a new GenericTransportObject, sets the metadata and set the _containerObject to a object of type UserInformation, and returns that object.
I get a message telling me to use XmlInclude or SoapInclude, but how do I do it, when the class I need to edit is a base class in a compiled .net assembly?
I hope I have explained the problem well (English isn’t my first language).
modified on Tuesday, October 20, 2009 8:04 AM
|
|
|
|
|
VS2008 and DotNet 3.5 with SP/1, on a 64-bit machine:
I'm trying to use registered window messages to communicate between applications. All apps/components are compiled to x86.
Here's my interop stuff (in a class library):
namespace Utility
{
public class WinAPI
{
public const string REGISTERED_MSG = "AllInOneDemo";
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern uint RegisterWindowMessage(string lpString);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
public static int SendRegisteredMessage(uint message, int lParam, int wParam)
{
return SendMessage(IntPtr.Zero, message, lParam, wParam);
}
}
}
Here's my registering code:
private uint RegisteredMessage = WinAPI.RegisterWindowMessage(Globals.REGISTERED_MSG);
Here's my message sending code (the return value is always 0):
int result = WinAPI.SendRegisteredMessage(this.RegisteredMessage, 123, 456);
And finally, here's the message handling code:
protected override void WndProc(ref System.Windows.Forms.Message msg)
{
base.WndProc(ref msg);
if (msg.Msg == this.RegisteredMessage)
{
this.listBoxPublicMsg.Items.Add(string.Format("{0}\tLParam={0}\tWParam={1}", msg.Msg, msg.LParam, msg.WParam));
}
}
One application registers/sends the message, and one application is supposed to register/receive the message. The message is being sent, but it's not being received.
I have verified that both apps are getting the same return value when calling RegisterWindowMessage. The sending app appears to be sending the message, but the receiving app never sees it.
I tried using Spy++(64-bit) to look only at the Registered messages for both apps, but I get nothing at all for either window.
What am I doing wrong?
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Handle to the window whose window procedure will receive the message. If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.
Microsoft Windows Vista and later. Message sending is subject to User Interface Privilege Isolation (UIPI). The thread of a process can send messages only to message queues of threads in processes of lesser or equal integrity level.
So where SendMessage(IntPtr.Zero,....) should be SendMessage(0xFFFF,....) I'll leave you to defined/consted 0xFFFF as HWND_BROADCAST.
|
|
|
|
|
Yep. That was the problem. I don't know quite where I got it in my head that a hwnd of 0 would do that (but to me it makes sense).
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
hi,
SendMessage needs a handle the message shell be send to.
in your case it is a IntPtr.Zero.
If you want your other application to receive the msg than give the handle by SendMessage of the application or use the HWND_BROADCAST to send the message to all the top-level windows in the system.
greetz and good luck
|
|
|
|
|
John Simmons / outlaw programmer wrote: One application registers/sends the message, and one application is supposed to register/receive the message. The message is being sent, but it's not being received.
I think your SendMessage function needs the HWND_BROADCAST value in the first parameter in order for your message to get to the other applcation. See SendMessage[^] on MSDN, for the details.
|
|
|
|
|