|
after searching high and low i am unable to find anything in .net or 3rd parties for converting rtf or any text to postscript.
is there any classes in the .net framework that allows this to happen dynamically? i have an rtf interface application written in vb.net that i want to write out to postscript.
can anyone point me in a direction that will that the rtf to postscript?
joe
|
|
|
|
|
I'm trying to load an image file from a web server. The request simply fetches a file from an HTTP location that I know exists (it loads in IE).
However, when I run the program I get the following:
System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
I don't know of any changes to our ISA server, but I have SP4. Does anyone know how to fix this?
Lost
|
|
|
|
|
Hi
If i print a graphic created using .net code directly to the printer, it is very neat. But if I save the same as a BMP file and print the output is not as sharp... can anything be done to retain the sharpness
|
|
|
|
|
how can i change icon of my VB exe if it doesn't have any forms.
my app has no gui interface (only modules and classes)
any clues!
rIsHaBh
|
|
|
|
|
is it possible to set icon for executable (which has no forms/gui) without using any external add-ins
rIsHaBh
|
|
|
|
|
If I have an application that uses the FromFile("Pathname") method, how can that code recognize where to find that file on another computer.
For example, if I want to display a picture that I'm developing on my computer and I use the FromFile("C:\my Bitmaps\Pic.bmp") that's all fine and dandy.
But if I were to install that application on another computer, and when deployed, generically dumps every dependent file into "C:\Program Files\WindowsApplication1", the path I originally gave to find the Bitmap "C:\my Bitmaps\Pic.bmp" will no longer be valid.
How can I make it so that when the application is installed on another computer, all the paths will be correct?
Thank you
The Jazz Master 6000
DJ Badknees
Parma Grind Crew - www.geocities.com/parmagrindcrew
|
|
|
|
|
I am not sure I understood your question correcty, but:
1. If the user wants to open an arbitrary picture on your program, you can use the OpenFileDialog class to get the path and then use that path on Bitmap.FromFile() method.
2. If you are talking about a picture that you want to distribute with your program, install it in the same directory as your executable and use something like Application.StartupPath + "\pic.bmp" or embbed it in the executable.
|
|
|
|
|
I think the second option is the one I was looking for.
Let's say under the Form_Load event, I want the form to open up with a picture. On my computer, the picture is located at C:\my pics\Pic.bmp, but if I were to install this program at on another person's computer, it would install at the default location C:\Program Files\WindowsApplication1\Pic.bmp, and when he would try to run the program, it would not find the picture because my code is looking for C:\my pics\Pic.bmp, not the other path.
So instead of using BitMap.Fromfile("Path") just use Application.StartupPath & "\Pic.bmp" ?
Also, how could I embed a picture or a WAV into the executable?
thanks
The Jazz Master 6000
DJ Badknees
Parma Grind Crew - www.geocities.com/parmagrindcrew
|
|
|
|
|
I think the second option is the one I was looking for.
Let's say under the Form_Load event, I want the form to open up with a picture. On my computer, the picture is located at C:\my pics\Pic.bmp, but if I were to install this program at on another person's computer, it would install at the default location C:\Program Files\WindowsApplication1\Pic.bmp, and when he would try to run the program, it would not find the picture because my code is looking for C:\my pics\Pic.bmp, not the other path.
So instead of using BitMap.Fromfile("Path") just use Application.StartupPath & "\Pic.bmp" ?
Also, how could I embed a picture or a WAV into the executable?
thanks
The Jazz Master 6000
DJ Badknees
Parma Grind Crew - www.geocities.com/parmagrindcrew
|
|
|
|
|
If you include that Bitmap in the project directory, you can then include it in your project and select Build Action to embedded resource in the properties window.
To retrieve the embedded bitmap you would use the overloaded constructor Bitmap(Type type, string resource), where the parameters type would be ME.GetType() and resource would be "myBitmap.bmp".
If you choose the Build Action as content, it will be installed in your program's directory in the user's computer and you can use a relative path to it: Bitmap(string path) where path is just the full name (myBitmap.bmp).
As to the wave file, it can also be embeded if you include it in the project and set the build action to embeded. Then to retrieve it, the only option I see is to retrieve it as a raw stream (using the GetManifestResourceStream, for instance), but maybe there some other way to retrieve it that I am not aware of.
|
|
|
|
|
Thanks A lot! The application.StartupPath namespace worked like a charm!
The Jazz Master 6000
DJ Badknees
Parma Grind Crew - www.geocities.com/parmagrindcrew
|
|
|
|
|
Hello everybody...
i need help in running applications other than exe files using visual basic 6.0 i.e. if i want to open a .doc document using visual basic depending on the user chosen from the open dialog box not statically
shell("c:\program files\office\word.exe c:\mydoc.doc") this opens always the same document..
this is not what i need. i want the user to browse his computer for certain files extensions on his harddrive and when he chooses the file it opens.
P.S. the program must work for only one extension...
thank you very much
adnan madi
|
|
|
|
|
in vb6 :
Add the Microsoft Common Dialog Control to the components
then add the control to the form
CommonDialog1.Filter = "Doc|*.doc"<br />
CommonDialog1.ShowOpen<br />
<br />
shell c:\program files\office\word.exe" & CommonDialog1.FileName
you better also check if the user click cancel by checking the length of CommonDialog1.FileName
|
|
|
|
|
Hi
I'm trying to access a sequence which is part of a node in an XML file.
<br />
<property pr_ref="ABC" ... ><br />
<sellingpoint text="HALLWAY" /><br />
<sellingpoint text="DINING ROOM" /><br />
<sellingpoint text="KITCHEN" /><br />
</property><br />
I can iterate through the "property" nodes and retrieve their columns (pr_ref) but how on earth do I access the sequence of selling points? I've tried childrows and parents rows and I'm lost!
I'm using VB.NET and I have the entire file in a DataSet. The second table of the dataset seems to contain ALL of the sellingpoint rows, not just those related to the one property.
I'm desperate!
Bernhard
Don't worry, nobody lives forever.
|
|
|
|
|
The DataSet will load the different levels of nodes into seperate tables, but will create relationships between those tables for you. The property table that is created in the DataSet should have a relationship to the sellingpoint table, which could be accessed through the DataSet.Tables(0).ChildRelations collection. Using this DataRelation, you can access the sellingpoint children of a property row by doing DataSet.Tables(0).Rows(0).GetChildRows(DataRelation).
There are other ways to do this as well. Just take a look at the help for DataSet and DataTable for more information. Or, to get an idea of exactly what is in your DataSet after loading the XML, set a breakpoint in your code, and do a QuickWatch (right click on an object after breaking into code during debug of your application) of your DataSet.
|
|
|
|
|
Hi,
I hv an application that need user to key in value for 2 text box. After that i will bind data to combo box based on the values of text boxes. However, i don't hv a button to trigger that binding process. I want to perform this process in combo box click event. But i hv to click the combo box twice. How to make user only click combo box once and then the value will directly pop out in combo box?
Private Sub cbSubconRoute_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbSubconRoute.Click
If (txtN.Text = "" Or txtC.Text = "") Then
lblTxnStatus.Text = "Please Key In NSID And NSSPEC!"
Return
End If
If (cbSubconRoute.Items.Count < 1) Then
bindDataForComboBox()
End If
End Sub
Private Sub bindDataForComboBox()
cbSubconRoute.Items.Add("")
cbSubconRoute.Items.Add(txtN.Text)
cbSubconRoute.Items.Add(txtC.Text)
cbSubconRoute.Refresh()
End Sub
|
|
|
|
|
I don't think you're not going to be able to do it that way. Why not add an event to the text boxes that checks if they both have text in and populate the combo box then? or maybe populate the text box on the Mouse_over event of the combo box?
Beware the chickens, for in their silence, they plot...
Life is too short to be taken seriously.
-- Oscar Wilde
|
|
|
|
|
Hi,
I have trouble in executing shell commands within windows service. Below is my code in Timers Elapsed event. Timers interval is 5 sec. Other than this code everything else is working. I am not sure why I am unable to execute this code. I am running my windows service as a User, which has administrator rights. I also tried to run this windows service as LocalSystem but nothing happens.
Have a nice day.
Naqsh
Private Sub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
Dim proc As System.Diagnostics.Process = New System.Diagnostics.Process()
proc.StartInfo.FileName = "cmd.exe"
proc.StartInfo.Arguments = "/C net start ""IIS Admin"""
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
proc.StartInfo.CreateNoWindow = True
proc.Start()
End Sub
Justice and Peace for everyone.
|
|
|
|
|
That's because (I THINK!!) CMD will only launch on Desktop 0, what the user sees. You can't launch CMD from a service because the service has no visible desktop and has no access to interactive inputs (keyboard and mouse), which CMD requires.
What you should be doing is using the ServiceController class to start the IIS Admin Service. This is done something like this:
<br />
Dim myController As New System.ServiceProcess.ServiceController("IISAdmin")<br />
If myController.Status.Equals(ServiceControllerStatus.Stopped) Then<br />
myController.Start()<br />
End If<br />
RageInTheMachine9532
|
|
|
|
|
how can I print html code as it looks in internet exploer using VB
for example.. the text has following html code
<br />
< html ><br />
<body><br />
< b >hello! how are you !!! < /b ><br />
</body><br />
< /html ><br />
vb supposes to print
hello! how are you !!! in bold.
|
|
|
|
|
Do you mean displaying a web page in a VB program? You can use the Web Browser control on your form to do that.
--
Ian Darling
|
|
|
|
|
I want to print it.. I dont' know what to use..
all the given html code should be printed as we see on the web browser.
|
|
|
|
|
There is a artical in .Net Journal about a spider crawler
that has a parser library in the download. I am sure it's
not as good as IE but it is managed and no COM.
Bo Hunter
|
|
|
|
|
Hi,
If you are using MS Internet controls a.ka Web Browser control then you could use.
In the plethora of constants, the following can be found as a member of SHDocVwCtl.OLECMDID to be used as a parameter to ExecWB...
Const OLECMDID_PRINT = 6
Const OLECMDID_PRINT2 = 49 (&H31)
Const OLECMDID_PRINTPREVIEW = 7
Const OLECMDID_PRINTPREVIEW2 = 50 (&H32)
The Browser control exposes ExecWB which is simply an OLE execution/action method.
for example...
objBrowser.ExecWB OLECMDID_PRINT
Hope this helps.
Regards
Benkku
|
|
|
|
|
The CmdExecOption parameter is not optional so use...
objBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
Regards
Benkku
|
|
|
|