|
As stated in the article I quoted (my 2nd reply to your post) the Windows timers are not going to be as accurate as you need for this application.
No amount of application code in a high level language like VB, C, C++ etc... is going to do it for you. I think you'll need to create a device driver for your black box (essentially a new serial port driver) to handle the timing for you. This way the driver can operate at the kernel level and respond to interrupts rather than at the application level.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
I found this article on The Code Project[^] which describes the Windows OS timing. Hope it helps.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Dose anyone know how i can use RDA on a desktop application rather than a PDA, you would think that there must be some sort of solution.
Thanks
|
|
|
|
|
How can we change column header(Listview) forecolor and backcolor ?
mandev2005
|
|
|
|
|
Hi
I want to connect the datagrid with access programically .
I mean i want to fill the datagrid with data at run time.
I am using oledb
I am using the following code
Set rs = New ADODB.Recordset
rs.Open sql, con, adOpenStatic, adLockBatchOptimistic, adCmdText
Set dg1.DataSource = rs
dg1.Refresh
Can somebody please send me any link or code?
Please help me
Thank You
Pankaj Garg
-- modified at 7:39 Tuesday 2nd May, 2006
|
|
|
|
|
I have a data grid which shows the clients that I have in a database, then when I press the button to add a new client, it is successful, however when I get redirected back to the datagrid the client that I just entered doesn't show up as the last client. In order to make it work i have to make a refresh button, but I want it done automatically.Any ideas ?
I appreciate your help
thanks
ad
scar
|
|
|
|
|
Are you using Winform or Web Form?
Anywayz I think you first add client add code
then update your dataset
then refresh your dataset
then select data again.
Hope you will understand what i mean to say..
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
hello, i want to know how to make a startup program. when the computer starts up i want the program to start up immediately! how can i make this happen
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Please search the forums, this has been anwser several times!
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
make an entry into your registry. e.g., ur path of program to be executed is c:\xx.exe,
> just goto start|run & type regedit
> follow the following dir
HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN
> make a string value on the right side say xx
> double click on xx entry and enter the path(say c:\xx.exe) of your appl in value textbox
> restart ur system & check it
Lxcite's Planet
... the ultimate solution
-- modified at 7:32 Tuesday 2nd May, 2006
|
|
|
|
|
My VB app uses a form to input the report parameters and call a second form containing the crystal object with the formated report with subreports, this works fine until the report form is closed and the user enters a second set of parameters in the parameter form and calls the report form again, The code that logs the subreports into the database fails stating "Object reference not set to an instance of an object"
For index = 0 To objReport.ReportDefinition.Sections.Count - 1
For intCounter = 0 To _
objReport.ReportDefinition.Sections(index).ReportObjects.Count - 1
With objReport.ReportDefinition.Sections(index)
If .ReportObjects(intCounter).Kind = _
CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
mySubReportObject = CType(.ReportObjects(intCounter), CrystalDecisions.CrystalReports.Engine.SubreportObject)
mySubRepDoc = mySubReportObject.OpenSubreport(mySubReportObject.SubreportName)
For intCounter1 = 0 To mySubRepDoc.Database.Tables.Count - 1
mySubRepDoc.Database.Tables(intCounter1).ApplyLogOnInfo(ConInfo) 'sp;
mySubRepDoc.Database.Tables(intCounter1).ApplyLogOnInfo(ConInfo)
Next
End If
End With
Next
Next
the code loops thru the sections to find subreports and logs them into the DB but only works on first execution.
Any suggestions?
|
|
|
|
|
Hi to all,
I have a question for anyone who can help me on the subject custom controls in design time.
What i want to achieve is following:
how can you create a method/function in the propertypage in the visual studio IDE just klike the ones you have with like for example the SQLDataAdapter (in the help/description field some links appear with behind that some wizard functionality). Anyone any ide how to do that? I don't seem to find any good example anywhere.
Another thing i wanna do (i know i ask a lot, but it aren't common things in my eyes so that why i post everything here ) is to add custom section in the app.config during design time ( so not to the compiled app.exe.config !!!!!) What is the easiest way to do such a thing, i mena can i just use the executing aasembly name? or is there a catch.
For thos who can help me, many thanks in advance.
Mike Martin
mike martin
|
|
|
|
|
My system is built in VB,
the problem is some of the DLL and OCX files r not working properly, although i've tried to copy them from VB setup file but its still not working properly, i think its a dll hell problem, how can i make my system to refer to the dll of my choice.
pls help.
|
|
|
|
|
What version of VB ? What do you mean by 'not working properly' ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
OCX files and ActiveX dlls need to be registered.
Use the regsrv32.exe command line, or use the package and deployment tool to build a release for your setup that automatically registers all the dependencies.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Dear All,
I always encounter syntax error on INSERT TO.
I am sure my code is correct but I do not know where go wrong.
Below is my code.
Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click
Me.Cursor = Cursors.WaitCursor
Dim row As DataRow = dataTable.Rows(currRec)
txtdatefrom.Text = datestart.Value.Date.ToString
txtdateto.Text = DateEnd.Value.Date.ToString
row.BeginEdit()
row("Ship_Name") = ComboBox1.SelectedItem
row("Container") = Container_SizeTextBox.Text
row("datefrom") = txtdatefrom.Text
row("dateto") = txtdateto.Text
row("DateCreate") = Date.Today
row.EndEdit()
dataAdapter.Update(ds, "shipment")
ds.AcceptChanges()
ToggleControls(True)
btnnew.Enabled = True
insertSelected = False
Me.Cursor = Cursors.Default
MsgBox("Record Created")
End Sub
Private Sub InitializeCommands()
' Preparing Insert SQL Command
dataAdapter.InsertCommand = conn.CreateCommand()
dataAdapter.InsertCommand.CommandText = "INSERT INTO shipment " + _
"( Ship_Name, Container, datefrom, dateto, DateCreate)" + _
"VALUES( @Ship_Name, @Container, @datefrom, @dateto, @DateCreate)"
AddParams(dataAdapter.InsertCommand, "Ship_Name", "Container", "datefrom", "dateto", "DateCreate")
end sub
Private Sub AddParams(ByVal cmd As OleDbCommand, ByVal ParamArray cols() As String)
' Adding Hectice parameters in SQL Commands
Dim col As String
For Each col In cols
cmd.Parameters.Add("@" + col, OleDbType.WChar, 0, col)
Next
End Sub
Can anyone please advise.
Thank in advance....
Jack Wong
|
|
|
|
|
Hi,
I have created a proxy socket with a TCPListener which receives client connections and sends request to the backend webserver and sends the response back from the backend server to the clients.
In this excercise, the HTML part is getting transferred correctly but the Images are not getting transferred. I am able to transfer only BMP images.
After receiving the response from the backend server, I check if the mime type returned is text or not. If it is text then I convert the bytes into string and pass on to the client socket. If it is not text(i.e. image) then send it in the same byte form as sent by the backend server. This works only for BMP images and not GIF or JPG images.
please help
|
|
|
|
|
Visual Basic 2005 Express Edition:
My application creates a one page report and prints it out. The page includes an image.
Now, I would like to save that page to a file, so, that it could later be retrieved and viewed on the screen and also have the ability to reprint it.
|
|
|
|
|
You could print it to a pdf printer driver,
or print it to an EMF spool file and use the EMF Spoolfile Viewer in my articles on this site to print/preview it thereafter
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
OK, but, which one should I go with (I am planning to market this program)?
|
|
|
|
|
I recomend the pdf way - it is a defacto industry standard imo
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
How do I implement a pdf printer driver?
I already created the printed page using:
.DrawString
.Graphics.DrawRectangle
.DrawImage
system.Drawing.Printing.
PrintPreviewDialog()
|
|
|
|
|
The code below got PDFcreator to create a PDF file, but, it didn't use my .PrintFileName or my .PrintToFile = True.
I want it to create the PDF file without the user having to enter the filename or to have to check the "Print to File" box. In fact, I don't even want a print dialog, I just want PDFCreator to write out the PDF file without the user knowing anything about it. Then, I will do a PrintPreviewDialog() that will ask him if he wants a hard copy.
Dim dlg As New PrintDialog()
dlg.Document = mDoc
With mDoc.PrinterSettings
.PrinterName = ("PDFCreator")
.PrintFileName = (PrintFileName)
.PrintToFile = True
If dlg.ShowDialog = Windows.Forms.DialogResult.OK Then
mDoc.Print()
End If
End With
|
|
|
|
|
hi,
how can i split a string of word into one word using vb6?
for example :
i want to split a word of "download"
to be one word
like this "d","o","w","n","l","o","a","d"
thank you for your kindness...
Ihsan
|
|
|
|
|
I'm not 100% sure what you mean, but I think this might be what youre after:
<br />
dim sWord as string<br />
dim sSplit() as string<br />
sWord = "download"<br />
redim sSplit(len(sWord)-1)<br />
dim iPos as long<br />
for iPos = 1 to len(sWord)<br />
sSplit(iPos - 1) = mid(sWord, iPos, 1)<br />
next iPos<br />
This will give you an array of single character strings; sSplit(0) = "d", sSplit(1) = "o", etc.
|
|
|
|