|
ok , i got the source!
Sub OptimizePerformance(ByRef doc As Word.Document)<br />
doc.Windows(1).View = wdNormalView<br />
With doc.Application<br />
.Options.Pagination = False<br />
.ScreenUpdating = False<br />
End With<br />
End Sub
wat does word.document refer to!?? a .doc file!??
plz reply quick i really need this!
|
|
|
|
|
giddy_guitarist wrote: wat does word.document refer to!?? a .doc file!??
What does the name suggest to you? Of course it does! It's not the file though, it's represents one of the documents Word has open.
giddy_guitarist wrote: plz reply quick i really need this!
Then call a consultant. The forums on any site are an all volunteer effort. People do not man these forums 24 hours a day, just waiting for a question to pop up. We answer them whenever we can, in the time we have available to us. We all have our own lives too...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi everyone!
I need to display the save changes message box in my windows form if user try to close the form without saving data.so can anyone help me to do this pls/
|
|
|
|
|
ok , first You have to set a flag/variable to go "true" when theres a change
Then u add the code :
<br />
Private Sub Form_Unload(Cancel As Integer)<br />
If change = True Then<br />
Select Case MsgBox("The text has changed." + Chr(13) + "Do you want to save the changes", vbYesNoCancel")<br />
Case vbYes<br />
'Code for saving <br />
Cancel = 0'This unloads the form<br />
Case vbNo<br />
Cancel = 0'Same here<br />
Case vbCancel<br />
Cancel = 1 'This stops the form frm being closed!<br />
End Select<br />
End If
Hope that helped!
Gideon
|
|
|
|
|
Thank u for helping.
But i have created the module module coding as follow
<br />
Module T_Module<br />
Public Function SaveChanges(ByVal callingform As Form, ByVal datachange As Boolean, Optional ByVal text As String = Nothing) As Integer<br />
Dim message As String<br />
Dim reply As Integer<br />
Dim fbid As String<br />
Const QMark As String = "?"<br />
If text = Nothing Then<br />
message = "Do u want Save thease Changes"<br />
Else<br />
message = text<br />
text = message<br />
<br />
If text.Substring(text.Length - 1) <> QMark Then<br />
text &= QMark<br />
End If<br />
<br />
End If<br />
reply = 1<br />
<br />
If datachange Then<br />
<br />
Select Case MessageBox.Show(text, "Data Changed", MessageBoxButtons.YesNoCancel)<br />
Case DialogResult.Yes : reply = 0<br />
Case DialogResult.Cancel : reply = 2<br />
End Select<br />
End If<br />
Return reply<br />
End Function<br />
<br />
End Module<br />
Then in my windows form coding as follows
//this method is for when user close the form
Private Sub Form_closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Select Case SaveChanges(Me, datachange)
Case 0
If Not DataSavedOK() Then
e.Cancel = True
End If
Case 1
Case 2
e.Cancel = True
End Select
End Sub
Private Function DataSavedOK() As Boolean
datachange = False
Return True
End Function
And i laso created the two variable
one is dim formload as string,datachange as string.
Then i decalre the forload variable into form load.
Actualy this coding also give the correct result but,if i click yes button in the message box i want to update the sql database but unforunatly it doesn't work at all.(Not displaying any errors also)
Pleas can u help for this.
|
|
|
|
|
I have an application developed in vb.net 2003, using .NET framework V1.1
Some users are now reporting that it will not install on a machine which only has .NET framework V2.0
Can I do anything to work around this and allow to app to work with either framework on the target machine?
Thanks,
Mike
|
|
|
|
|
Have the users intall the 1.1 framework on their machine. They can both be installed at the same time with no issues.
Mike Lasseter
|
|
|
|
|
In the short term I have told them to install V1.1 framework as well as 2.0 but is there no way to allow the code to run with V2.0 or are they completely incompatible?
MS don't help by only showing V2.0 download on the main .NET page
|
|
|
|
|
Hi
In a VB2005 appliction i'm using a third party webservice without problems.
Now this party wants us to add an element to the SOAP envelope so that they can distinguish between the vendors using the webservice.
As an example they added a pieceof jave code (see below)
But how do i do this is VB.NET?
peter
// Construct the header
QName headerName = new QName(" http://ech.client.nl/vendor", "Vendor");
SOAPHeaderElement headerElement = new SOAPHeaderElement(headerName);
headerElement.setValue("ECH Gui");
headerElement.setMustUnderstand(true);
try {
Message message = arg0.getCurrentMessage();
message.getSOAPHeader().addChildElement(headerElement);
} catch (SOAPException se) {
logger.error("Kan niet SOAP header 'Vendor' toevoegen", se);
}
|
|
|
|
|
How to filter dataset and update those filtered records
Thanks
|
|
|
|
|
Hi,
We can filter the Data from DataSet as follows..
1. Fetching Filtered Data and Filling to DataSet.
-------------------------------------------------
OleDbDataAdapter1.SelectCommand.Parameters("ACNo").Value = "60891234"
OleDbDataAdapter1.Fill(DataSet11)
2.
Dim FilRows As DataRow() = _
Dset.Tables(0).Select("ACNo='60891234'", "ACHName", DataViewRowState.Added )
Dim r As DataRow
Dim c As DataColumn
For Each r In FilRows
For Each c In r.Table.Columns
Console.Write( "\t {0}", r(c) )
Next c
Console.WriteLine()
Next r
Notes :
-------
"ACNo='60891234'" = Condition for Fintering Data
"ACHName" = Column to Sort The Data.
With Regards,
Pandian S
|
|
|
|
|
Thanks Pandian for ur prompt reply below is my code. Actualy i wanted to modify filted dataview. can u give some suggestion on this.
daConverstion.SelectCommand = scmdConversion
daConverstion.Fill(dsConversion, "Duplicate")
Dim MyDataView As DataView = New DataView(dsConversion.Tables("Duplicate"), "Duplicate_Group_Id=100", "Duplicate_Group_Id", DataViewRowState.CurrentRows)
MyDataView.AllowEdit = True
MyDataView.Item(0).Row(0) = "11"
|
|
|
|
|
I am having a XML file.
I wish to create a class in VB.NET, dynamically.
The name of all properties will be same as tag names in HTML file and value of that property will be value within tags.
Ex. Consider part of XML file as follows.
<name>Kumar
<age>27
.....and so on
Now when I create a class from it,
I should have someting like this
Lets say obj is object os class.
obj.Name
obj.Age
and value of obj.Name should be "Kumar", obj.Age--"27" and so on
Can any one help me out in this case?
Regards,
Amol
Every thing will come to you if you have faith.
|
|
|
|
|
Hi!Everyone!
Connectting millions of dots to a chart.
And how will you store these dot data so that i could open the chart again?
Best Regards
ICQ:258-235-734
MSN:msnadair@hotmail.com
-- modified at 3:22 Monday 17th July, 2006
|
|
|
|
|
There's a bunch of different ways to do this. The best method depends on the performance you want, the size of the file you want, whether you you that data to be editable outsire your app, how you're storing that data internally in your app, ...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i am now storing every dot data item into MS-Access table fields.
each dot data stored in each field.
So it takes a long time when i am storing these dots.
and when i read out the data.
i have thought to store those data by string.But it is so much data that i can't find a data type field of Access datatable.
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
You could create your own dot structure, storing the points in a collection of them. You can then serialize that collection to either a binary file or XML. Binary would definately be smaller, but far less tolerant of changes to the structure.
But, no matter what, since you're storing MILLIONS of points, it'll take a long time to do anything with them.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I get it.Thank you
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
i try to build a simple HTML editor using vb dot net,.. but i confuse about how to create a control to preview the html file created or edited,..
i guess i will need a control that has a browser functionality,. i mean render HTML file and also javascript at once,
any idea about this case,.. ? plz share ,..
tears
|
|
|
|
|
Use Internet explorer for this. You will found activeX control of Internet explorer. put it on the preview tab page and on click the tab assign that control with the page you have just designed. so no need of any extra effort to do.
Regards
Rizwan Bashir
|
|
|
|
|
well, acctually my case is not that simple, i really need a control that having a browser functionality. i need to dirrectly preview all html code writen, that's why then im thinking of having such a control in my form,..
any idea ?
tears
|
|
|
|
|
Hi
i want to convert a html file into binary format using VB.
plz help
|
|
|
|
|
|
thank you very much for the help
|
|
|
|
|
harish139 wrote: please help
Everyone is looking for help here. Perhaps a better subject line would be better. For example: "How do I convert HTML"
|
|
|
|