|
Thanks.
I changed the AutoResizeMode = dpi
This fixed everthing except for some of the label controls. The code defines the location of some of the labels on the form at runtime. The code bases the locations on a 96dpi but if the app runs on a computer with a different dpi the labels are put in the wrong spot. I think I need to know the computer's dpi when calculating the locations of these labels. How can I get that?
|
|
|
|
|
If think your talking about AutoSizeMode , not ...ResizeMode. If the AutoSizeMode is set to DPI, then you can checks the Forms CurrentAutoScaleDimensions property. It'll return a SizeF object with the current DPI of the screen.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi there,
I am working on an application which checks the remote computer running WinXP/2k that wheather it is locked or not. I have searched every where but not able to find the solution . there is one article on this issue but it only determines the state of the local computer means application have to be installed on local computer. whereas in my case the application will run from central computer w:(hich shall check the status of remote computers on local LAN.
Please help me in this regard
Thanks
Muhammad Farhan Farooq
|
|
|
|
|
There is no way to determine the workstation status without code running on each workstation you want to check. Even then, there is no function you can call that will tell you if the workstation is locked or not. It must be deduced using other methods. You can read more about a possible solution here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All,
Can anyone tell me how to load the form in a maximized way.
|
|
|
|
|
Me.WindowState = FormWindowState.Maximized
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
|
running vb.net 2005 & sql 2005
Ive been trying to add what seemed a simple table to a form ... only three four fields plus an update and cancel button
I managed to ( from samples ) add an OleDbConnection connecton, a OleDbDataAdapter complete with select and update commands and a dataset . From previous samples ( win 2003 dataform ) i have the four text boxex reporting back the data from the dataset ... Stage 1 complete. now here is where i was comming a cropper, when trying to update the table i used the following commands
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Try
'Attempt to update the datasource.
Me.UpdateDataSet()
MsgBox(" Update sucessful")
Catch eUpdate As System.Exception
'Add your error handling code here.
'Display error message, if any.
System.Windows.Forms.MessageBox.Show(eUpdate.Message)
End Try
End Sub
Public Sub UpdateDataSet()
'Create a new dataset to hold the changes that have been made to the main dataset.
Dim objDataSetChanges As Boss.net.DebBacsFmDestAccs = New Boss.net.DebBacsFmDestAccs
'Stop any current edits.
Me.BindingContext(DebBacsFMDestAccounts1, "DebBacsFmDestAccs").EndCurrentEdit()
'Get the changes that have been made to the main dataset.
objDataSetChanges = CType(DebBacsFMDestAccounts1.GetChanges, Boss.net.DebBacsFmDestAccs)
'Check to see if any changes have been made.
If (Not (objDataSetChanges) Is Nothing) Then
Try
'There are changes that need to be made, so attempt to update the datasource by
'calling the update method and passing the dataset and any parameters.
Me.UpdateDataSource(objDataSetChanges)
DebBacsFMDestAccounts1.Merge(objDataSetChanges)
DebBacsFMDestAccounts1.AcceptChanges()
Catch eUpdate As System.Exception
'Add your error handling code here.
Throw eUpdate
End Try
'Add your code to check the returned dataset for any errors that may have been
'pushed into the row object's error.
End If
End Sub
Public Sub UpdateDataSource(ByVal ChangedRows As Boss.net.DebBacsFmDestAccs)
Try
'The data source only needs to be updated if there are changes pending.
If (Not (ChangedRows) Is Nothing) Then
'Open the connection.
Me.OleDbConnection1.Open()
'Attempt to update the data source.
OleDbDataAdapter1.Update(ChangedRows)
End If
Catch updateException As System.Exception
'Add your error handling code here.
Throw updateException
Finally
'Close the connection whether or not the exception was thrown.
Me.OleDbConnection1.Close()
End Try
End Sub
The eupdate throws the following error
"Child list for field DebBacsFmDestAccs cannot be created"
Im at a loss as to what to do now, please can anybody help
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
the problem is I'm designing a dataform which is liked with sql server 2000 table , on the table i have tree or more choices and I want the user to choose only one of them , i use for it a group of RadioButton but i can't binding it to the database
how can i Binding data to the radiobutton ,
thanks for all
jooooo
|
|
|
|
|
|
I don't think anyone can understand the Question, what is you want to bind the Radio buttons to? Do you want the radio button text to come from the Database? Or the useres selection be logged in the database?
|
|
|
|
|
Thanks my friend
i mean bind the Radio buttons to the useres selection to be logged in the database not the text of it
i wait you
jooooo
|
|
|
|
|
I don't think Binding the radio buttons to a database is even possible in that manner, and if it is I don't think its the right way to go about it.
What you would probably want to do is handle the RadioButton.CheckChaged Event and then do an insert or update statement using a SLQDataAdapter or SQLCommand.
Kevin
|
|
|
|
|
Thanks Kevin
I use the Radio button to binding to field on the table
for ex :
on the table the user will choose between three cases ,
the method of Stock evaluation : choose on
1- FIFO
2- LIFO
3- Cost Average
I want to make the three choice as Radio button and binding it to the tree fields on database
i'm waiting your reply eagly
jooooo
|
|
|
|
|
That was pretty vague but if I understand correctly there are 3 fields in a table in the database, and you want to use the radio buttons to choose which field to select from?
<br />
dim Field as string<br />
IF rdb1.checked THEN<br />
field = 'field name<br />
else if rdb2.checked THEN<br />
field = 'field name 2<br />
else<br />
field = 'field name 3<br />
end if<br />
Thas pretty bad programing style but for purpose of explination it will suffice
Now you perform the select statement
<br />
SomeAdapter.SelectCommand.CommandText = "SELECT " & Field & " FROM some table WHERE somecontraints<br />
hope that helps
|
|
|
|
|
how can i develop a vb.net pocket pc application using oracle as the database?
isha
|
|
|
|
|
Does Pocket PC support Oracle ? If so, then just use it. if not, you can't.
Christian Graus - C++ MVP
|
|
|
|
|
If your pocket PC doesn't support Oracle, you will obviously need to host the database remotely, and access it from the PocketPC.
Aside from that, I don't know what type of answer you're wanting from "How can I develop a vb.NET...application". You can check out the Sytem.Data OleDB classes.
Jonathan Sampson
www.SampsonResume.com
|
|
|
|
|
how can i develop a vb.net smart device application using oracle as the database?
isha
|
|
|
|
|
Well, for starters you could start reading up on the OleDB objects in the System.Data.OleDB namespace. Here's an article that should give you a nice primer in VB.NET : http://www.startvbdotnet.com/ado/oracle.aspx
Jonathan Sampson
www.SampsonResume.com
|
|
|
|
|
i have to change the system date in vb.net,
i ll enter some date in the textbox and click on a button,the systemdate shud get chaged to watever date i have entered in the textbox
kavitha
|
|
|
|
|
I do not know if this is possible in vb, but you could shell to DOS and run the Date command i.e.
cmd /c date 20-11-06
This will work assuming you have rights to change the system date
Steve Jowett
|
|
|
|
|
hi everybody
i want dropdown menu like menu in form editor in vb 6.o from where we resize our controls,can anybody help me how i can make them.
Thanks
Thanks
|
|
|
|
|
Hey all again, i'm still doing that project, i figuired out how to do all the multiple forms and modules. But now i have a different problem.. Changing the menu colour... once again i need to be able to understand and reuse this code, i need to be taught. Thankyou very much
|
|
|
|
|
Tj. wrote: Hey all again, i'm still doing that project
Don't assume we have any idea what you're talking about Especially if it is relevant to your question. I am completely clueless as to what project you're doing
Tj. wrote: But now i have a different problem.. Changing the menu colour...
Can you be more descriptive? Which menu, which color? A font color, a background color, a border color, a highlighted color...
Jonathan Sampson
www.SampsonResume.com
|
|
|
|