|
mcslemon wrote:
It is saying 'Type Word.Application not defined'
The error received with regard to the intial post and its first response is:
"An unhandled exception of type 'System.InvalidOperationException' occurred in system.dll
Have you add the reference of Ms word and office to your vb.net project yet??? If not then go to Project menu and click on Add Reference... Then go to the COM tab and find Microsoft Office x.0 Object Library then click select and find Microsoft Word x.0 Object Library and click select and click Ok. Then try to run your project again. Good luck
Note: x is the number of your Microsoft office version. If you use Office xp then x will equal to 10. You will see, Microsoft Office 10.0 Object Library.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Ok, I have the Object (Word.Application) working.
I still want to be able to load the application window into the Label as I stated in my original post using the example.
It would be great if someone could show me how to do this whilst using 'The man from SCN-COs' solution. I am having no luck on my own.
McS
|
|
|
|
|
Good day to you all and i hope you are well.
Not a direct code question guys, just in need of advice.
Imagine this scenario if you will,
You have a internet server with a SQL Server 2000 database and a client with a MSDE installation. Both are running the same database say MYDATABASE.
MYDATABASE on server is very large, say 100mb.
The client needs one table from the server to do the work they wish to do on their local machine.
They want to just get that one table (and all related obviously) updated on their machine as they don't need the full database as that would take ages (being 100mb).
How would you suggest passing that one table to the client, the client app updating the database on the local machine. Then, once they have done their work they re-connect to the internet server pass back the data they have added/updated and the server then updates accordingly.
Any help would be greatly appreciated.
My thoughts and ideas so far - DTS (not used this before though), dynamically formed SQL (clunky, unreliable).
Pleaaaaaseeee Help
Many Thanks
Harry
|
|
|
|
|
Hi,
Is it possible to do paging in VB.NET datagrid ?
I have search using Google and Yahoo but still couldn’t find any sample and references regarding this matter
Thank you very much in advance for any help and ideas.
Regards.
|
|
|
|
|
I've found code to display the name of the program that is currently running:
MsgBox(System.Reflection.Assembly.GetExecutingAssembly.GetName.Name)
and I've found code to display the sub routine I'm currently in:
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name)
Does anyone have code to display the class that the sub resides in?
Thanks for any input you can give!
Lost in the vast sea of .NET
|
|
|
|
|
Try:
System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name
|
|
|
|
|
Perfect!! Thanks!!
Lost in the vast sea of .NET
|
|
|
|
|
Hello All,
I want to send fax from a VB.Net form using rightfax.dll(version 8.5.0.103), can anyone pls provide me a insight of this by providing a piece of code or any article for the same.
your advice would be highly appreciated.
This is very urgent.
Regards
Pavan
|
|
|
|
|
Why don't you just Google for "rightfax vb"[^]...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i have urgent problem i don't know what i must do to solve it
the project that i work on consist of server and client application
it represent real Time system
and have three connections
on the client sied the problem is that:
i have found that the CPU usage is 100% this isn't the usaual case of the client
first :when i watch the threads from control panal-->performance i found that one thread go up
and take most resource
i don't know how to catch this thread
second :i note that if i put any break point to stop the applecation then let it run again
the CPU usage go down to a good level
ASwanee
|
|
|
|
|
Hi,
I am trying to create an vb app using winforms. I want to always have updated information in the app. So if there are more then one user, and one of users is adding a company, I want the other user to see the company as well after it has been added. Or when one user changes the status of a company I want this update to be send to the other users, if looking at the same data as well.
One of the obvious solutions would be to have a timer restrieving the data from the SQL db every couply of seconds, but I guess that will kill a network and there must be more elegant solution, pushing changed data forward. However all the docs I have read until now only talk about a single user and he or she pushing a button to update.
Can anybody give me some hints on where to go and some articles to read?
Thanks in advance
David J
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
Depending on how much data is changed and how much data you have total you could do one of the following:
1. Give each table with data an extra column LastChange of type DateTime. If the column is indexed your clients can regulary ask for newly changed items.
2. Instead of marking ich item just make one field LastChange. Your clients poll this one and (if something changed) get all data.
3. Make some sort of server where your clients must log in. Let the server handle all data access to the db. This way the server gets to know all changes and can send any info he wants to all connected clients. Furthermore the clients wouldnt need to know the data layer - it would all be handled by your server.
|
|
|
|
|
i need to build an application that would first connect trough LAN, if that fails (outside LAN) trough internet, and if that fails trough modem, offcourse it is a database it should connect to. My problem is that i have no idee how to do this, any suggestions?
John
|
|
|
|
|
I am making an FTP Class I've been able to login,get filelist,enter into passive mode. but when I try to download any file as small as 1 Byte it stops responding I'm issuing ("RETR " & Filename) command to FTP Server. If there is any problem correct me.
Do While True
m_bytBuffer.Clear(m_bytBuffer, 0, m_bytBuffer.Length)
m_intByte = m_objClientSocket.Receive(m_bytBuffer, m_bytBuffer.Length, 0)
m_strMes += ASCII.GetString(m_bytBuffer, 0, m_intByte)
If (m_intByte < m_bytBuffer.Length) Then
Exit Do
End If
Loop
|
|
|
|
|
Hi,
vb 6.0
I have a control with several events, and a container form listening for such events. the control also has some methods which are called by the container form to update a listview.
Everything was working fine until I decided to compile the project. when compiling the project I get the message: procedure not found -- even though intelisense allows me to select the procedure and I provide the correct number of arguments (4 args).
Does anybody have any experience with this type of behaviour, I'm in the process of creating the release version for testing and can't seem to go past the compile process.
Thanks....
sun.lcr
|
|
|
|
|
Hi folks,
Solved my problem, I'm so deep in the forest that I can not see clearly...
anywho....
I had changed the function signature but did not bother to recompile the control project. Since the control project is in the same workspace as the form project calling it, I was making the wrong assumption that everything was getting compiled but the control project was not getting compiled therefore the diffrerence in method signatures....
duhhhhh.....
sun.lcr
|
|
|
|
|
Hi,
I am trying to convert the code in this document: http://www.codeproject.com/cs/miscctrl/custommenu.asp[^] into VB.net instead of C#. I have got most of it done but I am missing the final step, or at least I hope it is the final step. In the article all the menuitems have the following two events added:
this.menuItem3.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.OnDrawItemSec);
this.menuItem3.MeasureItem += new System.Windows.Forms.MeasureItemEventHandler(this.OnMeasureItemSec);
When I look at the source article used for this article, the author writes about going to the eventtab on each menuitem. I am guessing this is typically C# as I cannot find it in VB.net. So can anyone please tell me how to do this?
Thanks
David J
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
Your are looking for the AddHandler statement:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vastmAddHandlerStatement.asp
For your example:
<br />
AddHandler Me.menuItem3.DrawItem, AddressOf Me.OnDrawItemSec<br />
AddHandler Me.menuItem3.MeasureItem, AddressOf Me.OnMeasureItemSec<br />
|
|
|
|
|
Could someone please help me on how to disable database login in crystal report 9.0?
Here's how I did:
I created a customer.rpt file
then I wrote this code to call customer.rpt to make the report:
-------------------------------------------------------------------------
Private Sub CustomersPrintForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim CRYRpt As New Customers
Dim rst As MICControlLibrary.RecordSet = MICControlLibrary.DBContacts.DBSelectPrint(_contact_id)
Dim dtview As DataView = New DataView(rst.DataTable)
CRYRpt.SetDataSource(dtview)
Dim ParameterFields As CrystalDecisions.Shared.ParameterFields
Dim ParameterField As CrystalDecisions.Shared.ParameterField
Dim ParameterRangeValue As CrystalDecisions.Shared.ParameterDiscreteValue 'ParameterRangeValue
ParameterFields = New CrystalDecisions.Shared.ParameterFields
ParameterField = New CrystalDecisions.Shared.ParameterField
ParameterField.ParameterFieldName = "@contact_id"
ParameterRangeValue = New CrystalDecisions.Shared.ParameterDiscreteValue 'ParameterRangeValue()
ParameterRangeValue.Value = _contact_id
ParameterField.CurrentValues.Add(ParameterRangeValue)
ParameterFields.Add(ParameterField)
CrystalReportViewer1.ParameterFieldInfo = ParameterFields
CrystalReportViewer1.ReportSource = CRYRpt
CrystalReportViewer1.Refresh()
End Sub
----------------------------------------------
am I missing something? because when I run it, it prompt a database login asking me to login before view the report?
Thanks for helping.
|
|
|
|
|
hi
i mohammed
i from egypt
sorry i cannot help you but with vb6 and crystal report 8.0 i used crs1.Connect = "PWD=EMP" and Emp this my Password and crs1 is crystal report ocx
but can you help me how i used crystal report 8.0 from vb6 and haow save pucture un database and view them with image controls Or picture controls in vb6
mohammed hussein
|
|
|
|
|
Looking for some help please...
I can draw a 'Grid' on a form through OnPaint using Drawline methods -
I need to associate data from an array to this grid I draw and label. (I have no issues with working with arrays, not the question)
example: the grid I draw is a 10 x 10 labeled on the x/y axis appropriately 1 - 10. My data comming in is points associated with my grid (3,5) (2,7) etc.
So I would like to plot this.
However, the location on the FORM for where I have my grid set up as (1,1) for example, is actually (25, 75) (lets say) and these values will change as I resize the form -- But I still need to have my array data plotted on the (1,1) location I created in my grid.
Hehe..make sense what I am confused about?
How do I get my array data plotted & associated to the grid I create and not the underlying coordinates used by the Form itself that the grid is created on?
Appreciate any feedback.
I am including the code I have so far - it works nice as a basic grid creater I guess.
To change the dimensions, you change the "Space" variable.
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
'This is the declare of the graphics object
Dim g As Graphics = e.Graphics
'Size Variables
Dim gWidth As Integer = Me.ClientSize.Width
Dim gHeight As Integer = Me.ClientSize.Height
'Grid Spacing
'Will use a unit of 10 for the # plots to be used, defines grid spaceing
' will change to variable setting
Dim Space As Integer = 10 'this would be variable - # of plots defining size of graph
Dim xSpace As Integer = (gHeight - 10) / Space '-10 to allow 5 on top and bottom extra space
Dim ySpace As Integer = (gWidth - 10) / Space
'ADD LABELS
' will be written in with each line made
' x and y axis
Dim Label As String
Dim myFont As New Font("Tahoma", 10)
'Declare the Pen
Dim pPen As Pen = New Pen(Color.Maroon, 1)
'DRAW THE X HORIZONTAL LINES for grid
'Draw first line - bottom
'Draw a line x1, x2, y1, y2
g.DrawLine(pPen, 1, gHeight - 5, gWidth - 5, gHeight - 5)
'LABEL
Label = 1
g.DrawString(Label, myFont, Brushes.Blue, 1, (gHeight - 15))
'set up loop to draw remaining lines
Dim counter As Integer 'counter for loop
counter = Space - 1 '1st line has already been drawn
Dim n As Integer ' holder/count for loop
Dim x1Space As Integer = xSpace
For n = 1 To counter
'set up x1,x2,y1,y2 for next line to be drawn
g.DrawLine(pPen, 1, (gHeight - 5) - x1Space, gWidth - 5, (gHeight - 5) - x1Space)
'Label
Label = System.Convert.ToString(n + 1)
g.DrawString(Label, myFont, Brushes.Blue, 1, (gHeight - 15) - x1Space)
x1Space = x1Space + xSpace 'adds next space value to move line up
Next
'DRAW THE Y VERTICLE LINES for grid
'draw 1st line starting left -> right
'draw a line x1,x2,y1,y2
g.DrawLine(pPen, 5, 5, 5, (gHeight - 5))
Dim y1Space As Integer = ySpace 'need to use the ySpace now for spacing vertically
counter = Space - 1
For n = 1 To counter
g.DrawLine(pPen, (5 + y1Space), 5, (5 + y1Space), (gHeight - 5))
'Label
Label = System.Convert.ToString(n + 1)
g.DrawString(Label, myFont, Brushes.Blue, (5 + y1Space), (gHeight - 15))
y1Space = y1Space + ySpace
Next
End Sub
Protected Overrides Sub OnResize(ByVal e As System.EventArgs)
Me.Invalidate()
End Sub
End Class
SO its possible I am even approaching the whole problem incorrectly with what I have done above. The thought was to create the grid and then plot on it.. eventually the "Space" variable will be determined by first looking though the array for the min max values and constructing the grid and graph from there..
But first I need to figure out how to plot the !@%$#@! thing...
Thanks to all who took the time to read this.
Andrew
|
|
|
|
|
open.ShowDialog()<br />
Dim myObjectsFromFile As New CPersonalList<br />
myObjectsFromFile.LoadPersonalObjects(open.FileName)<br />
Dim i As Integer<br />
For i = 0 To myObjectsFromFile.GetObjectCount - 1<br />
lvwObjects.Items.Add(myObjectsFromFile.getObject(i + 1).First)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Second)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Horoscope)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Fourth)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Fifth)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Sixth)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Seventh)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Eighth)<br />
Next
Data form text file: 000189,380661,SUPERSTAR VIRGO,410081,0813,2.200,5.76,12.67
I have the above code which sucessfully place data extracted from a Coma delimited text file in Column 1-8 of a ListView which have 12 ColumnHeader.
Problem:
How can i specify the column of the data to be display in?
E.g. Puting myObjectsFromFile.getObject(i + 1).Second in the 12th column instead of the 2nd, the myObjectsFromFile.getObject(i + 1).Third in the 9th column instead of 3rd .etc
Note: Juz a sample break down of what i need to do as my actuall requirement is slightly mroe complex
|
|
|
|
|
Is there any build-in function of Visual Basic .NET that lets me extract the dates from a GregorianCalender based on a given weeknumber of a given year?
For instance, extracting what dates belong to week 19(as an example) of a given year?
Thanks in advance.
Regards
Alsvha
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
hi guys i have a problem. i want to use overture and adwords search engine in my vb.net . can any body knows from where i can get these search engines web services thanks.
hammad umar
|
|
|
|
|
:-Dhai... everyone.. who know how to use the vb.net to perform the silent installation?
For this purpose, because i want to perform install s/w program that means can install program at 10 client pc at ths same time.
Actually, i want use the install.inf file to perform the silent installation, but i also dont know the command for .inf file.
So,;) everyone who know about this!!! that give me some guideline(web site or coding) to do this.....
Thanks you!
|
|
|
|
|