|
What about putting another SplitContainer inside one of the panels of the first SplitContainer?
|
|
|
|
|
Thank you.. yes, that is the way to go -- nest the splitcontainers inside each other.
|
|
|
|
|
Sorry, but I'm having trouble with what should be easy.
How to I detect that the user is holding down a key (F1 for instance) when the program first loads?
Thanks
|
|
|
|
|
Actually, it's quite difficult. Your application wasn't running when the key was pressed, so can't get a normal event notification that it was.
You'll have to use the Win32 API function GetAsynceKeyState[^] to find out if the key is still being held down. If I remember correctly, the virtual key code for "F1" is &H70.
|
|
|
|
|
Not hard at all actually... works perfect.. thanks!
|
|
|
|
|
Most people can't figure out how to do P/Invoke, let alone the binary math on the returned value. Glad to see you're not one of them!
|
|
|
|
|
It's much easier than that:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal KeyVal As Integer) As Integer
then:
Dim t As Integer = Me.GetAsyncKeyState(&H71)
|
|
|
|
|
Hi,
I am making a application which is communicate with another application on the same system.
i use config file for the remoting cofiguration.And its worked fine for few minutes.
But after some times an error is occured when try to raise event to the client from server. Error is "Object '/313ea683_ade8_4edd_9b25_d5a9566a83b4/st61eu4jxpjjvhgy1ts4zuuk_1.rem' has been disconnected or does not exist at the server."
I already to the lease to Time.Span=0 and also try Nothing.
But same problem is occured.
At the same time client is properly responding i.e. client is able to raise event at server.
can any one soultion for the same.please help about this??????????
Complete error message is -->
System.Runtime.Remoting.RemotingException was caught
Message="Object '/313ea683_ade8_4edd_9b25_d5a9566a83b4/st61eu4jxpjjvhgy1ts4zuuk_1.rem' has been disconnected or does not exist at the server."
Source="mscorlib"
StackTrace:
Server stack trace:
at System.Runtime.Remoting.Channels.ChannelServices.CheckDisconnectedOrCreateWellKnownObject(IMessage msg)
at System.Runtime.Remoting.Channels.ChannelServices.DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, IMessage& replyMsg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at EventsManager.SharedClass.WrapperClass.WrapperClassMethod(Object sender, EventArguments e)
at EventsManager.SharedClass.Hoster.CallClientEvent(Object Server, EventArguments e) in D:\Nitin Jain\RnD\RemotingRnD\Currently Working on this\Reminder By Remoting Intregrated with PDA - 080207\prjRemotingClient\Remoting Shared Class\EventsManager\Hoster.vb:line 143
at PDA.ProspectDatabaseApplication.frmActivityEntry.SaveRecord() in D:\Nitin Jain\RnD\RemotingRnD\Currently Working on this\Reminder By Remoting Intregrated with PDA - 080207\PDA-Remoting Server\ProspectDatabaseApplication\frmActivityEntry.vb:line 2063
|
|
|
|
|
Hi
As far as i know every MarshalByRefObject proxy has a limited lifetime which is by default 5 minutes. if you call a method on the object, the lifetime is increased by 2 minutes.
so if you don't raise an event for 2 minutes on the client, the proxy that presents the client to the server will die.
you can solve the problem by
a) adding an ISponsor that keeps the proxy alive
b) setting the lifetime in the InitializeLifetimeService method and use a more appropriate initial lifetime for the client proxy.
greets
m@u
|
|
|
|
|
thanks for ur reply.
But i already override InitializeLifeTimeService and set initializetime to 0 or nothing
So i think object should alive for the life time.
And if proxy object is dead, than how client can raise event at server.
Please do me fever...
|
|
|
|
|
We have to see the code you used to change the lease time. The lease, obviously, isn't being changed because it's still expiring.
|
|
|
|
|
i don't think the server is the problem. keep in mind that ANY MarshalByRefObject instance that is shared over remoting creates a proxy. so if your server can call a method on your client.
a) your client must be a MarshalByRefObject too (it'l create a proxy and everything...) so the problem might be that that proxy dies
b) i'm not sure if delegates are serialized or marshalled so there might also be a problem..
i'd suggest you take a closer look at the client implementation.
greets
m@u
|
|
|
|
|
Hello
I'm working with Visual Studio 2005 (VB)
When I polulate a listview (details) with a large amount of data (100 lines) the screen goes blank while filling the listview. The same goes when I fill a list of custom controls.
Is there a way to avoid this ?
|
|
|
|
|
How are you populatiing your list? If you are looping through a collection of some sort, you could try using Application.DoEvents() inside the loop .
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
Hi,
if your app becomes unresponsive while populating a control, then runs fine again,
you should try and speed up the populating action, or use a background thread
(with Invoke stuff). If the GUI is screwed even when the population is done,
you probably violated the cross-thread-access rules for Controls (again, Invoke).
Speeding up can be obtained by avoiding the constant recalculations, due to the
fact the control cannot guess when the last addition will occur, so it relayouts
things all the time. Use Control.SuspendLayout() and ResumeLayout().
For Controls that have an AddRange, that helps too.
Using Application.DoEvents() is a hack: it lets your GUI settle but does not
shorten the population time, and it will fail dramatically if it ever is executed
concurrently (depends on where your population code is called).
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
hi,
I intend to implement a client-server model wherein a few clients are connected to a server. Allow the clients to have secure communication (chat and/or file transfer) using the SSL protocol.Tunneling would be the most important thing to be implemented in this project.What I want to know is,
1.Can I use the TAP driver used by OpenVPN to handle the transmission of packets?
2.If yes, how can I use the driver while coding?
3.If no, can you suggest any open source drivers for VPN?
4.How to implement the SSL protocol?
5.To show that secure communication is taking place,would sniffing the transmitted packets be enough?
modified on Monday, February 11, 2008 6:44 AM
|
|
|
|
|
You're going to have to ask the people who wrote OpenVPN these questions. I've never used their library.
|
|
|
|
|
Hi,
can you give me code for deleting temp files and cookies or cache in vb.net or javascript?
Thanks & Regards
Ashish
Ashish K. Vyas
|
|
|
|
|
AshuVyas wrote: can you give me code for deleting temp files and cookies or cache
For which browser?
AshuVyas wrote: in vb.net
Possibly. You realise that the code has to run on the client? I.e. this can't be done in server side code in ASP.NET.
AshuVyas wrote: or javascript
Not possible. You have no access to the file system from Javascript.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I can't seem to figure out how to get VB to recognize's any of the public key type's supported by PHP/OpenSSL. Any ideas?
|
|
|
|
|
Have you solved this?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
I am having a hard time populating an structured array. (0,0),(0,1),and (0,2) populate fine but I cannot get the rest if to do so. This is small part of a BasketBall Game simulation project, and it is kicking my butt. Here is my code:
Option Explicit On
Option Strict On
Public Class Form1
Dim playerData(1, 2) As Player
Dim temp1 As Integer
Dim temp2 As Integer
Dim temp3 As Integer
Structure Player
Public offenseRank As Integer
Public defenseRank As Integer
Public shootRank As Integer
Public shotsTaken As Integer
Public scorePerQuarter As Integer
End Structure
Public Sub FillArray()
'populates array values
For x As Integer = 0 To 1
playerData(x, 0).offenseRank = temp1
playerData(x, 1).defenseRank = temp2
playerData(x, 2).shootRank = temp3
x = x + 1
Next x
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim randomGenerator As New Random
For x As Integer = 0 To 1
temp1 = randomGenerator.Next(8, 11)
temp2 = randomGenerator.Next(8, 11)
temp3 = randomGenerator.Next(55, 80)
x = x + 1
Call FillArray()
Next x
OffDisplayLabel.Text = CStr(playerData(0, 0).offenseRank)
DefDisplayLabel.Text = CStr(playerData(0, 1).defenseRank)
ShootDisplayLabel.Text = CStr(playerData(0, 2).shootRank)
Label1.Text = CStr(playerData(1, 0).offenseRank)
Label2.Text = CStr(playerData(1, 1).defenseRank)
Label3.Text = CStr(playerData(1, 2).shootRank)
End Sub
End Class
thanks in advance
|
|
|
|
|
Hi
Can you plz specify what exactly is the problem u are facing...
As from what I was able to c in the code
- The structure is defined before the object of it (I do not know weather it is allowed in VB, it was surely not allowed in some other old languages)
- You do not need to increment value of the loop variable (x in ur case) when u are using for loop
Good Luck
|
|
|
|
|
Dee Kay wrote: 'populates array values
For x As Integer = 0 To 1
playerData(x, 0).offenseRank = temp1
playerData(x, 1).defenseRank = temp2
playerData(x, 2).shootRank = temp3
x = x + 1
Next x
Look at what you did in this code. You setup a loop where on the first pass, x will be 0. You fill in your array, (0,0) (0,1) (0,2), then you increment x, so now it's 1, THEN YOU REACH THE "Next" statement, will will increment x again, so now it's 2. Since the For statement says 0 to 1, 2 is greater than 1, so the For/Next terminations, never filling in the (1,0) (1,1) (1,2) array values.
|
|
|
|
|
hi guys i dont know i am in the correct forum ,but i need help ..
actually i am working in vb.net (2005) and crystal reports ,
i am retrieving from data base and showing on a report, problem is that when there is a null value in the data base so on the report it remains blanck but i want to show a 0 value as it is a numeric filed and i am performing some calculations based on that field so if it remains blank i cant perform calculations correctly , i just want to display a 0 value when there is a null value in any row in a particular column,, thanks in advance
hello
|
|
|
|