|
How can check a string between two forms.
|
|
|
|
|
How many times are you going to post this question? This is your third and it's considered very rude.
You haven't described what you mean by a "counter"? Counters don't check strings. They count, nothing else. What is this counter counting? What are you checking for in the string?
Passing the string between forms is not hard at all.
' Form1
Dim f2 As New Form2
f2.CheckString("This is a string...")
' Form2
Public Function CheckString(ByVal strToCheck As String) As Integer
' Do some kind of check on the string
Return intResult
End Function
Like I said, since you haven't supplied any code what so ever, it's hard to tell you what you doing right and wrong.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi..
I'm actually trying to do a project on converting Ms word into PDF and storing them in SQL server database. The problem is that i would like to the conversion without using third party software. However, i can't find the codes or snippets in vb.net. Appreciate any help on this matter. Thx
|
|
|
|
|
Sorry. You're going to use third party software to convert to PDF. There are no snippets anywhere on how to do this because of the complexity involved. The only free solutions are going to be PDF printer drivers that create a .PDF file that you can then read as binary data and send to a large field in an SQL database.
Search http://SourceForge.net to find some open source projects that do this. You'll quickly see why you haven't found any .NET code snippets...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Actually, there is a way to convert text files to PDF format, and I guess by using VBA to convert the WORD document to text, you could then convert it to PDF. I can't post the open source code on this site because I am not sure where I got it from and therefore I do not want to infringe on publishing notices (I have the author, but no website). Get in contact with me and I will send a ZIP file from my code library. I've used it to create simple text reports and it works great!
Also, if you have time on your hands, you could read up on the PDF file format. Adobe has a 518 page reference that explains how to do build it. You can get a copy of this file from: http://www.wotsit.org/
|
|
|
|
|
|
Thanks for the comments Dave and Garrett. I will try out the codes and convert them into vb.net and see it it works. Thanks for the url links again. Cheers.
|
|
|
|
|
Hi, I would like to share an idea with you. I never do it but I think it might work of something go smooth with the following step.
1. Install the adobe acrobat writer. So when you need to convert any file (ex. Ms word) you have to go to File menu and Print… sub menu and choose Adobe Acrobat Writer from the select printer name and save it in a proper place.
2. Create your VB6 or VB.NET application that could connect to the SQL server database.
3. Write the code in appropriate procedure to select the source file (ex. Ms Word file) and then call for the Print Dialog box (using the common dialog control or common dialog API).
4. After select the acrobat writer from the printer name and press then it will prompt you to save the file into the specific place. Then save it and write the code to return the path and file name of the file that you save in acrobat and return that string to store in the database.
This method could make your database file require small amount of disk space and easy to access the file from your application.
If any one have any comment about this solution please correct it in order to share our knowledge and idea to each other.
Roath Kanel
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I've seen such conversion being done in VB 6..using adobe acrobat. However, trying to apply the same concept in VB.Net resulted in errors. I will attempt to solve it. Thanks for the steps to solve it, Roath. Appreciate it.
Regards
Frank
|
|
|
|
|
Could you help me to make two forms. one for input text and other for output the text.
I need the out put to appear in the second form when i click the button and the counter check the name.
Go forward and never Stop....
|
|
|
|
|
This sounds too much like a homework project. You'll have to write the code. We can help with specific questions, but we wont' design and build it for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Could you please help me convert this to Vb.Net? Thank you very much in advance.
Getting an image area for displaying in B/W.
CRecImage Image;
CRecInfo Info;
COleVariant vBitmap;
LPBYTE pBitmap = NULL;
HBITMAP hBitmap;
try
{
. . .
Document.SetLineOrder(TOP_DOWN);
Document.SetPadding(PAD_WORDBOUNDARY);
Document.SetRGBOrder(COLOR_RGB);
vBitmap = Image.Get(Info,0,0,160,100);
SafeArrayAccessData(vBitmap.parray,(void **)&pBitmap);
hBitmap = CreateBitmap(Info.GetWidth(),Info.GetHeight(), 1, Info.GetBitsPerPixel(), pBitmap);
. . .
SafeArrayUnaccessData(vBitmap.parray);
VariantClear(&vBitmap);
. . .
catch(CRecException e)
{
TRACE("Error code = %X\n", e.m_hr);
}
|
|
|
|
|
The first question is what is this code supposed to do? I take it it's C++ code and not C#?
There are three classes that are used here, CRecImage, CRecInfo, and CRecException, that not defined in the standard Windows C++ libraries, so you'll have to rewrite those classes in VB.NET. Also, what is 'Document' supposed to represent?
What are you trying to do with this code? What I'm getting at is that it may be possible to write something up in VB.NET native code that doesn't rely on P/Invoking the Win32 API to get the same functionality.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
Also, what is 'Document' supposed to represent?
Looks like it came from an MFC application. But, it still doesn't help work out what it is supposed to do.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|
|
That's the problem. I would hate to have this person go through all the trouble of translating this thing, end up with a huge mess of code, then find out that the same thing could have been done with 3-5 line of VB.NET code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This is what I am trying to do:
I have a scanned images that I would like to convert to Bitmap images and also would to resize or create a thumnails.
This sample is written in C and was given by ScanSoft tutorial. I can't quite get it right in Vb.Net?
Thanks for your help.
|
|
|
|
|
What's stopping you from loading the scanned image into a Bitmap control and parsing out what you need from there?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Image.Get(Info,0,0,160,100)
the above statement returns an object of unknown. But, really need this to be a Bitmap. Do you know how to convert this to Bitmap?
Thanks
|
|
|
|
|
I want to run two forms at the same time. Also how can i send a text from the first to the second using a buttom.
Thanks.
Go forward and never Stop....
|
|
|
|
|
Make a property on the second form Public so that the first form can get to it. Or you could make a Textbox on the second form Public.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello
i want to know where can i find the file/folder required to get the winsock control
i cant seem to find it in my vb.net
thank you for your help
Gary
|
|
|
|
|
VB.NET provides the functions of winsock in system.net.sockets. Use the tcpclient and tcplistener classes in your code.
|
|
|
|
|
Hi
I want add one menu item which includes one icon before text, on the menu system of windows when I click right mouse on file.
Example: whenever I click right mouse on file, the menu system of windows will display my menu item named "Send file".
It is the same as Winzip app.
Who can help me??? Thanks a lot
tramdtt
|
|
|
|
|
That's either going to be a context menu Shell extension, or, "Send To..." already exists. All you need to do is add the shortcut to the users "Send To" folder in "C:\Documents and Settings\[userID]\SendTo". For example, you could put a shortcut to Notepad in there, right click on an file and select "Send To.../Notepad" and this would get executed:
C:\Windows\NOTEPAD.EXE [fullPathToFile]
Then all your app has to do is get its CommandLine parameters.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, thanks a lot Dave
But I want when I click right mouse on file, it will display one menu item named "Send File" on the menu system of Window. Because my app need that.
I have solved it!!!
Now, my problem is the icon in front of the text of menu item???
It is the same as the symbol of Winzip???
Do you understand me???
Thanks
Good luck
tramdtt
|
|
|
|