|
Hi,
In regards to your question I would like to mention that to access the MS Office application (components) you need to have VSTO 2005 (Visual Studio 2005 Tools for Office Second Edition) The Second Addition empowers developers to develop application targeting Office 2007 applications.
If you have VSTO patches installed on your machine then you need to use
Microsoft.VisualStudio.Tools.Office.Excel.dll in your application.
For more information regarding the VSTO components please visit the following link: http://blogs.msdn.com/vsto2/
I hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
I'm new in VB.Net.
I want to generate document number in this format <yyyymmdd><custid><running_no>
i cannot make the date format starting with year so i make 3 text box each is year, month n day. how to make 3 items from date, custID and running_no put in one field call docNo.
i'm using Microsoft Visual Studio .NET
|
|
|
|
|
zaimah wrote: i cannot make the date format starting with year
The way to do this is the overload of the ToString method that lets you specify the format with a format string like YYYYMMDD.
zaimah wrote: how to make 3 items from date, custID and running_no put in one field call docNo.
Assuming the are all textboxes
docNo.Text = date.Text + custID.Text + running_no.Text
zaimah wrote: i'm using Microsoft Visual Studio .NET
Well, obviously. Telling us the version number may help, but we know you're using visual studio.
I suspect you'd benefit from working through a book on VB.NET, it would cover things like how ToString is overloaded, and how to add strings to each other.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks a lot for ur reply. It really help me a lot.
|
|
|
|
|
hi, i have used the formula that u gave. it works, but there's one problem. i use docNo = System.DateTime.Now.ToString("yyyyMMdd") + Kod.Text + (values from field 'run_no' from 'table runNo')
how to add values from other table?
|
|
|
|
|
Hi, i m developing a text editor in vb.net. i m using webbrowser control for text editing. All i want is
when user press Crtl+S during writing the text it write letter 's' in text editing area. How can i avoid this ???? Thx in advance
i look in KeyPreviewEvent of webbrowser, but like vb i didn't see any property to replace the incoming keycode (e.keycode is readonly) with zero or nothing to prevent writing the letter 's'
King
|
|
|
|
|
King of Kingz wrote: i m using webbrowser control for text editing.
That is just plain bizarre. Why ?
Use a textbox or richtextbox, that's what it is for. You'll be able to respond to keyboard input in a far more meaningful way.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
If i have system tray icon of an application and on double clicking it opens in maximize state.
Now if i click on the icon then i want that the current exe should open in maximize state and not a new instance just like outlook
If outlook is open and i click on outlook again it opens the current outlook and not new instance
how can i do this in VB 2005
|
|
|
|
|
By creating a mutex or other cross process object you can check for in order to tell when your app is running, and when it's run again, use cross process communication mechanisms ( ideally, WCF ) to tell the other instance to pop up, before closing.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Do you have some code sample or some link.
|
|
|
|
|
In order to detect already running instance of an existing application you may use following code in form load event-
--------------------------------------------
Dim ProgName As String = Diagnostics.Process.GetCurrentProcess.MainModule.ModuleName
Dim ProcName As String = System.IO.Path.GetFileNameWithoutExtension(ProgName)
If Process.GetProcessesByName(ProcName).Length > 1 Then
‘This will close the new instance of application
Application.Exit()
End If
---------------------------------------------
However in order to maximize currently running instance you will need to use a call back function in your application.
You may check following link for getting more information about cross-thread communication-
http://www.vbcity.com/forums/topic.asp?tid=112111
I hope this helps.
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Hi All
I am using a WebBrowser control to navigate to sites in my VB.Net application. After navigating I want to Navigate to some of the links in it depending on some conditions. Can anybody advise how can I collect the links contained in the WebBrowser Document and how can I Raise a click event for a collected link so that it automatically navigates to the link.
I have written the code as bellow :
Dim link1 As mshtml.HTMLLinkElement
link1 = WebBrowser1.Document.Links(10)
Now How can I click the link link1 to navigate to the link.
Please Help. Thanks in advance.
Sekhar
|
|
|
|
|
Hello every one
I have a variable which holds a color
grid_color.GREEN = System.Drawing.ColorTranslator.FromOle(&HC0FFC0)
I assign it to the back of a row of a grid
DataGridView_Payment.Rows(0).Cells(0).Style.BackColor = grid_color.GREEN
Now on different back colors I want to do different actions
But when I compare it again it dose not matches
If DataGrid_Q.CurrentCell.Style.BackColor = grid_color.GREEN Then
Can any one plz help me
|
|
|
|
|
Do the red, green and blue components match ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
When I do
DataGrid_Q.CurrentCell.Style.BackColor.ToArgb
then i get value as "0"
Can you plz give me a example of the same
|
|
|
|
|
The color is black, that's why it does not match.
DataGrid_Q.CurrentCell.Style.BackColor
in the debugger will expand to show the red, green and blue values, but it's already clear they do not match a green color. Therefore, your code is working, the cell is not green.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for the idea
Now it is working
The changes I made now are
- I was setting the color of whole of the row at a time
- When I was comparing I was comparing cell back color
- Now I changed the comparison to row back color and it worked
|
|
|
|
|
Great - glad it worked out for you.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi there all
i have a problem that want you all to solve for me
i need some code to list all printer name that shared on the network
and then i want to print some document by select a specific printer name.
pls save me i need very Urgent
Regard from
spider anatha
|
|
|
|
|
I'm sorry, but no-one is going to do your work for you, that's not what we do here. Printing a document to a printer whose name you know is easy enough. As for discovering printers, if the drivers are not installed locally, you can't use the printer over the network, all you can do is try to install it. And if it is installed locally, then you will have the name in your local list of printer names.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am condemned for my sins to write in VB 6 for the next several whiles. Every time I fire up VS and select my project the IDE is populated with five modules I have absolutely no interest in seeing, editing, running, or anything else. I have closed them and saved the project more than once, but there they are the next time I start up.
Does anyone know where VS or VB saves whatever it is that makes these things appear?
Better yet, does anyone know how to make them stop appearing?
Thanx,
JimT
|
|
|
|
|
In the path that you save your project, delete all files whose extension is not as the known formats, e.g. if you have Form1.frm, then (if I remember correctly) Form1.frk or something like that is also created. Also one extra file is created with the name of your project, but without .vbw extension.
I can remember that if you delete these files, you would get what you want.
|
|
|
|
|
Thanks for your help. I tried it, but that didn't work either.
There were two files, as you suggested: .vbp and .vbw. I deleted the .vbw file and the annoying files quit appearing.
Thanks again!
JimT
modified on Tuesday, February 12, 2008 11:49 AM
|
|
|
|
|
I love the splitcontainer, but I need more than 2 panels. Any ideas of a good solution?
Thank you.
|
|
|
|
|
What about putting another SplitContainer inside one of the panels of the first SplitContainer?
|
|
|
|