|
Actually, I was just using it as an example for a column name. I do have it set to a primary key, it's just that my end user may save a blank form which would populate the prodID column, but the rest of the columns may all be blank. If so, I wanted to clean up the table if there are columns that are blank. I could make it so that all the columns are not null, but with my program it can't work that way, as I need to request an ID first and foremost.
Thanks.
|
|
|
|
|
Rashar wrote: it's just that my end user may save a blank form which would populate the prodID column
That's what validation is for! Validate the fields before you allow the user to save the record. If all the fields are not filled in, there's no reason you should be letting the user save an incomplete record.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey everyone,
I wanted to put a progress bar just like the one in window's booting screen that is never ending as I don't know when all my progress will finish or it varies, I'd check the net and somes really look complicated, can anyone show me some example? Thank you.
J Liang
|
|
|
|
|
|
Hey, thanks for the reply, sorry I can't get back to you any sooner, having some problem with my computer. Found an easy way which I already posted on this thread, if you interested, do have a look =)
J Liang
|
|
|
|
|
J Liang wrote: if you interested, do have a look =)
Look what?
|
|
|
|
|
Ok, I'll copy it to here then, I actually answered to another person in this same thread.
This is what I do for the progress bar:
First, select the progress bar, go to properties, on 'Style', select 'Marquee'.
Then, from the toolbox, drag the Timer to the page. After that, go back to the code and on any place that you wanted the progress bar to start, add
timer1.Enabled = True
Then when you wanted it to stop, just put timer1.Stop() and timer1.Enabled = False
That's all and it work just fine =)
J Liang
|
|
|
|
|
Thank you. I already see message in your previous post too after I ask you
|
|
|
|
|
A really simple solution would be to create a Flash animation and display it in a picture box control. I believe the one on Windows booting screen is a Flash Animation.
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
<marquee behavior="alternate" scrollamount="5" scrolldelay="50">
|
|
|
|
|
Hakuna-Matada wrote: I believe the one on Windows booting screen is a Flash Animation.
No, it's not. How can Flash be running if Windows hasn't started yet. Also, using Flash for this is overkill. It's easy to build a control like this and it's FAR lighter in weight than Flash could ever be. On top of that, I know I don't want my application depending on an installation of Flash just for a stupid progress bar.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
Hakuna-Matada wrote: I thought the PictureBox control of .NET was capable of displaying Flash .swf files on it own
No, it can't.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey guys,
Thanks for the replies, sorry I can't get back to all of you earlier as my computer was facing some problem.
Yup, having flash in my program would slow things down and guess what, I found out the easy that will show the same as the booting screen bar.
First, select the progress bar, go to properties, on 'Style', select 'Marquee'.
Then, from the toolbox, drag the Timer to the page. After that, go back to the code and on any place that you wanted the progress bar to start, add
timer1.Enabled = True
Then when you wanted it to stop, just put timer1.Stop() and timer1.Enabled = False
That's all and it work just fine =)
J Liang
|
|
|
|
|
Hi!
I wonder how to change the font name or size of the text in the rich text box without loosing other properties (bold, italic, ...).
It worked fine with VB6 but with VB.NET all properties are lost when I set new font name.
I am pasting rtf text from another form and traying to set new font name and size. None of the following lines works.
object.SelectionFont = New Font(name, size)
object.SelectionFont = VB6.FontChangeName(object,name)
object.SelectionFont = VB6.FontChangeSize(object,name)
Thanks
|
|
|
|
|
|
Thanks for the answer, Roath.
But this was not what I was looking for. I will try to be more clear.
I am pasting the "rtf" text with various styles from one rich text box to another rich text box. There I would like to change the font name and the size only and preserve all other styles. For example:
Text to be transfered : A brown fox is running. (font=Times New Roman)
Text transfered and formatted : A brown fox is running. (font=Tahoma)
Font name and size are changed but both the bold and underline style are gone.
Any idea?
|
|
|
|
|
i have different textboxes in my from on one textbox when i press a tab key i want print one messagebox i am writing thiss code but its not working on tab key although its working on like back key but not on tabkey
plz tell me
Private Sub ItemCode_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ItemCode.KeyPress<br />
If (e.KeyChar = Microsoft.VisualBasic.ChrW(9)) Then<br />
MessageBox.Show("u have pressed tab key")<br />
<br />
End If
|
|
|
|
|
|
iramg wrote: i have different textboxes in my from on one textbox when i press a tab key i want print one messagebox
How about using the lost focus event? Does this solution answer to what you need to do?
|
|
|
|
|
I need help on a vb or vb.net code to open a text file data delimited either with comma, tab, space or pipe and read the content to a recordset or an access database.
The one i have done make use of a fixed field but i want the code to dynamically detect the no of columns(fields) in the text file and create the corresponding no of fields in access database table. Since the text files come from different sources
t.aransiola
|
|
|
|
|
|
Hi,
I am trying to write a macro that will add a reference to a Visual Studio project. I am using the following code:
DTE.ExecuteCommand("Project.AddReference", "path to the DLL I want to reference")
This fails with the following error message (in a messagebox): Error HRESULT E_FAIL has been returned from a call to a COM component
Am I supposed to pass some other information with the path to the DLL?
Thanks,
dlarkin77
|
|
|
|
|
|
|
Hi friends, I am Ravi from Bombay. I have a decent knoledge of database programmin in VB but I dont know much about hardware interactions and Dlls.
Is it possible to record video and still images from Camera attached to TV Tuner card in Visual basic. I know there are a number of softwares aviable for this purpose but can they be made in Visual basic?
Thanks.
|
|
|
|