|
I have alot of experince with VB6 and qbasic parallel (real world) interfacing, but how do you do it in VB.net. I want to upgrade to VB.net on my robot i am building but I cant find any APIs to do it with. ITs running Win2000PRo OS with VB.net
Any help would be awesome...thanks in advace
|
|
|
|
|
I have written a remoting project for the 1000 (I stopped counting) time. And still I can't get the events to work... the rest works fine, but when I add an eventhandler to my app I get this error:
Cannot find the assemblu ChatClient, Version=.... Curlture=neutral, PublicKeyToken=null.
This is appearantly my client assembly, but I don't get it why!
Can somebody tell me what the problem is?
Code for the client:
<br />
channel = New TcpChannel<br />
<br />
ChannelServices.RegisterChannel(channel)<br />
<br />
mgr = CType(Activator.GetObject(GetType(ClassOne), "http://localhost:89/Chat.soap"), ClassOne)<br />
<br />
AddHandler mgr.OnTextReceived, AddressOf mgrTextReceived<br />
Code for the server:
RemotingConfiguration.Configure("chatserver.exe.config")
Greetings....
|
|
|
|
|
a BIG d0h for me :P
I found the solution and it was too obvious to be true
Greetings....
|
|
|
|
|
Hi,
Is it some one out there who could please help me transelate this C# code to VB.NET?
int vPos=(index <= selectedBand) ? buttonHeight*index : buttonHeight*index+selectedBandHeight;
int height=selectedBand==index ? selectedBandHeight+buttonHeight : buttonHeight;
Thanks,
Richard
|
|
|
|
|
I believe that C# syntax can be accomplished with the IIf VB function.
Dim vPos as Integer = CInt(IIf(index <= selectedBand, buttonHeight * index, buttonHeight * index + selectedBandHeight))
Dim height as Integer = CInt(IIf(selectedBand = index, selectedBandHeight + buttonHeight, buttonHeight))
This code is off the top of my head and hasn't been tested, so be warned.
|
|
|
|
|
Thanks Matt, it did work just fine!
|
|
|
|
|
Hello,
I am building an application that requires data to be entered into a control that looks like the Data Grid. Basically, it should mimic the functionality of entering data into MS Excel. I know the Data Grid is primarily used to display data binded to a data source, such as a DataSet. Is there any way to display a blank data grid and use it for data entry? If not, what do you experts suggest that I do to get the results I'm looking for?
One possible solution that I came up with was to bind the data grid to the table that the data is destined for. Next, I would add one row of text boxes that would represent each column below the grid. The user could then add the record to the data grid (and underlying table) by typing the details into the the textboxes below the grid, followed by clicking the "Add" button. However, a grid will not appear unless there is data in the underlying table to be displayed. The empty data grid control does not look attractive on a form.
I remember building an application in vb 6.0 where I got around this by placing textboxes over the cells of the data grid control. However, I can't remember exactly how I did this, or if it would even work with the .NET data grid control.
Any help would be greatly appreciated
|
|
|
|
|
I want to add a PictureBox to another form. But when I go from form1 to form2, the picture in form2 won't show. Why is this?
I use this code:
dim frmForm2 as new form
frmForm2.showdialog
I've also tried just frmForm2.show
What am I doing wrong?
Should I create a new picturebox in code?
I need sleep....zzzzzzzzzz
Thank you
The Jazz Master 6000
DJ Badknees
Parma Grind Crew - www.geocities.com/parmagrindcrew
|
|
|
|
|
here ya go :
VB:
<font color="blue">Private</font> <font color="blue">Sub</font> Button1_Click(<font color="blue">ByVal</font> sender <font color="blue">As</font> System.Object, <font color="blue">ByVal</font> e <font color="blue">As</font> System.EventArgs) <font color="blue">Handles</font> Button1.Click
<font color="blue">Dim</font> frm <font color="blue">As</font> <font color="blue">New</font> Form2() <font color="darkgreen">'/// must say as new Form2() not Form</font>
frm.Show()
<font color="blue">End</font> <font color="blue">Sub</font>
hope this helps.
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
{
<font color="blue">switch</font>(twins)
{
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<font color="blue">break</font>;
}
}
|
|
|
|
|
Thanks A Lot
The Jazz Master 6000
DJ Badknees
Parma Grind Crew - www.geocities.com/parmagrindcrew
|
|
|
|
|
I am handling an upgrade from VB6 to VB.NET and want to use the opportunity to improve coding standards and overhaul some old code.
I would like to use the MS Code Advisor to check up the code before going into the transition phase. To do this I would like to extend the set of rules to cover a much broader range of coding standard rules. Apparently the Code Advisor can be extended in two ways; first by using VBScript regexps, obviously somewhat limited in scope; second by implementing the IRuleHandler interface to add your own rule classes. However althought the first is copiously documented (no doubt because it is self-explanatory) the second receives no attention whatsoever, and I can't google it anywhere.
Does anyone, know of docs on the interface and the available support routines?
Thanks
Onuk
|
|
|
|
|
i have a program that goes into a folder looks into each subfolder and gets all the .jpg files and stores the file names in an array which i then use to insert the path into a msde database. My problem is either one of two things happen
1.the form freezes but the program still does what it needs to
2.or the program simply just freezes
the machine i am using has 1 ghz processor and 786 mb ram and my uses will not have computers even close to this so anybody have any suggestions?
|
|
|
|
|
|
you mean something like this :
VB:
<font color="blue">Private</font> <font color="blue">Sub</font> Button3_Click(<font color="blue">ByVal</font> sender <font color="blue">As</font> System.Object, <font color="blue">ByVal</font> e <font color="blue">As</font> System.EventArgs) <font color="blue">Handles</font> Button3.Click
<font color="blue">Dim</font> someStuff <font color="blue">As String</font>
<font color="blue">Dim</font> i <font color="blue">As Integer</font>
<font color="blue">For</font> i = 1 <font color="blue">To</font> 4
TextBox1.AppendText(someStuff & " : part : " & i & vbCrLf)
<font color="darkgreen">'/// do your stuff here .</font>
<font color="blue">Next</font>
<font color="blue">End</font> <font color="blue">Sub</font>
putting your stuff to do where it says "TextBox1.AppendText"
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
{
<font color="blue">switch</font>(twins)
{
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<font color="blue">break</font>;
}
}
|
|
|
|
|
Thanks. But I don't quite understand how to implement that in my program. It's maybe best to show you the code in question.
<br />
Private Sub K_Sten_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles K_Sten.Click<br />
/.../<br />
End Sub<br />
<br />
Private Sub K_Sax_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles K_Sax.Click<br />
/.../<br />
End Sub<br />
<br />
Private Sub K_Pase_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles K_Pase.Click<br />
/.../<br />
End Sub<br />
<br />
Private Sub K_Klar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles K_Klar.Click<br />
/.../<br />
End Sub<br />
<br />
Private Sub Huvud_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
/.../<br />
End Sub<br />
<br />
Private Sub K_Ny_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles K_Ny.Click<br />
This is where I want to go back to: Sub K_Sten_Click; Sub K_Sax_Click; Sub K_Pase_Click; Sub K_Klar_Click.
All of my subroutines runs independent of each other.
<br />
<br />
Private Sub M_Avsluta_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles M_Avsluta.Click<br />
/.../<br />
End Sub<br />
<br />
Private Sub M_Om_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles M_Om.Click<br />
/.../<br />
End Sub<br />
//OT
|
|
|
|
|
are you saying you want to cause the triggering of all those buttons in an event? so the loop causes these to do something : Sub K_Sten_Click; Sub K_Sax_Click; Sub K_Pase_Click; Sub K_Klar_Click.
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
{
<font color="blue">switch</font>(twins)
{
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<font color="blue">break</font>;
}
}
|
|
|
|
|
No, I just want those Sub routines to be reset when clicked on a button.
//OT
|
|
|
|
|
Now I have fixed the problem.
//OT
|
|
|
|
|
In Visual Basic 6 in Highschool we used MMControl 6.0 in order to play .WAV files in our applications?
That Was a long time ago. Can anyone please tell me where I can find some code in order to play sounds in my Application
Thank You
The Jazz Master 6000
DJ Badknees
Parma Grind Crew - www.geocities.com/parmagrindcrew
|
|
|
|
|
in vb.net do this :
VB:
<font color="blue">Private</font> <font color="blue">Declare</font> <font color="blue">Function</font> sndPlaySound <font color="blue">Lib</font> "winmm.dll" <font color="blue">Alias</font> "sndPlaySoundA" _
(<font color="blue">ByVal</font> lpszSoundName <font color="blue">As String</font>, <font color="blue">ByVal</font> uFlags <font color="blue">As Integer</font>) <font color="blue">As Integer</font>
<font color="blue">Const</font> SND_SYNC <font color="blue">As Integer</font> = &H0
<font color="blue">Const</font> SND_ASYNC <font color="blue">As Integer</font> = &H1
<font color="blue">Const</font> SND_NODEFAULT <font color="blue">As Integer</font> = &H2
<font color="blue">Const</font> SND_LOOP <font color="blue">As Integer</font> = &H8
<font color="blue">Const</font> SND_NOSTOP <font color="blue">As Integer</font> = &H10
<font color="blue">Dim</font> SoundName <font color="blue">As String</font>, wFlags <font color="blue">As Integer</font>, x <font color="blue">As String</font>
<font color="blue">Private</font> <font color="blue">Sub</font> Button2_Click(<font color="blue">ByVal</font> sender <font color="blue">As</font> System.Object, <font color="blue">ByVal</font> e <font color="blue">As</font> System.EventArgs) <font color="blue">Handles</font> Button2.Click
SoundName = "D:\Knock.wav"
wFlags = SND_ASYNC <font color="blue">Or</font> SND_NODEFAULT
x = sndPlaySound(SoundName, wFlags)
<font color="blue">End</font> <font color="blue">Sub</font>
putting your sound file's name where it says "D:\Knock.wav"
hope that helps
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
{
<font color="blue">switch</font>(twins)
{
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<font color="blue">break</font>;
}
}
|
|
|
|
|
Thanks Again...You are a life saver!
The Jazz Master 6000
DJ Badknees
Parma Grind Crew - www.geocities.com/parmagrindcrew
|
|
|
|
|
Hi,
I have a question regarding the use of a hllapi application to screen scrape in XP. Currently I have a hllapi program that screen scrapes from a 16 bit dos app. to a terminal emulator (Attachmate's Accessory Manager) in Windows 95. The problem in converting this to XP is that the hllapi program uses an INT 7F call and the location in the vector table points to the location of a virtual device driver (vxd's are not supported in XP). I was wondering if there was a way to write a VB hllapi program that would kind of act the same way as the current program but without the direct memory calls. THANKS!!!
Jordan
|
|
|
|
|
Yes, there is a 32-bit Windows specification for HLLAPI, called WinHLLAPI. It's focused on C/C++, but you can call it from VB6/VB.NET through the proper "Declares".
I worked a lot with Attachmate products and most of them support WinHLLAPI. Actually, most 3270/5250 emulators support WinHLLAPI and they normally provide some screen scraping samples.
Other alternatives:
The drawback is that, HLLAPI (which you are using now) and its Win32 counterpart, WinHLLAPI, although fine for single user/single machine applications, it is awful slow and too memory hungry for high-performance server applications, In this case, I discovered that by writing a TN3270 emulator I got about a 15x faster application, also saving several tenths of MB RAM.
If there is a LU6.2 transaction available, I would definitively go for APPC. Microsoft's Host Integration Server can map, through a simple wizard, an APPC to a COM+ component, easily used from VB6/VB.NET.
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
I've created an interface using C++/ATL which I can then implement in a coclass. What I want to do is to now build a VB COM object which implements the same interface. Is this possible or can VB only *use* a C++ coclass I've implemented in a COM server?
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
how can we create a toolbar type thing with a close button on its title bar...like theOffice toolbars
anand
|
|
|
|