|
I take it you mean how do you call the LoadFile method from the MDI Parent? You use the ActiveMDIChild property of the Parent form, point a variable at it, then access it's RichTextBox control:
Dim activeChild As Form2 = Me.ActiveMDIChild
If (Not activeChild Is Nothing) Then
Try
activeChild.RichTextBox1.LoadFile(whatever you're using to pass the filename)
Catch
MessageBox.Show("A problem occured loading the file...")
End Try
End If
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hey that was cool!
It worked *wow*
Thanks!
|
|
|
|
|
Hey that was cool!
It worked *wow*
Thanks!
|
|
|
|
|
aThanks...
I am using an MDI and I have a child form with a RichTextBox. Whenever I press the 'New' menu, I create a new instance of the child form. So when I open a file from the 'Open' menu the Dialog Box shows up and when I press open, the active child form's richtextbox should show the file. How can I do it?
How can I use the 'LoadFile' method of the Active Child Form's RichTextBox from within the MDI?
|
|
|
|
|
Thanks...
I am using an MDI and I have a child form with a RichTextBox. Whenever I press the 'New' menu, I create a new instance of the child form. So when I open a file from the 'Open' menu the Dialog Box shows up and when I press open, the active child form's richtextbox should show the file. How can I do it?
How can I use the 'LoadFile' method of the Active Child Form's RichTextBox from within the MDI?
|
|
|
|
|
Hi,
I want to start / stop the GPRS connection from within VB.NET anyone any samples?
Thx
Scarr
|
|
|
|
|
VB.NET makes me so mad, here i am in my third month of programming and i cant even create some simple program with buttons, I am getting ready to quit this whole mess even though it vitalizes me like it does.
|
|
|
|
|
At the risk of opening a can of worms.....what can't you get going....
Just drag and drop a button onto the form, double click it, and add your code...whatever code you have there will be executed when you run your app and click the button...
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Of cos i grin at your candid admission. You may want to address the learning curve at
http://getdotnetco.web101.discountasp.net/VPASP/free/Articles/GettingStartedPart01.htm
You r not alone.. Gdluck!
1fm1fu
|
|
|
|
|
I know the frustration firsthand. VB.NET is a pretty big departure from previous versions. One of the things that has helped me has been books written by Peter Aitken. I found his book Visual Basic .NET Programming to be exceptionally easy to follow.
IMHO, Aitken has always been able to cut through the complexities and provide me with the info I needed at the time.
I don't know too many people who buy computer books to actually read them cover-to-cover, primarily, I use them for reference material whenever I get stuck on something.
The more resources one has at one's fingertips, the easier it is to learn the necessary mechanics. Once one understands the mechanics, one can then adapt it into an art.
Still coaxing software out of the can after all these years...
|
|
|
|
|
Thank you all for your encouragement, my teacher is right with each of you, she tells me i just don't have enough courage and confidance in myself.
|
|
|
|
|
Trust me when I say this. I tried to learn how to program for years and was never very good at it until my employer needed a custom app for Office.
I bought a few used books on VBA and found a number of sites like this one. I just started plunking away doing trial and error until I figured it out. You have to really love problem solving and be more stubborn than the code.
As far as I have been able to tell, once you really understand the "mindset" involved in programming, the specific language doesn't matter that much. Once you realize all the things that the more popular programming languages have in common, it doesn't seem quite as difficult.
Still coaxing software out of the can after all these years...
|
|
|
|
|
Hi,
I'm currently using Crystal Reports version 4.6.1.0
which is running on Visual Basic 6.0. I would like to know whether does this version support sending the reports to file and incoporate emailing function.
Thank you. Waiting eagerly for your reply
Best regards,
Jane;)
|
|
|
|
|
You'll have to provide that kind of support in your code. Printing to a file would be setting up a printer driver that specifically prints to a file and then you could email that file yourself using CDO. Crystal Reports 4 doesn't support this directly.
[EDIT]
The supported features documentation on CrystalDecisions website only goes back to version 6, but from what I can figure out, the bundled version that came with Visual Studio 6 does not support Exporting to a file or Email support, not even in version 6...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Used? You mean the maximum memory that was used?
Use the Performance Monitor (perfmon) and watch the following memory counters:
Process:
Pool Paged Bytes
Pool NonPageed Bytes
Virtual Bytes Peak
Working Set Peak
There is no one value that gives you an accurate measure of how much memory your VB app took up.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thanks! this problem have been solved.
I'm sorry that I am not use the exact word "used".
I mean the memory that application is useing.
|
|
|
|
|
Slightly different word, same exact problem. There is no one counter that can give you that information.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I've seen tons of samples online of using the VB-Addin control for VB6 for using DirectX, more importantly the directdraw portion.
I was able to muster up some Declarations to DDraw.dll (which was hard to find)...
Declare Function DirectDrawCreate Lib "ddraw.dll" (ByRef pGuid As GUID, ByRef lplpDD As DIRECTDRAW, ByVal pUnkOuter As Long ) As Long
Declare Function DirectDrawCreateEx Lib "ddraw.dll" (ByRef lpGuid As GUID, lplpDD As Any, ByVal iid As Long, ByVal pUnkOuter As Long ) As Long
Declare Function DirectDrawCreateClipper Lib "ddraw.dll" (ByVal dwFlags As Long, ByRef lplpDDClipper As DIRECTDRAWCLIPPER, ByVal pUnkOuter As Long ) As Long
Declare Function DirectDrawEnumerate Lib "ddraw.dll" Alias "DirectDrawEnumerateA" (ByRef lpCallback As DDENUMCALLBACKA, lpContext As Any ) As Long
Declare Function DirectDrawEnumerateA Lib "ddraw.dll" (ByRef lpCallback As DDENUMCALLBACKA, lpContext As Any ) As Long
Declare Function DirectDrawEnumerateEx Lib "ddraw.dll" Alias "DirectDrawEnumerateExA" (ByRef lpCallback As DDENUMCALLBACKEXA, lpContext As Any, ByVal dwFlags As Long ) As Long
Declare Function DirectDrawEnumerateExA Lib "ddraw.dll" (ByRef lpCallback As DDENUMCALLBACKEXA, lpContext As Any, ByVal dwFlags As Long ) As Long
GUID CLSID_DirectDraw = "{d7b70ee0-4340-11cf-b063-0020afc2cd35}"
Can someone give me some insight on how to get at the DirectX with these or are there other procedures that I also need before using these WITHOUT the Addin because I only have VB4 not VB6 besides the application I am making I want to make it so that I could port the code into a language like C++ if I could wiht little effort......
|
|
|
|
|
VB4????? There is a reason there is a control for this for VB6. What you're basically doing is rewriting that control. Are you sure all the work is worth it?
You've got a VERY, VERY long way to go to get all the functions, structures, and constants you need defined to get this to work. Your going to write far more code just declaring this stuff than you are using it. On top of that, you'll be completely on your own. There will not be any examples, using the methods your putting together, calling these functions from VB6, let alone VB4.
Besides, everything your doing in VB4, declaring this stuff, is already done in C++. You don't have to do ANY of the work your doing now...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Essencialy what I'm trying to accomplish is the use of the DirectX to output some MemoryDC's that I have already created to the final output instead of to a form window, or to the desktop window (which has yielded some strange results)
Basically looking for a fast way to BLT the output to a faster surface.
|
|
|
|
|
That's great and and all, but is it really worth the huge amount of work to just get DirectX initialized? After you have the image in memory, what are you going to do with it? I get the feeling your just going to run into the same bottleneck your trying to avoid.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I was looking around to see how to make a media file play in Vb in a form automatically. One of the options in the properties is "ui" and I was wondering what exactly a Ui actually is. And if anyone could tell me how to make a Media file like "sample.wav" play in VB on a click of a button (command button). Thanks alot, my game is due on monday, so im trying to get it all together.
|
|
|
|
|
Sound is a major component of a game. You should've had this integrated into your project a long time ago. Just slapping it in at the end... man...
Boggahutt87 wrote:
One of the options in the properties is "ui"
One of the properties of what? You didn't say what the class was that your looking at.
It is possible to play a wave file, but you'll have to use the Multimedia SDK, or DirectX DirectSound. I seriously doubt you want to use the MediaPlayer COM control to do this. Also, your getting into more complicated audio methods that REQUIRE a sound card to work. Just using the normal PC speaker, like you've been using with Beep, won't work.
Same as before. Declare the API function you want to call first:
Private Declare Function PlaySound Lib "Winmm" Alias "PlaySound" _
(ByVal pszSound As String, ByVal hModule As Long, fdwSound As Long) As Long
Now, when you call this function, you have to supply it with 3 parameters:
1. pszSound will be the filename of the sound you want to play, like "SOUND.WAV". The .WAV file must be in the same directory as your compiled .EXE to work.
2. hModule must be 0.
3. fdwSound must be 0.
You'll call PlaySound like this:
PlaySound "SOUND.WAV", 0, 0
And remember! If you get smacked down by the teacher for using code he didn't tell you about, and therefore you couldn't possibly write , it's not my fault!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anyone know how to get default printer using VB.NET?
I want to print the crystal report directly to the printer, but the problem is i need to specify the default printer inorder to print the report.
|
|
|
|