|
Hmmmm...you may want to verify that. For me, the .TableStyles(0).GridColumnStyles property always returns the actual column width. But I'm only using the one Tablestyle. Do you have multiple styles defined? Also, are you referencing this property in response to a certain event being fired? I reference the property immediately after the user resizes a column in the MouseOver event.
Dean
|
|
|
|
|
Hi All,
Can someone tell me if there is a way to insert text at the cursor location in an Outlook mail. I saw the object browser for MailItem but could only find the "Body" property through with there is no way to find out the cursor location.
Thanks and Regards,
Anil
|
|
|
|
|
Dear Sir or Madam,
Now I use a datagrid and I want a column of this datagrid is the combobox.
I use DataGridTableStyle and I add a DataGridComboBoxColumnStyle in the column. The ComboBox has 3 field: DataSource, DisplayMember, ValueMember.
But now I have a problem: after I choose one value from ComboBox, it return ValueMember and display ValueMember on DataGrid. Don't display DisplayMember on the DataGrid.
I want after I choose one value from ComboBox, it will return ValueMember and display DisplayMember on the datagrid.
Thank you very much for any help !
And my code here:
Dim tableStyle As New DataGridTableStyle
With tableStyle
.MappingName = "ArrayList"
''Step 2:Mapping columns for TableStyle
Dim CheckedCol As New DataGridBoolColumn 'NoNullBoolColumn
With CheckedCol
.MappingName = "HasThisSkillItem"
.HeaderText = ""
.Width = 30
.AllowNull = False
End With
tableStyle.GridColumnStyles.Add(CheckedCol)
Dim column As New DataGridTextBoxColumn
With column
.MappingName = "SKILL_ITEM_NAME"
.ReadOnly = True
.HeaderText = "Item Name"
.Width = 200
End With
tableStyle.GridColumnStyles.Add(column)
column = New DataGridTextBoxColumn
With column
.MappingName = "DURING_EXP_YEARS"
.HeaderText = "Exp.Y"
.Width = 40
.NullText = ""
End With
tableStyle.GridColumnStyles.Add(column)
column = New DataGridTextBoxColumn
With column
.MappingName = "DURING_EXP_MONTHS"
.HeaderText = "Exp.M"
.Width = 40
.NullText = ""
End With
tableStyle.GridColumnStyles.Add(column)
column = New DataGridTextBoxColumn
With column
.MappingName = "LAST_USED_MONTH_YEAR"
.HeaderText = "Last uses M-Y"
.Width = 80
' .NullText = ""
End With
tableStyle.GridColumnStyles.Add(column)
Dim CboColumn As DataGridComboBoxColumnStyle
CboColumn = New DataGridComboBoxColumnStyle(LoadSkillLevels(), "CODENAME", "CODETYPEID")
With CboColumn
.MappingName = "SKILL_LEVEL_CODE"
.HeaderText = "Level"
.Width = 100
.NullText = ""
End With
tableStyle.GridColumnStyles.Add(CboColumn)
column = New DataGridTextBoxColumn
With column
.MappingName = "REMARK"
.HeaderText = "Remark"
.Width = 200
' .NullText = ""
End With
tableStyle.GridColumnStyles.Add(column)
End With
'Step 3: Add the tablestyle to the datagrid
'thanhphu
dtgSkill.DataSource = arrSkill
dtgSkill.TableStyles.Add(tableStyle)
Note: arrSkill is an arrayList of EmployeeSkill information.
Carollynn Ann
-- modified at 3:53 Friday 13th January, 2006
|
|
|
|
|
Dear all
I wondering Know how created a program which is connected to the database through out ODBC system,and what the procedure that I have to fulfil in order to make it runing well as I want to.
Could you please to sent me a program sample as well, thank you for your attention and your support in advance
best regrds
ICE
|
|
|
|
|
What versoin os visual studio? 2003 or 2005
ODBC can be SQL or acess. look at a1vbcode.com pleny of examples
arthurvandermerwe@woolworths.co.za
Arthur van der Merwe
BSc, MCSD.net, MSAD.net, MSDBA
|
|
|
|
|
Thank you for your reply, actually I used Visual Studio 2005 an I will use both of SQL and Acces could you mind to tell me how to use both of that kind of data base
Thank you
ICE
|
|
|
|
|
I have installed MS Office with WORD, EXCEL, PowerPoint, ACCESS
How can I open and read it in my application?
Further,
How to open and read it as the print preview mode of WORD?
|
|
|
|
|
Try this simple thing:
Add reference to the COM Component "Microsoft Word xx.xx Object Library".
<br />
Dim wa As New Word.ApplicationClass<br />
Dim doc As Word.Document = wa.Documents.Open("C:\test.doc")<br />
MsgBox(doc.Content.Text())<br />
PraVeeN
NinethSense.com/blog/
|
|
|
|
|
Hi Guys,
I am trying to use the following connection string, -
dcon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Application.StartupPath & "\Database\XYZ.mdb"
Application.StartupPath provides the path to the bin folder. However, the Access Databases which I am using are in the Database folder. How should I modify the connectionstring to go one step back from the BIN folder and into the DATABASE folder.
Thnx for any help.
With Best Regards,
Mayur
|
|
|
|
|
Hey, I just figured out how to do it.
dcon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" &
Application.StartupPath & "\..\Database\XYZ.mdb
However, can anyone tell me how do you set this connection in some common module and use it throughout the application rather than making the connection in every windows form.
thnx for any help.
With Best Regards,
Mayur
|
|
|
|
|
aap.config
You have to "add new item" for this.
Specify the connectionstring there.
Example:
<br />
<configuration><br />
<appSettings><br />
<!-- User application and configured property settings go here.--><br />
<!-- Connection string values --><br />
<add key="Provider" value="MSDAORA" /><br />
<add key="DataSource" value="DBTest" /><br />
<add key="UserID" value="Lavanya" /><br />
<add key="Password" value="Password" /><br />
<add key="MailServer" value="EXCH.XYZ.COM"/><br />
</appSettings><br />
</configuration><br />
or
<br />
<connectionStrings><br />
<br />
<add name="ClaimEZ.My.MySettings.BACFConnection" connectionString="Data Source=MYSERVER;Initial Catalog=MYDB;Integrated Security=True" providerName="System.Data.SqlClient" /><br />
<br />
<add name="MyDataLayer.My.MySettings.BACFConnection" connectionString="Data Source=MYSERVER;Initial Catalog=MYDB;Integrated Security=True" providerName="System.Data.SqlClient" /><br />
<br />
</connectionStrings><br />
<br />
PraVeeN
NinethSense.com/blog/
|
|
|
|
|
You don't! Best practice to make the connection to the database only when you need to run a query or modify the tables. The rule of thumb is Connect late, Query fast, Disconnect early. You just don't maintain an open connection to the database for the life of a form or, worse yet, and entire application. With an Access database, maintaining an open connection isn't so bad. But on a real SQL server, that is a VERY expensive connection license you hanging onto and not using.
Get into the habit...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i want insert values in datagrid via textbox
i m not connected datagrid to database
if anybody know this please help me
vivek
|
|
|
|
|
A datagrid works only with a DataSet and you should bind this to a DataGrid.
|
|
|
|
|
how can i use mshflexgrid in vb.net
i have add it from com lib but it is not working like visual basic
asdf
|
|
|
|
|
DataBinding goes like this:
Dim objDataSet As New DataSet()
objCommand.Fill(objDataSet)
myDataGrid.DataSource = objDataSet.Tables(0).DefaultView
myDataGrid.VirtualItemCount = GetVirtualItemCount()
myDataGrid.DataBind()
|
|
|
|
|
Update DataSet and bind the DataGrid
PraVeeN
NinethSense.com/blog/
|
|
|
|
|
If I have a jpg file like 1024*768,
but my picturebox only has 800*600,
How can I make the jpg file scale(zoom) to fix the picture box to show?
Thank You!
|
|
|
|
|
|
Sorry for that, I know this property ...
What I really what to know is like a zoom function in All reader,
when we press the (+), the picture zoom in; (-), the picture zoom out.
Thanks anyway.
|
|
|
|
|
Change the SizeMode property of PictureBox to StretchImage.
PraVeeN
NinethSense.com/blog/
|
|
|
|
|
As the title,
I would like to use ghostScript in VB.NET.
I am going to read render PDF in VB.NET or convert it to JPG.
Any reference or article for this purpose.
Thanks a lot.
|
|
|
|
|
First you need to set the printer to one that can either
generate Postscript, or to something like RedMon that can directly
output to Ghostscript.
Second, you need to script Word to print.
PraVeeN
NinethSense.com/blog/
|
|
|
|
|
hi all,
i am trying to do an upload module, which help me to upload files to the database, the module works fine when i run locally, but when i test it on the server, the client side could not upload,when i try to read the file from the client, it returns,
"System.IO.FileNotFoundException: Could not find file "
when executing "file.open" in the line below:
Dim fs As FileStream
fs = File.Open(myFile.FileName, FileMode.Open, FileAccess.Read)
the file exists in the client pc, but it cannot find the file to upload,any idea on how to solve this? thanks in advance
elcheah
|
|
|
|
|
I assume this is only for use on a local network ? And you're passing through a full network path ?
Christian Graus - Microsoft MVP - C++
|
|
|
|