|
true this will work nice if you want the form to be maximised but the OP asked to prevent maximising so I figured the form isn't maximised at all (also not at start).
you can still use you're code to accomplish this (just put the size back to original size) but the user will get the arrows for resising the window, will be able to click and drag, might even be able to resize the window for a split second. All of this will result in a very confused user and a flickering screen so...
but if you want the windowstate to be maximised at all times you'r code would work, although I think the window will flicker for a split second (not shure about this)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Just an idea - why not allow the users to maximize the form and anchor objects on the form.
This will then rescale the form as the user resizes it.
I mention this just in case you have not yet figured out how to allow the form to rescale - and in case that is what you were trying to prevent.
Apologies if I am teaching my grandmother to suck eggs here...
Regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
i think we have a property called Cancel in the event of form_close
so you have to do this to prevent closing window
e.cancel=true
A.E.K
|
|
|
|
|
How convert txt file to ms-access please urgently
for e.g
txt file format
[2007/09/01-00:04:58]/1/0/5/0
Details
Date Time Id Id Id Id
[2007/09/01 - 00:04:58] /1/ 0/ 5/ 0
-- modified at 2:22 Tuesday 9th October, 2007
|
|
|
|
|
Gagan Deep Garg wrote: please urgently
It's rude to say this. It can't be that urgent, otherwise you would be paying someone for assistance.
Doesn't Access have a text file import facility?
Paul Marfleet
|
|
|
|
|
you will have to parse the string for doing this
you can create an access database with a table with your required schema
and then start reading file using streamreader line by line and split every line on separator and use the literals as values for your access datatable
Salman Sheikh
|
|
|
|
|
hi,
i want to create Convertor of English statement To my own mother tongue(i.e. Gujarati) Language via VB 6.0.
please anybody help me. it's very urgent.
pleeese help me....
vijay a. parmar
|
|
|
|
|
without more detail this is all I can tell you:
you'll need a database with all translations
then you'r user types in a word (or sentence) and you look this word up in the database and display the corresponding translation
(for the sentence you can split it into words using the split methode)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
DataGridView Help... How to insert windows control inside the DataGridView row or cells as an input control?
for example: datepicker inside a Datagridview to input a valid date?
or neither maskbox inside a DataGridView cells or row??
I've seen it before in some application in the internet but i dont have an idea how to do that??
Is there anybody there have an idea or solutions??
Please...
|
|
|
|
|
It's not easy, since you have to pretty much make you're own DatGridViewColumn class.
I think you can find an example here[^] on MSDN.
|
|
|
|
|
how to convert pdf to html by using source code? pls help me.
karthi
|
|
|
|
|
Usually it goes the other way around.
Google for "pdf to html component" and you might come up with something.
|
|
|
|
|
I am working in vb.net and it is web application here I want to validate for uppercase or restrict to user to enter lower case in text box. how can I do this.
Ashish K. Vyas
|
|
|
|
|
You can use UCase()...
Eg
Dim stDest as string
stDest = UCase(text1.text)
this will convert content of text box to upper case
Good luck
|
|
|
|
|
You can either do it server-side by converting whatever they type in whatever case to the case you need AFTER the page is submitted, or you can write the JavaScript code into the page to handle it on the client-side.
And the is a question for the ASP.NET forum. It really has nothing to do with VB.NET at all.
|
|
|
|
|
Can any one please tel me that, can i use MsFlexGrid in VB 2005 express edition and distribute the application legally?
I do not have a VB6 license and Microsoft has stopped distributing any new license for Visual Studio 6
I also want to know the same for common controls and Maskedit boxes
|
|
|
|
|
Why you're using those very old controls is beyond me. Yes, you can still distribute an app with those controls. There are no licensing requirements.
|
|
|
|
|
Please Help.. Update MS Access using DataGridView in VB2005
I've seen so many post and tutorial about this subject.. and they are all most the same code logic and many of them appreciate it because it works for them?.. on form load the records load smoothly and it works but when everytime datagridview/datasets committ changes and i tyr to update the record and i always got an ERROR like this..
System.InvalidOperationException: Update requires a valid UpdateCommand when passed DataRow collection with modified rows.
at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet)
at Employee_System.Form1.btnUpdate_Click(Object sender, EventArgs e) in C:\Employee_System\Form1.vb:line 31
****************
Here's my Code just like most of the forum i've visited
Please anyone who had a good heart to help me with this difficulties..
Please...
********************
Imports System.Data.OleDb
Public Class Form1
Dim theOleDbCommand As New OleDbCommand()
Dim theOleDbDataAdapter As New OleDbDataAdapter(theOleDbCommand)
Dim theDataSet As New DataSet()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Me.theOleDbCommand = New OleDbCommand("SELECT * FROM SampleTable", New OleDbConnection(dbConnectionString))
Me.theOleDbDataAdapter = New OleDbDataAdapter(Me.theOleDbCommand)
Me.theDataSet = New DataSet()
Me.theOleDbCommand.Connection.Open()
Me.theOleDbDataAdapter.Fill(Me.theDataSet)
Me.theOleDbCommand.Connection.Close()
Me.DataGridView1.DataSource = Me.theDataSet.Tables(0).DefaultView
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Try
Me.theOleDbCommand.Connection.Open()
Me.theOleDbDataAdapter.Update(Me.theDataSet)
Me.theOleDbCommand.Connection.Close()
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub
End Class
|
|
|
|
|
You gave the DataAdapter the SQL SELECT to get the records, but you never gave it how to update the database with SQL UPDATE, INSERT, and DELETE statements.
You can have these created automatically by using the OleDbCommandBuilder class.
Dim myDA As New OleDbDataAdpater(myCommand)
Dim cb As new OleDbCommandBuilder(myDA)
|
|
|
|
|
It works! Thank You So Much.... I do appreciate...
Your such a great help! Thanks again...
|
|
|
|
|
Do? OleDbDataAdapter.Update() supports (multiple or INNER JOIN) MS Access Table to be update?? or any other way to update two tables at the same time without making manual hardtype code or such a very long codes?? because in some instance of my application.. I have a DataGridView which its records came from an sql query which are two join table.. The Loading of record works fine.. but when i try to make changes into the DataGridView which also means dataset has also committ changes?? and i try to update the record using:
<b>OleDbDataAdapter.Update()</b>
then an ERROR occur just like this:
<b>System.InvalidOperationException: Dynamic SQL generation is not supported against multiple base tables.
at System.Data.Common.DbDataAdapter.UpdatingRowStatusErrors(RowUpdatingEventArgs rowUpdatedEvent, DataRow dataRow)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet)
at Employee.frmDTR.UpdateRecord() in C:\Employee\frmDTR.vb:line 136</b>
******************
Heres my Code...
**************************
Private Sub LoadRecord(ByVal strSQL As String)
Try
Me.Cursor = Cursors.WaitCursor
oleConnection.ConnectionString = dbConnectionString
oleConnection.Open()
oleDataAdapter = New OleDbDataAdapter(strSQL, oleConnection)
oleCommandBuilder = New OleDbCommandBuilder(oleDataAdapter)
dbDataSet = New DataSet()
oleDataAdapter.Fill(dbDataSet)
DataGridView1.DataSource = dbDataSet.Tables(0).DefaultView
Me.Cursor = Cursors.Default
Catch ex As Exception
MsgBox(ex.ToString())
Finally
oleConnection.Close()
End Try
End Sub
Public Sub UpdateRecord()
Try
oleConnection.Open()
oleDataAdapter.Update(dbDataSet)
Catch ex As Exception
MsgBox(ex.ToString())
Finally
oleConnection.Close()
End Try
End Sub
***************************
heres my SQL Query
*******************************
LoadRecord("SELECT p.IDno as [ID No],p.Lastname,p.Firstname,t.[Time In],t.[Time Out],t.[Date In],t.[Date Out],t.[Remarks] FROM tblPersonal as p inner join tblTimeEntry as t on t.IDNo = p.IDNo Order by p.Lastname")
************
Please anybody there..
|
|
|
|
|
DataAdapters only work with single-table queries. Anything more complicated and you have to supply ALL the SQL statements and objects to update the database yourself.
|
|
|
|
|
Thank your very much...
I've already created a manual/hardtype code to do that... i'm just wondering if VB2005 has that kind of function so i can make the code much easier... ehehe.. anyway... thank so much again.. such a great help!
|
|
|
|
|
Plz can Any one tell me how to make a s/w as Trial Version....For 15 Days....
Thanks
-- modified at 23:01 Monday 8th October, 2007
|
|
|
|
|