|
I'm currently testing an application written in VB.NET using Mecury WinRunner. WinRunner doesn't seem to have very good support for the Windows Forms DataGrid control, so I'm planning on writing a DLL to work as a layer between WinRunner and the control. I'm not very familiar with .Net, most of the programming I do is in C++ using the Win32 API. With the Win32 API you can communicate with most controls by using the SendMessage function. Does the datagrid control respond to messages, or would it be possible for me to somehow clone the control only knowing it's HWND? I need to be able to access the data in the control, as well as be able to get/set the currently selected row, column, or cell. Any help would be greatly appreciated.
|
|
|
|
|
Hi Guys, I have a baffling problem with the MSComm control in a VB6 app I'm writing. I'm trying to send a binary command out the serial port, then read a binary response. The command is 6 bytes and the response is 17. When I single-step over the .Output statement, everything works just fine. But if I set the breakpoint after the .Output statement, i.e. I'm executing at full throttle through the .Output, the received data is mostly lost. I do wait until .OutBufferCount goes to zero and DoEvents to make sure any messages are getting processed.
Another strange symptom is that I'm not seeing any OnComm events. I've set .RThreshold = 1 to try to catch the response data byte by byte, but not a blip from the OnComm event handler.
Here's the snippet of initialization code I'm using:
With MSComm1
.CommPort = Port
.Settings = Baud & "," & Parity & "," _
& DataBits & "," & StopBits
.RTSEnable = True
.DTREnable = True
'read entire buffer when Input is used.
.InputLen = 0
'we're dealing with binary data
.InputMode = comInputModeBinary
.RThreshold = 1
.PortOpen = True
End With
And here's what I'm doing in the command/response code:
'everything works fine if I put a breakpoint on the following
'line and single-step over the .Output statement
MSComm1.Output = cmdGetData
Do Until MSComm1.OutBufferCount = 0
DoEvents
Loop
'this hangs because we never get the full 17 bytes of data
While MSComm1.InBufferCount < 17
DoEvents
Wend
Lastly, everything seems fine when using ASCII (string) data, so I'm wondering if there's something peculiar about binary.
Thanks in advance for any insights.
-- Dave
QRZ? de WAØTTN
|
|
|
|
|
Need a quick class/component that is free in order to create email with SMTP. I am right in thinking there is no built in class to do this? I also need to include attachments.
|
|
|
|
|
Actually, there is a class. There all located within the System.Web.Mail Namespace. Look it over, and if you still can't understand how to use them, feel free to email me
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
How can i Print the contents of the listview control to Printer .Can any body help me with source code.
|
|
|
|
|
the total row will not scroll when the scrollbar scroll
|
|
|
|
|
Hi,
I am looping through a database and creating dropdown
lists dynamically using the combobox control and binding
it to an arraylist with valid values. However I must be
doing something wrong because when I run the code, all the
comboboxes are linked together, in other words if I change
the value of one of the comboboxes, all of them are
changed. Here is some sample code:
------------------------------------------------
Dim fieldlabel As Windows.Forms.Label
Dim filefields As Windows.Forms.ComboBox
While myreader.Read
If myreader("FLD_0") <> "/" Then
Panel1.Controls.Add(New Windows.Forms.Label)
fieldlabel = Panel1.Controls(controlindex)
fieldlabel.Text = counter & ") " & X3Reader("FLD_0")
fieldlabel.Location = New Point(1, ycord)
fieldlabel.Size = New Size(100, 20)
fieldlabel.Name = "label" & counter
controlindex += 1
Panel1.Controls.Add(New Windows.Forms.ComboBox)
filefields = Panel1.Controls(controlindex)
temparrlist = New ArrayList
temparrlist = filefieldsarrlist
filefields.DataSource = temparrlist
filefields.DropDownStyle = ComboBoxStyle.DropDownList
filefields.Size = New Size(100, 20)
filefields.Location = New Point(105, ycord)
filefields.Name = "map" & counter
controlindex += 1
ycord += 30
counter += 1
controlindex += 1
End If
End While
-------------------------------
Any ideas?
|
|
|
|
|
The application like to monitoring the operation of mechine to link with computer???Please reple!Thanks.;
yeowlee4u
|
|
|
|
|
We need alot more information on what you want to do and how the two machines are connected!
Are they connected over some type of network or serial port or some custom A/D card, or what?
RageInTheMachine9532
|
|
|
|
|
Operator machine like monitoring operator machine
|
|
|
|
|
Hi,
How to do transfer of files using VB and HTTP protocol? Actually wnat to transfer a file in unix which has only HTTP port enabled and all other port disabled. So would like to know how to do it.
Thanks
vishal
|
|
|
|
|
You can try using the inet control with GET / POST http commands
|
|
|
|
|
Hello,
I'm trying to build a application in ASP.NET for integration with VSS. I wrote a class library in VB.NET and tested it on normal Windows Application. It is running OK but when i call the same from a ASP.NET page, the connection to the VSS database fails. the error says "cant connect to database raj(its the username not DB name), Select another database".
please help me in figuring out the problem.
Also, is it possible to extract a perticular version of a source code from VSS and put it into a external folder??
thanks,
Raj
|
|
|
|
|
Hi all .. I have developed a program called Memorizer .. it provides many funny services .. like : Clock , Alarm , Showing random messages while you are working on your PC .. Changing characters as you do with MS Office....and you can make it do some animations ..and speaks text you write in a textbox .. furthermore .. you can open a textual file and it will read it for you ... it responds to some actions inside the program ..by playing proper animations and speaking statemnets suit the situation...The problem is that .. when I run it on My Machine it speaks the words inside the Ballon .. and I hear the voice ..but when I distributed it to the others .. the words it speaks appear in the ballon but they cannot hear what he speaks .. noting that the animations it play make some sound and they hear it ... Now I want to know how to show the ( Advanced Character Options ) dialog box from my VB.NET code .. to make the users try the checkbox of " Speak words In ballon" so how can I show it to my users .. or is there any other way .. give me a hand plz .. thanks for your co-operation ..
Kareem Shaker
|
|
|
|
|
I've got a string variable that goes through heavy string manipulation that may or may not leave the string with a 'carriage return - line feed' at the end.
It is declared like this:
Dim buf as String<br />
Dim filenum as Integer
Now i'm trying to output this string into a file and this is JUST ONE of the ways i've tried:
filenum = FreeFile<br />
Open "newfile.txt" For Output As filenum<br />
Print #filenum, buf<br />
Close filenum
Now here's my problem: No matter how i try this, after opening the file in an external editor I see that a 'carriage return - line feed' has been added to the end. I can't seem to avoid this and it's DRIVING ME CRAZY!
When 'buf' has a final character of '.', then when I open the file in my editor and press <Ctrl>+<End>, I expect the cursor to fall to the right of the '.' not on the blank line below. And before you ask, the editor I'm using doesn't do anything extra like ensuring a blank last line (like the VB environment).
I've tried various combinations of: opening the file in binary or text mode, opening for input or random, using the 'Print' or 'Put' function.
Can anybody tell me how to output a string to a file WITHOUT adding a blank last line?
thanks,
nebbish
Smart, Sexy, Sane. Pick two.
|
|
|
|
|
try with :
write #filenum, buf
Pablo75
|
|
|
|
|
Well thanks for the idea Pablo75, but the 'Write' statement added a double quote at the beginning and again at the end of the file. Essentially the whole file was enclosed in one set of double-quotes.
And by the way, for anybody else whose reading this thread as well, I've had success when opening the file in binary mode and using the 'Put' function EXCEPT when I am replacing an existing (text) file with a string that is shorter. In those cases, opening the file in binary does not reset the length of the file, so the file ends up being my new string followed by the old contents of the file that existed beyond the length of the new string.
Can I open an existing file in binary and somehow reset the file length? discarding the old contents entirely?
thanks,
nebbish
Smart, Sexy, Sane. Pick two.
|
|
|
|
|
Can you have public properties in a web service? I need to set some variables used inside the web service.
|
|
|
|
|
I want to write a function in VB dll which is to be exported in VC++. I created the activex dll and wrote a simple function which displays dialog box in module file. Pl tell me the syntax to export this function.
|
|
|
|
|
VB dlls don't have "exports" in the standard dll sense. Instead you use CoCreateInstance to instantiate them and use the ActiveX mechanism with them.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Anyone know of a tool that will track down memory leaks in vb6.0?
I don't do VB much - but i have some code to maintain that is leaking quite heavily...I know the principles, release my objects, etc..but I don't have the time to go over other people's code and find them...Thanks!!!
Marcus Spitzmiller
"Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer
|
|
|
|
|
Numega Bounds Checker:
http://www.compuware.com/products/devpartner/bounds.htm[^]
This product integrates right into VStudio and works very well.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Thanks!
Marcus Spitzmiller
"Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer
|
|
|
|
|
I'm working with text files right now and I'm confused about a certain method. In many code examples, I see that after people put a string in a text box, they usually follow it up with a statment like "textbox1.select(1,0)"
What does this do? Why is it important? What do the parameters mean?
The VB help didn't really help me out that much.
Thanks for all your help!
The Jazz Master 6000
DJ Badknees
Parma Grind Crew - www.geocities.com/parmagrindcrew
|
|
|
|
|
This allows you to select text inside the textbox. By Select I mean highlighted as you do with a mouse by clicking and dragging.
'Fill the text box with some chars
textbox1.Text = "ABCDEFGHIJ"
'This line will highlight the first 3 characters
'in the text box
textbox1.Select(0,3)
It is located in the help here:
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformstextboxbaseclassselecttopic1.asp?frame=true[^]
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|