|
I used to think Ctrl-Alt-Delete was a special combination which couldn't be easily intercepted by user applications. I guess it would require some code injection or some other clever trick to capture it, but it may require less work than using a dedicated display. Well, I am sure both would provide endless hours of fun
|
|
|
|
|
First - Obviously you already have the code for setting the top z-order (like through a Windows API call), but what I am guessing may be happening is that another app/game is itself grabbing top z-order. So what you may want to try is a form timer than sets the Access window to top z-order again.
Second - I appreciate the benefits of Access more than most, but I really don't think it's the right solution in this case.
Third - I'm not an expert in this area, but I think that there will always be a chance that a game will "override" the standard Windows elements and essentially take over the display, making it impossible to have your app on top. Again, I do claim ignorance in this area as I've not dealt with game development or direct interaction with Windows display control (other than through Visual Studio)
|
|
|
|
|
Thanks G-Tek. I have build this application using vb6 before, but now i try to build it using microsoft access. Based on your comment and another opinion in other forums, so i think this is impossible to make sure my form always on top in all type of games. Maybe, i must try to run a new desktop to give information about the time used (without minimize the game). But seems it is not work properly in microsoft access, but works well in vb6. Is this metode just can to applied in executable (.exe) files? Because if i try using this code to show my application (microsoft access) in new desktop, the code failed to create a new desktop, but works if i use the executable file. (Based on code from: http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx and http://www.vbaccelerator.com/home/vb/code/libraries/Windows/Creating_New_Desktops/article.asp
|
|
|
|
|
Access handles "window handles" (hwnd) differently than VB applications. As you have likely already seen - when you are making Access top most you actually have to make the "Micrsoft Access Application" top-most (not your form within Access), whereas in VB you are making your form topmost. This makes handling of window specific functions (like topmost, or drag & drop) more limiting and difficult to perform reliably. This type of behavior is one of the reasons that activex controls that work fine in VB may not work at all in Access. I've also had varying success with Windows API calls (used in the links you sent) and since they are most often used by people in Visual Studio, rather than Access, it can be difficult to get much support in resolving issues (including the issue that you're having). I did a lot of work in Access many years ago and have done things with Access that most others didn't think was possible (because most developers don't see Access as a real platform, largely because many people that use Access don't know what they heck they're doing!) - it can be a great platform for the right person to develop pretty great solutions in a small timeframe, but it definitely has its limitations... and for your needs I think Visual Studio is a better approach. I'd also recommend you upgrade to .net rather than using VB 6 - you can get the Visual Studio express edition which should meet your needs (http://www.microsoft.com/express/[^].
|
|
|
|
|
Games that work don't output video through DirectX, the ones that do not work use DirectX.
DirectX based applications are allowed to use dedicated video output, which leads to a different way to display stuff that has nothing to do with window handles or the desktop. It's na area Forms don't touch. DirectX is needed to display over DirectX
|
|
|
|
|
I was actually wondering if it was related to DirectX, but since I've not done any work in that area I really didn't know. That makes complete sense though.
|
|
|
|
|
You can't use forms to display over directX based games, they use a dedicated video buffer to display directly to the display that the Forms can't touch. It's simply a whole different way to display stuff. You will have to interop with DirectX to acheive that (out of my league).
With games like Counter Strike work because they are displayed with OpenGL or other engines that do not use dedicated video output.
Refer to this WF forum thread for more info:
http://social.msdn.microsoft.com/forums/en-us/winforms/thread/0E65F2E7-E277-4461-85BC-95B03B556CDF[^]
Regards,
Fábio
|
|
|
|
|
I accomplished something like this a few years ago by using a directx proxy dll. Using a custom proxy for directx lets you inject and display whatever you want on top of a directx game. See this site for details: http://www.mikoweb.eu/index.php?node=21[^] I used that code as a starting point and I created a stats/info box for an MMO similar to the forum post linked above.
It worked well in my situation but it may be difficult to support many different games, as you will need to make sure that your proxy directx dll is loaded by each individual game.
|
|
|
|
|
Wow...i will try this. Thank you!
|
|
|
|
|
I don't find any guide to use this directx proxy dll, can you help me?
|
|
|
|
|
hi,
how do i detect available com ports and display it in the ComboBox?
|
|
|
|
|
This method[^] gives all ports present. They could be in use though, the only way I know of to detect that is by trying to open them, one by one.
|
|
|
|
|
Rajesh B --> A Simple Programmer <--
|
|
|
|
|
You can use WMI, but it's much more painful and less portable. This is for information only, GetPortNames is the best way to do this.
|
|
|
|
|
hi,
i have written the code as shown below,i want to read data from serial port and let it display on the textbox.I compiled the codes and there's nothing wrong with the codes.However,i am not able to read incoming data.Could you help me take a look at my codes?
Public Class Form1
Dim dset As New DataSet
Dim dAdapter As OleDb.OleDbDataAdapter
Dim ConObject As New OleDb.OleDbConnection
Dim TotalRows As Integer
Dim Sel As String
Private Sub OpenPORT1(ByVal PortNum As Integer)
If SerialPort1.IsOpen Then
SerialPort1.Close()
End If
SerialPort1.PortName = "COM" + Convert.ToString(PortNum)
SerialPort1.BaudRate = 38400
SerialPort1.Parity = System.IO.Ports.Parity.None
SerialPort1.StopBits = System.IO.Ports.StopBits.One
SerialPort1.RtsEnable = True
SerialPort1.Open()
End Sub
Private Sub ResetBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ResetBtn.Click
Dim cBuilder As New OleDb.OleDbCommandBuilder(dAdapter)
Dim counter As Integer
TextBox1.Clear()
display_box.Clear()
RS232.Clear()
TotalRows = dset.Tables("EMSdatabase").Rows.Count
If TotalRows > 25 Then
For counter = 25 To TotalRows - 1
dset.Tables("EMSdatabase").Rows(25).Delete()
dAdapter.Update(dset, "EMSdatabase")
Next counter
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ConObject.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Users\pohyingling\Desktop\development of an enviroment monitoring sys\EMS\EMS\EMSdatabase.mdb"
ConObject.Open()
Sel = "SELECT*FROM ems"
dAdapter = New OleDb.OleDbDataAdapter(Sel, ConObject)
dAdapter.Fill(dset, "EMSdatabase")
ConObject.Close()
TotalRows = dset.Tables("EMSdatabase").Rows.Count
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If InStr(display_box.Text, "") Then
dAdapter.Update(dset, "EMSdatabase")
End If
End Sub
Private Sub StartBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartBtn.Click
Timer1.Enabled = True
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If IsNumeric(RS232.Text) = False Then
RS232.Text = InputBox("Enter waspmote COM port no'")
Else
Call OpenPORT1(Convert.ToInt16(RS232.Text))
display_box.Text = SerialPort1.ReadExisting
End If
End Sub
Private Sub DisplayDatabaseBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayDatabaseBtn.Click
Dim Counter As Integer
Dim Data As String
TextBox1.Clear()
TotalRows = dset.Tables("EMSdatabase").Rows.Count
For Counter = 0 To TotalRows - 1
Data = dset.Tables("EMSdatabase").Rows(Counter).Item("Data:")
TextBox1.Text = TextBox1.Text + Data + vbNewLine
Next Counter
End Sub
Private Sub deleteBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles deleteBtn.Click
Dim cBuilder As New OleDb.OleDbCommandBuilder(dAdapter)
End Sub
End Class
|
|
|
|
|
dusk85 wrote: Call OpenPORT1(Convert.ToInt16(RS232.Text))
display_box.Text = SerialPort1.ReadExisting
serial data needs time to get transmitted; you opening the port and getting "all the data" right away results in no data at all. No surprise here. You need either a fixed delay (say 1 second to receive up to 1000 bytes at 9600 Baud), a timer-based approach that polls the port (i.e. a repetitive Read rather than a single ReadExisting), or best an event driven approach (see SerialPort.DataReceived). I suggest you read up on SerialPort class and some examples.
|
|
|
|
|
dusk85 wrote: and there's nothing wrong with the codes
If this was the case, you wouldn't have a problem and you wouldn't be here, would you?
Luc is correct. Your code is reading all of the data that is available at the moment ReadAllBytes is called. It does NOT wait around for any remaining bytes to show up until there is a complete response. After all, how could it possibly know what makes up a complete response?
Your code has to be rewritten to get the data in chunks, whenever they become available, building a response, chunk-by-chunk, until YOUR CODE determines that it has received a complete responce, then it can send that response to the code that appropriately handles it.
|
|
|
|
|
I am getting the following error message "Missing parameter values." when I am trying to print directly to the printer. Below is my code. Works perfect if I want to view on screen but get the above error message when I try to print direct to my printer. If I did not have any parameter code etc, prints no bother to printer.
Dim cr As New ReportDocument
Dim param1Fields As New ParameterFields
Dim param1Field As New ParameterField
Dim param1Range As New ParameterDiscreteValue
cr.Load("c:\MyReport.rpt")
param1Field.ParameterFieldName = "PassedParameter"
param1Range.Value = 123456
param1Field.CurrentValues.Add(param1Range)
param1Fields.Add(param1Field)
CrystalReportViewer1.ParameterFieldInfo = param1Fields
'View Report
'CrystalReportViewer1.ReportSource = cr
'Print straight to printer
cr.PrintToPrinter(1, False, 0, 0) '(1, False, 0, 0)
modified on Friday, November 26, 2010 5:21 AM
|
|
|
|
|
IS_Assessor wrote: CrystalReportViewer1.ParameterFieldInfo = param1Fields
I suspect your problem is here - you are assigning the parameter to the Viewer object, not the report document.
|
|
|
|
|
Hi,
Thanks for replying.
I tried the following but still got the same message.
cr.DataDefinition.ParameterFields("PassParameter").ApplyCurrentValues("123456")
I agree I was assigning the parameter to the viewer object but I just cannot seem to get the syntax right to assign to cr.
What is the correct syntax as I have tried all sorts code?
|
|
|
|
|
try this:
crReportDocument.SetParameterValue(ParameterName, Value)
|
|
|
|
|
Works a treat now.
A big thank you and have a great weekend.
|
|
|
|
|
Central_IT wrote: Works a treat now.
A big thank you and have a great weekend.
If you are that pleased then at least have the courtesy to give the guy a 5 vote!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I have a vb.net application that has to be published on the server to a specified path.
After publishing, when I try to install the application, I get the below error msg:
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\agbvseng14\datas\SOFT\Easy_ECN\Nouveau dossier\EASY ECN.application resulted in exception. Following failure messages were detected:
+ Downloading http:
+ Unable to connect to the remote server
+ No connection could be made because the target machine actively refused 180.30.4.18:80
Not sure how to handle this problem.
Any suggestions will be helpful.
Thanks in advance.
modified on Monday, November 29, 2010 7:47 AM
|
|
|
|
|
Your server machine refused the connection for some reason. What's the O/S the server (agbvseng14) is running? Which version of IIS is it running?
|
|
|
|