|
I use the following process
Application entry point is Sub Main.
Display the splash screen with form.show
Do the login useing a form.show (we use a seperate DLL for this)
if the validation is successful then do the Application.Rum(mainform)
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have a sql database that has multiple fields that I pull data from. On my visual basic form I have combo boxes that are linked to the database. Selecting the data I need, I push a button and I need the application to open a word document that is already prepared, pull the data from the data base and insert the data into specific fields in the document then print it. I don't need to save the document just close it.
I have the VB form and I can select the data and I can open the word doc. But how to write the data to the specific location on the word document is the trick I am having problems with at this time.
All help is appreciated
If any more info is need please ask.
Also if this is not the right forum please direct me to the one I need.
Dwood
|
|
|
|
|
Hey, I am trying to load an rtf document into a RichTextBox control from a file but nothing I do seems to work. I have tried the LoadFile method with no results as well as reading the file into a string and setting the Rtf property. Originally I thought there could be a problem with document so went into Word, created a new one, and saved it as an rtf. That still didn't work though no errors are being thrown. The Rtf property just returns to its default value and the Text property stays "". Anyone have an idea on what I am missing? Thanks!
This is one way I tried it...
Dim FSI As New FileStream("C:\RTFtest.rtf", FileMode.Open)<br />
Dim SR As New StreamReader(FSI)<br />
Dim strRTF As String<br />
<br />
strRTF = SR.ReadToEnd()<br />
strRTF.Trim(vbCrLf)<br />
rtbBox.Rtf = strRTF
And the 2nd way...
rtbBox.LoadFile("C:\RTFtest.rtf")
|
|
|
|
|
Hi Justin,
There is nothing wrong in your code. I have tested them and both method works fine. The only thing I suspect is the .rtf file you are reading because this code does not read an rtf file which contains lots of images, styles or graphics etc. I have uploaded a sample application which implements the desired functionality using same code snippet. Take a look and see if this helps. You can download the application from the following link
http://www.speedyshare.com/547595222.html[^]
Have a nice day .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
On a certain condition, I want the focus to start with a different control then the first one. No matter what I do it won't listen to the command textbox7.focus. In the form load I put the command. In form activate I put the command. Is there an alternative to have to create something like a timer to activate to set focus after the form is fully visible...
Any tips would be appreciated...
Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Hello Nathan,
You can try setting the TabIndex property of the control. You can use this in Form_load event.
TextBox1.TabIndex = 0
I hope this helps.
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
if that control is the first or last textbox then that's ok solution. however by doing so wouldn't that screwup the tab order for the rest of the controls?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
incase anyone is curious you need to use the paint event and setup a static variable to only issue the focus command once...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Hi there,
Use the Select command. - txtTextBox.Select
A programmer's life is good... or is it?? Ek dink nie so nie!
|
|
|
|
|
Im working in VB 6.0 while im doing reports i got a error
Paramater ?_1 has no default value
Can anyone help me to sort out this..
Regds
Krish Vignesh
|
|
|
|
|
The error message already explained it:
No default value is set for the parameter and you never supply the value for that parameter.
|
|
|
|
|
My question is related with VBScript.
But i didn't saw any topic with that one.
I have a small problem with a script.
Used this command : ret=objShell.run (strCommand ,0 ,true). Where strCommand runs 7-zip to do an archive. The problem appears if some files are in use by another process. 7-zip return and error code and the program stops there. I want the program to continue the execution because even with this error.
If I put the last parameter false the problem is that that the program doesn't wait for the archive to be done.
I looked for some hours on the net but didn't find anything so I'm a little desperate.
I really appreciate any help,
Thanks
|
|
|
|
|
The problem is with 7-zip rather than the VBScript.
check the parameters that are available for 7-zip. I suspect that 7-zip has encountered an open file and aborted, rather than continue on to the next file to compress.
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
no, he continue to compress the files and when he finish he throw this warning.
But the shell.run function see that the return code isn't 0 and suspend the program util I close the windows that 7-zip opened.
|
|
|
|
|
Please do not post questions in multiple forums when it is not necessary.Link[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
i am using this code in installer class . and when my setup run then it say msi not found Please Help me.
Code:-
Private Sub Installer1_AfterInstall(ByVal sender As Object, ByVal e As System.Configuration.Install.InstallEventArgs) Handles Me.AfterInstall
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start(Application.StartupPath + "\UccApiSdk.msi")
p.WaitForExit()
End Sub
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
YOu should use Path.Combine, not string mashing blindly. I guess the file is not there Have you tried debugging ?
Christian Graus
Please read this if you don't understand the answer I've given you
"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 reply.
Yaa i copy the msi file in the setup and i want to run that setup(Msi)file when my appliction setup installed. and in the file.combin file is string. PLease Help me
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Hello friends,
1)I've created one VB.NET dll.
2)I've created the .tlb file of this dll to use it in VB 6.0.
3)I am able to add the refrence of this .tlb file in the applicaiton.
But when I want to create the object of the class of this library using new method the library created in VB.NET doens't even appear in the list to create the object.
The code of VB.NET dll is as below.
Imports System<br />
Imports System.Reflection<br />
Imports System.Runtime.InteropServices<br />
<br />
<Assembly: AssemblyKeyFile("mykey.snk")> <br />
<br />
<ComVisible(True)> _<br />
Public Interface IAClass<br />
Function GetCurrentTime() As String<br />
End Interface<br />
<br />
<ProgId("MyCompany.MyLib.AClass")> _<br />
Public Class AClass<br />
Implements IAClass<br />
<br />
Public Function GetCurrentTime() As String Implements IAClass.GetCurrentTime<br />
Return System.DateTime.Now.ToString()<br />
End Function<br />
End Class
I've created the .tlb file from this dll.
The code of the VB 6.0 Application is as below.
Dim ob As SampLib.IAClass<br />
Private Sub Command1_Click()<br />
Set ob = CreateObject("SampLib.IAClass")<br />
MsgBox ob.GetCurrentTime<br />
End Sub
Please if anybody can tell what is the reason that doesn't allow me to use the .tlb file in VB.
Thanks in Advance to all of you.
ritz1234
|
|
|
|
|
Refer the links below:
http://www.codeproject.com/KB/COM/cominterop.aspx
http://msdn2.microsoft.com/en-us/library/ms973802.aspx
Regards,
Dave
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|
|
hai friends
in my project i have 6 picture boxes ,
and i want to write few code when a picture box is clicked ...
instead of writing for each picture box click event ...
my idea is to use "delegates" ..
wt is a delegate and can i use in this situation....
when to use delegates ..
plz give a example
i searched in google but i didnt understand it
bcoz i m new to the word "delegates" ...
plz help me ....
thanks in advance
vijay
devulapally_vijay@yahoo.co.in
|
|
|
|
|
Hello Vijay,
Refer the links below to get the detailed explanation for Delegates:
http://www.developerfusion.co.uk/show/5251/
http://www.stardeveloper.com/articles/display.html?article=2003070801&page=1
Regards,
Dave
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|
|
Hey frnds. Suppose Combo1 contains data ,I want that when we click on
buton & alll the items are copied to Combo2.
Plz reply.
Thx in advance.
|
|
|
|
|
Iterate through Combobox1's items using for each ... next and add every item to Combobox2 using Combobox2.items.add(yourItem) . Now, how difficult was that?
Are the keys "i" "e" and "a" broken on your keyboard?
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
hi,
i have to split an image (using VB6.0) into multiple and then to print into order to get larger of image.
i hav done it for printing it on 2 and 4 pages bt having problem implementing it on 8 pages.i.e. to splitt image into 8 parts and printing it on 8 pages bt maintaining its aspect ratio.
Thanks in Advance.
i m faisal
|
|
|
|