|
I am developping com addins for word.
I want to find out if there is a way to click
on the customized button in toolbar programmatically.
I tried to call like this in module.
Application.CommandBars("MYWORDTOOLBAR_NAME").FindControl("MYBUTTON").execute
but I am just getting this error message
"fail method "Execute" of object CommandBarButton"
Do you have any idea why?
van
|
|
|
|
|
You might want to break that statement up and see if .FindControl("MYBUTTON") actually returned a CommandBarButton before you try and call .Execute() on it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hey,
I have a file path, and from this i want to select a printer on the client by using its name (PDF Printer) and choose to print the file. When the printer is passed a file to print it opens a 'Save File As' dialog box where you choose the save destination and file name of the PDF.
I need a way to specify the destination path and filename of the PDF to be saved and to be able to hide this 'Save File As' dialog box so the user never sees it.
I am using CutePDF Writer and there is a code sample to help here[^]
But i am unable to have any luck
Can anybody help with any hints or suggestions
Thanks you for your time
Chris
|
|
|
|
|
What do you mean by "not having any luck"? What's happening? What's not happening?
What does your code look like? Are you typing the Registry path names and values names EXACTLY as shown?
Normally, you would go to the products support site for assistance with the component. CodeProject deals with the languages themselves, not 3rd party components...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hey,
i was typing it as shown. i dont have much experience of registry values.
First of is all is it possible to make the 'save as' dialog not show and pass information and key presses to it?
Cheers
Chris
|
|
|
|
|
No, you can't prevent it from happening unless the driver exposes any interface to do so. It looks like the only interface supplied by the manufacter of the .PDF Printer Driver is the registry hack. If it doesn't work, then your best bet is to either contact the manufacturer for support on the component (and possibly an update) or find another component that has the (working) functionality you need.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi!! i have used WinInet APIs to work with FTP sessions in VB6. No i'm thinking of writing the same in VB.NET. i'm not able to find a suitable namespace to work with the same WinInet API. What namespace can i use and whats the way i tackle this. i don wanna use any third party components ans wanna write a class of my own. pls suggest
Thankz in advance
|
|
|
|
|
System.Net
System.Net.Sockets
FTP is just a socket application using a pre-determined format of messages, usually on port 21.
|
|
|
|
|
|
There is also a namespace for FTP in the Visual Studio 2005
|
|
|
|
|
How to access a File Transfer Protocol site by using Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;832679
|
|
|
|
|
Hi,
Does anyone know how to make a "CommonDialog", in particular the "SaveFileDialog" always be on top? Like setting the "TopMost" property of a form to true. I want the file dialog to appear on top of all running applications.
Best regards /Emily
|
|
|
|
|
Use the property .ShowDialog() this makes the dialog application modal and will always be on top of your app. But you could make it System modal and then it will be the top most cos the dialog will have to be closed before the system is aloud to be used once more.
HTH
Chris
|
|
|
|
|
Hi,
Thanks for your answear!
I already use the property .ShowDialog(). But I want the file dialog not only to be on top of my app, but also on top of all other app's like with the TopMost property. Is that "System modal"? How do I make it "System modal"?
/Emily
|
|
|
|
|
Hey
i am not to sure how to make a form or dialog system modal but i did find this[^] article. Perhaps using the Win32 API?
Have you tried making a custom save dialog box using a new form and possibly set that forms property to top most. There are tutorials out there to make your own save dialog box.
HTH
Chris
|
|
|
|
|
Hi,
Thanks again.
I have not tried to make my own save dialog box, I migt have to do that if I do not find another solution.
By the way, I'm writing the application in VB.Net if that makes any difference.
Maybe I should look at the Win32 API but it would be nice to avoid using it from my .Net app.
/Emily
|
|
|
|
|
I have two text fields:
StartTime = 20:00:00
and EndTime = 24:00:00
I am trying to check if the current time is between these two times.
I have tried:
if (StartTime.ToString() < CurrentTime) And
(CurrentTime < EndTIme.ToString()) then
'Do Something
end if
But when i go to the immediate window:
?StartTime.ToString()
returns
"System.Windows.Forms.TextBox, Text: 20:00:00"
How do I simply compare StartTime and CurrentTime?
Thanks for your help...
nju0843
|
|
|
|
|
DateTime.Compare Method
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDateTimeClassCompareTopic.asp
|
|
|
|
|
Nick Ueda wrote:
But when i go to the immediate window:
?StartTime.ToString()
returns
"System.Windows.Forms.TextBox, Text: 20:00:00"
You answered this yourself:
Nick Ueda wrote:
I have two text fields:
StartTime = 20:00:00
and EndTime = 24:00:00
If you want the text in the text field read the Text property:
string startTime = StartTime.Text;
|
|
|
|
|
i want to make a button on my form which will select all items in a listbox (and another button to deselect all). im not sure how to do this. also, i would like to do it with a for.. each loop, as im new to them..
not sure how to, in code, set the selecteditems (or whatever the property is, not sure which one to use).
Dim item As String
For Each item In ListBox1.Items
ListBox1.SelectedItem = ListBox1.Items.IndexOf(item)
Next is as far as iv got, but it doesnt seem to do anything.. any help appreciated
------------------------
Jordan.
III
|
|
|
|
|
First, ensure that your listbox's SelectionMode property is set to MultiSimple or MultiExtended.
Next, ListBox has a method named SetSelected which is called with 2 arguments (index and boolean "Selected")
So to select all items you could use this code:
<br />
for(int i=0;i<ListBox1.Items.Count;i++)<br />
{<br />
ListBox1.SetSelected(i,true);<br />
}<br />
|
|
|
|
|
thanks alot!
is there a way to do this with a for..each loop? using the collection of items in the listbox?
thanks again
------------------------
Jordan.
III
|
|
|
|
|
I am trying to use the generated update statements with the OleDbDataAdapter. The adapter.update works fine if the fields are maped to a datagrid. When the fields are maped to text boxes nothing is updated. Any Ideas?
|
|
|
|
|
I created an address book that uses textbox to enter information. I used the OledbAdapter because it retrieves data through MS Access. This is the way I used this creation, by using a DataForm wizard, and the MS Jet as my connection. The wizard generates the entire form and buttons that will add, delete, update, and cancel. I believe this will work in your application.
Just create MS Access blank table with all the headings that you will need to your application. Then start you vs.net and create a new instance of the form. Right click the program in the solution explorer, and click on Add New Item, then click on the DataForm and open. You will see the Wizard and just follow the instructions. Remember, the connection window will open and you will need to make a new connection by using the MS Jet, then test your connection, and you will be on your way. Hope this helps to get your application running and get updates towards your text boxes.
bravo659
|
|
|
|
|
The problem I'm having is that the update made to the Data Set is not seen by the Adapter as a modified version. I can move back and forth through the records and the changes are present in the dataset, but when I try to update the datasource nothing happens. I have tried "ending edist" but it still dosn't see the dataset as having been changed. I'm getting the same result using the OLeDB and SQl adapters.
|
|
|
|