|
I know of some stuff up on vbAccelerator.com
for burning cd's Don't know if it will help or not.
vbAccelerator.com
DotNet stuff:
http://www.vbaccelerator.com/home/NET/Code/Libraries/Writing_CDs/index.asp
VB 6 Stuff
http://www.vbaccelerator.com/home/VB/Code/Libraries/Writing_CDs/index.asp
http://www.vbaccelerator.com/home/VB/Type_Libraries/IMAPI_(CD_Burning)/article.asp
May be it will help
progload
|
|
|
|
|
Thanz Buddy, will go and take a look...
|
|
|
|
|
I have a form (form1) with a datagrid and i want that: when i press F8 the data in the selected row go to some textboxs in another form (form2). The data is in a dataset.
the keypressed works fine and i know which row is select but i can't put the data in the other form. i used one way to make the data to go to the form2, i make the controls of the form2 shared but i think that this isn't the better way.
So i need some help. If you have one example that can help me, it would be good.
Sorry if the english isn't the better.
|
|
|
|
|
Have the constructor of the second dialog take a DataRow, and pass the row in from your dataset.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Do you have some example how can i make that?
One more thing, i want that when the key is pressed the form2 close and the data go to the textboxs in form1 at the same time, without do anything more.
Thanks for the help.
|
|
|
|
|
// Constructor that takes a DataRow
public MyNewClass(System.Data.DataRow dr)
{
// Read the data out of the row to populate your internal variables here.
}
// Don't let anyone use the default constructor
private MyNewClass(){};
makeko wrote:
One more thing, i want that when the key is pressed the form2 close and the data go to the textboxs in form1 at the same time, without do anything
If Form2 is modal, then just check the DialogResult ( if there is a Cancel button ) and then act on it like this:
In Form2:
OnClose
{
this.MylocalVar = this.MyLocalTextBox.Text; // Because the textbox will be destroyed
}
In Form1
Form2 dlg = new Form2();
if (dlg.ShowDialog() == DialogResult.OK)
{
this.TheTextBox.Text = dlg.MylocalVar;
}
Of course, it should be exposed as a get only property, and set as an internal variable that the property returns.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I need to figure out how to write code to swap the contents between 2 textboxes by way of a button. Also, I need to learn how to clear the contents of both TextBoxes by clicking the form.
I appreciate your help.
Jason
|
|
|
|
|
string s = TextBox1.Text
TextBox1.Text = TextBox2.Text
TextBox2.Text = s
TextBox1.Text = Textbox2.Text = ""
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am pasting your reply here and responding to it. Please respond to the board. It may help someone else to read this.
I am learning VB.Net and doing it all on my own so that I can better
understand it from a financial standpoint.
Bare with me because I am learning and not a pro, not even close to an
amateur!!!! :)
I put the code into the Private Sub Form1_Load that you posted on the
board and
Dim String as Text
But something still isnt right........
Am I missing something? Sorry for being an idiot!!!
The code I gave you was meant to provide a template, sorry that I assumed that was obvious.
First of all, to add a button, just drag it onto the form in the design view. I believe double clicking it will add a method that is called when it is clicked, otherwise the properties window has a lightning type icon, that shows you possible events, you can type a name into the 'Clicked' event to define one.
Now, your two text boxes have names. You can change them in the properties box as well ( right click on the textbox and choose properties, although if the window is visible, just clicking will do ). A TextBox has a Text property, so TextBox1.Text assumes one of your text boxes is called TextBox1. I believe that in VB.NET, Dim s as string is the right code to create a temporary string variable ( not string s ), so if you substitute the names of your textboxes,
Dim s as string
s = Textbox1.Text
Textbox1.Text = Textbox2.Text
Textbox2.Text =s
should swap the strings. And if you create a button/event handler for the 'clear' operation,
Textbox1.Text = Textbox2.Text = ""
will clear the text boxes. What's happening here is that all the other values get changed to the last one. You can put it on two lines if you find that clearer:
Textbox1.Text = ""
Textbox2.Text = ""
I hope that helps....
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks!!! I think I have a good handle on it now from reading this post.
I'll try this tonight and let you know how it goes tomorrow. This is great information. Thanks again Christian!!!
JB
|
|
|
|
|
Ok I have got it working.......
I was missing a few main points, one being the click event for the Form1.
In order to clear both textboxes, you will need to go to the form, Base Class Events, then Click and write code as follows:
Textbox1.text = " "
Textbox2.text = " "
this clears the textboxes by clicking the form itself.
Thanks again Christian Graus
Jason Baggett
|
|
|
|
|
hellow to all
i am trying to make insert statment into a access database ..
i write the folloing statment
MyOledbCommand.CommandText = "Insert Into Messages " _
& "(firstname,lastname,username,password,date) " _
& "Values (" & "'" & String2 & "', " & "'" & String3 & "', " & "'" & String4 & "', " & "'" & String5 & "')"
but i keep getting the msg Syntax error insert statment ..
the more odd thing is that i use the same statment in other form and it run's fine !
what could be the problem ..
i had tried million thing and possibilities nothing is working
thxx a lot
|
|
|
|
|
maybe the problem isnt with your statment, but with your connection?
|
|
|
|
|
You may wnat to check the values of each string, If one of them contains a single quote mark, then your insert statement will fail.
|
|
|
|
|
"Date" is a VB reserved word, don't take it a habit of using reserved words, however u can still use it as a DB fieldm enclose it with "[]"
MyOledbCommand.CommandText = "Insert Into Messages " _
& "(firstname,lastname,username,password,[date]) " _
& "Values (" & "'" & String2 & "', " & "'" & String3 & "', " & "'" & String4 & "', " & "'" & String5 & "')"
good luck
|
|
|
|
|
hello everybody,
first off i wanna say thanks to everybody behind this website, its a great source of knowledge.
now im having trouble adding mouse events to the cards being drawn using the cards32.dll functions, ive looked around but cant find anything that would explain what im supposed to do.
what i need is to be able to click/drag (interact) with the cards drawn using cdtDrawExt function.
thanks in advance.
|
|
|
|
|
I'm attempting to tackle a problem I have no experience with. Does anyone know a good resource where that I can use to be able to interface with a barcode scanner in order to navigate a application. (The application I'm creating has mouse or keyboard input devices, only a barcode reader. It will ONLY allow a user to scan an object and progress/navigate throughout the application by means of a barcode reader.)
Any ideas?
shannon
|
|
|
|
|
If you are using scanner with keyboard interface, its just as simple as typing from a keyboard. Use notepad, scan a barcode, the data read will be displayed in the notepad.
Hope it helps
:->
|
|
|
|
|
There is no keyboard input. The user is using a industry barcode scanner to vehicle parts. The scanner is th only input device. Any ideas?
Shannon
|
|
|
|
|
How does it interface with PC? is it RS232? or does it have additional peripheral like PCI Interface cards? . . . . In that case, I think you should be contacting the "Barcode Scanner Vendor" regarding the drivers or commands you will use to communicate with the machine.
If it is via RS232, try it with "Microsoft Comm Control", but still u need to know the commands you will be sending to the machine.
Hope it helps.
|
|
|
|
|
Thank you for your suggestions! They did in fact point me in the right direction.
Shannon
|
|
|
|
|
I show/hide different forms by defining the forms in a module:
Public Class formLibrary
Public Shared frmMain As Form
Public Shared frmComponents As Form
Public Shared frmNewProject As Form
....
End Class
Then I use the following to close the current form and open another:
Dim newFrmMain As New frmMain
formLibrary.frmNewProject.Hide()
newFrmMain.ShowDialog()
This is working perfect for all forms in my project except one. When I attempt to open the frmNewProject , I get this error:
An unhandled exception of type 'System.NullReferenceException' occurred in Mule! Data Management Tool.exe
Additional information: Object reference not set to an instance of an object.
..on this line of code:
formLibrary.frmNewProject.Hide()
Has anybody ever experienced a problem like this?
Thanks
Brad
|
|
|
|
|
Your form declaration is this:
Public Shared frmNewProject As Form
And you recieve an unhandled exception here:
formLibrary.frmNewProject.Hide()
The reason is because .Hide is not a shared sub procedure of the Forms Class, therefore you are required to instantiate a Form object instance.
For instance:
Public frmNewProject As New Form
|
|
|
|
|
In other words, when you trying to hide a form that does not exist in memory
|
|
|
|
|
Thanks. That works (anyway it gets me through the code with no exception). But now frmNewProject does not hide. I can't select it but it is still visible.
Any ideas?
Thanks
Brad
|
|
|
|