|
Is there anyway to tell OLEDB that the first row is data, not header? I want to get the first row, but noway now.
Thanks Dave Kreskowiak.
|
|
|
|
|
Hello,
I'd like my WinXP machine to boot up with the same preset volume (low) each time and then allow the user (me) to adjust it up and down accordingly. This will help ensure that the windows startup chime doesn't wake the neighbors after rocking out the day before.
My first thought was to create a small app that runs from the startup directory that sets a windows mixer property to a preset value, but this would occur too late during the startup routine, so perhaps this should be done upon windows exit?
Does anyone know, offhand, where to find the particular mixer setting for the master mixer volume, and how to launch something when windows is exiting? Or does anyone have any other ideas about how to achieve this?
thanks,
JennyP
|
|
|
|
|
Ok, I'm curious, why don't you just shut off the chime in the Sounds and Audio Devices control panel?
|
|
|
|
|
That wouldn't be as cool or didactic.
JennyP
|
|
|
|
|
I hope this is "cool or didactic"
Private Declare Ansi Function waveOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Integer, ByVal dwVolume As Integer) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
waveOutSetVolume(0, 0)
End Sub
|
|
|
|
|
Ummmm...Whoops! Missed something...
Just a suggestion, but since this code won't run until way after the startup sound plays, you might want to consider running this code somehow on system shutdown. Then the volume will be set low before the startup sound plays the next time the system starts.
Since services, and any other app for that matter, gets a notification that the system is shutting down, you can run that code then. My suggestion would be to create a service for this very purpose.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how can we populate values in a datagrid row by selecting the value in the combo box which is in the same datagrid.
for example if we have products table i should be able to select the first column which is the list of product names, by selecting the productnames i should be able to view it's price.
i am using vb.net
please help me
thank u
srikanth
|
|
|
|
|
I am developing addin for Office Word.
I am not sure but some say if you have custom toolbar
I have to have my application .dot instead of just
use the default normal.dot. sometimes word asks me
to save normal.dot but when trying to save they said
i have no permission to save.
is it true that I better have my application .dot?
shinay
|
|
|
|
|
The toolbars are stored in .dot files.
Normal.dot is the default
You should not modify the normal.dot, but create your own .dot file.
This is the proper way to do it I think...
You don't want to mess with someone normal.dot file because if they already have macros and toolbar you could crash their existing programs...
When you create your new toolbar (I am using word 2003), word ask for the name and also where to store it.
You should save it in your current document.
Then you can save your document in :
C:\Documents and Settings\yourname\Application Data\Microsoft\Word\STARTUP\mybar.dot
The folder might be hidden or somewhere else depending of your operating system.
Then on Word 2003 you need to manually turn on the add-in using the menu tools templates and add-ins.
|
|
|
|
|
Hi
I have a VB.NET client/server application in which there are multiple forms can be opened. Its not MDI application but at a time multiple forms can be on screen. Now, when we minimize all the forms, the taskbar indicators show the number the windows presently open. But, I don't want it that way.
I want to display only one taskbar indicator which refers to MyApp (my application) with a tooltip saying the actual number of windows open and the name of application.
How can I do this? Please advice. Thanks
Pankaj
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
Have you tried using Tabs instead of using multiple windows? That might reduce most of the problems with the multiple windows.
|
|
|
|
|
well .. i need to minimize windows as they are already under development. so I need to figure a way for single taskbar indicator.. any ideas ??? thanks
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
I believe when you build the application for distribution I believe that it'll fix the problem. I'd say try to build it and see if that resolves your problem then.
|
|
|
|
|
It could be done. In all your child forms, you would set the ShowInTaskBar property to false. You could easily change your main form to include a count of the number of forms open. Now, you have a new problem. How are you going to restore the form that the user wants to show? In your main form, you'll have to include code that will restore ALL the open forms in your main forms resize event. But, you'll also have to keep track of which form was on top when the user minimized all your forms or switched to another task and switched back to your form.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I think you can do what you want.
Do you have a main form in your application ?
If yes you can set this form ShowInTaskBar = True, and all the other ShowInTaskBar = false.
Then when your Mainform is minimized you should minimize all your windows.
And when your Mainform is restored you restore them.
I used this technique and it works very well.
|
|
|
|
|
I have a form that uses a comboboxes selected index value to populate textboxes, but when I try to edit the information, it doesn't save the information back to the database. Any ideas or suggestions would be appreciated?
|
|
|
|
|
Your going to have to supply much more information about your problem and what and how your doing things. So far, it looks like you have combo boxes bound to text boxes, but nothing about how your getting your data from the database, what code you have writing data back to the database, what version of VB your using, just to name a few things. Code samples of these things would help us out greatly!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
On load of form, The combobox is filled with the information(Ex. Fullname), which is done by a dataset. Then based on its selected index value there are textboxes that are data-bound based on that(Ex. Firstname, lastname,address). This is done by another query which the select statement is like this:
Select * from TCust Where (Fullname=?)
After the textboxes are populated with the correct data, Then you can select the Edit button which allows you to actually change the information, but when you go to save the changes whether it be by the same dataset that populated the textboxes or by a declared dataset that gets the changes from the dataset that filled the textboxes, It won't save the changes and update the table. I've tried just about everything I can think of, and everything I come up with takes a lot of steps and I'm thinking that there has to be an easier way of doing this. I hope this helps you.
|
|
|
|
|
ccotton333 wrote:
Select * from TCust Where (Fullname=?)
Are you editing the Fullname? If so, your aparently invalidating your Primary Key which is what is being used to uniquely identify the record your editing. If you modify this key, your UPDATE SQL statements won't work because you're trying to update a record that doesn't exist, as specified by your new primary key.
Like I said, without seeing the code your using, it's nearly impossible to tell you what's going wrong.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well the code is kind of long:
Public Class frmMain4
Inherits System.Windows.Forms.Form
Private Sub cboFullname_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboFullname.SelectedIndexChanged
Dscustinfo21.Clear()
dbCustInfo.SelectCommand.Parameters("fullname").Value = cboFullname.Text
dbCustInfo.Fill(Dscustinfo21)
End Sub
Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click
'allows you to edit a record
If btnEdit.Text = "Edit" Then
UnlockTextBoxes()
btnSave.Enabled = True
btnEdit.Text = "Cancel"
ElseIf btnEdit.Text = "Cancel" Then
LockTextBoxes()
btnSave.Enabled = False
End If
End Sub
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
'saves the record
LockTextBoxes()
btnSave.Enabled = False
btnEdit.Text = "Edit"
Try
dbCustInfo.Update(Dscustinfo21, "tcust")
Catch ex As Exception
MsgBox("Update didn't work.")
End Try
MsgBox("Update must have worked.")
End Sub
Private Sub mnuFileExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileExit.Click
'closes the program
Me.Close()
End Sub
Private Sub UnlockTextBoxes()
txtLastName.ReadOnly = False
txtName.ReadOnly = False
txtAddress.ReadOnly = False
txtAddress1.ReadOnly = False
txtCity.ReadOnly = False
txtState.ReadOnly = False
txtZip.ReadOnly = False
txtCountry.ReadOnly = False
txtHomePhone.ReadOnly = False
txtWorkPhone.ReadOnly = False
txtMobile.ReadOnly = False
txtPager.ReadOnly = False
txtEmail.ReadOnly = False
End Sub
Private Sub LockTextBoxes()
txtLastName.ReadOnly = True
txtName.ReadOnly = True
txtAddress.ReadOnly = True
txtAddress1.ReadOnly = True
txtCity.ReadOnly = True
txtState.ReadOnly = True
txtZip.ReadOnly = True
txtCountry.ReadOnly = True
txtHomePhone.ReadOnly = True
txtWorkPhone.ReadOnly = True
txtMobile.ReadOnly = True
txtPager.ReadOnly = True
txtEmail.ReadOnly = True
End Sub
Private Sub frmMain4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dbFullname.Fill(Dsfullname21)
btnSave.Enabled = False
End Sub
End Class
|
|
|
|
|
HI guys its me again I'm really stuck and I need the help. I want to create an instance of the line control on my form at run time. But some how the following code doesn't work
DIm line1 as Line
Set line1 = New Line
'setting line properties
line1.visible = true
I really need to knwo how to do this and I don't want to use any drawline functions as I don't want to draw a bitmap just want to be able to create an instance of the line control.
I really need the help
I'm using vb6
|
|
|
|
|
You probably didn't add the new Line control to the Controls collection of the object onto which your drawing. For instance, if your drawing on the surface of a Form (not a picture box!), you would have to add the control to the Controls collection of the Form:
Dim WithEvents myLine As Line
Set myLine = Form1.Controls.Add("VB.Line", "myLineControl")
myLine.Visible = True
The VB.Line might be a bit different. Check in the Object Browser (F2) to see what the exact name of the control is if not VB.Line .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anyone know of any examples of how to write each of these into code? When I built my dataset using the Visual Basic wizard, it was unable to create the update and delete commands. It said "Could not determine which columns uniquely identify the rows for "Address". I'm sure there are ways to programatically do these commands. Thanks in advance.
Beginner in ASP.Net and VB.Net
|
|
|
|
|
It couldn't do that because your table that holds the "Address" field doesn't have a primary key defined in it. You need a column that will uniqely identify each record in the table. See this[^] little page for a description of Primary Keys.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks dave;)
Beginner in ASP.Net and VB.Net
|
|
|
|