|
Usually, there is no way to do this. if you have one project that depends on the existance of objects in another project (like a form), you really haven't split the projects properly. Each project is it's own self-contained module that shouldn't know anything about objects in other projects.
You can't do it from Forms app to Forms app, but it can be done from an ActiveX server or .DLL project. You'll have to pass a reference to the form you want the code to modify to the code in the server or the .DLL project. Then that code can use the reference to make changes to the form.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I'm trying to implement a journal playback proc in VB.NET...the journal record seems to be working fine...however the HC_SKIP in playback proc seems to never get reached...apparently windows keeps calling the playback proc with code HC_GETNEXT only...so i can't advance to the next message until HC_SKIP is called...has anyone ever had this issue?
Thanks
|
|
|
|
|
If code is HC_GETNEXT and the return value is greater than zero, the system sleeps for the number of milliseconds specified by the return value. When the system continues, it calls the hook procedure again with code set to HC_GETNEXT to retrieve the same message. The return value from this new call to JournalPlaybackProc should be zero; otherwise, the system will go back to sleep for the number of milliseconds specified by the return value, call JournalPlaybackProc again, and so on. The system will appear to be hung.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Hooks/HookReference/HookFunctions/JournalPlaybackProc.asp
|
|
|
|
|
Hi all ...
I have the following problem ... please, if any body can help me, i will be very thankful ...
While the focus on the datagrid control the handled functions 'Key Up' and 'Key down' did not called..
This means that the datagrid does not accept the keyboard keys..
any one can express that ...
Thnx alot ...
|
|
|
|
|
hi,
Once you have focus on your datagrid object then it will always handle these events.
KeyPress -> KeyDown -> KeyUp
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
They will not be called for Datagrid, but they will be called for DataGridTextBox.
|
|
|
|
|
Does anyone have any information on capturing the audio and video from running games and writing it to and avi file. I am looking for code which is not hardware specific, ie without the need for a capture card.
Any help would be appreciated. Thx
|
|
|
|
|
Your best bet is to either use the movie capability that might be built into the game, possibly called "recording a demo" also, or to use Windows Media Encoder 9. Those are going to be the better and more flexible options, than spending the next 6 months writing your own capture software. (I mean, why reinvent the wheel?)
But, if you use the encoder, or even come up with your own code, the overhead for capturing screen movies is MASSIVE. This will reduce the performance of your game dramatically, especailly at higher resolutions. You can reduce this effect by disabling compression as the movie is written, but this will result in a HUGE .AVI or .MPEG file that you'll have to reprocess to compress down to a more managable size.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have the following problem:
I build a program where the user can save his/her progress to a file. What I want is that the user can double-click the saved file and that they can continue with the file they saved.
I tried the following code:
<br />
Sub Main(ByVal args() As String)<br />
' Display arguments passed to the application<br />
Dim s, path As String<br />
<br />
For Each s In args<br />
path = path & s<br />
Next<br />
<br />
Application.Run(New CMMain(path))<br />
End Sub
but I ended up with a wrong path for example: c:\ProgramFiles\MyApplicationFolder\Project\testfile.sav
ProgramFiles has to be Program Files (The space is gone)
MyApplicationFolder also spaces gone
How can I solve this? Probably an easy solution but I haven't found it jet.
Thanx in advance
|
|
|
|
|
When you are concatenating all the parts of the command line together you are not inserting a space. When the Command line arguments collection is built the parser splits the command line when it finds space characters.
Also, there is a much better of joining these parts together. See String.Join()[^] in the MSDN library.
Does this help?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Yes this helps.
It's the solution for my problem.
Thank you Colin.
|
|
|
|
|
Any one out there who knows the source code in converting PDF to word documents??
jonathan
|
|
|
|
|
Here[^] is the information that could convert word to PDF (it is not match your question). In my opinion, you should use any method to read the content of PDF and transfer it to hidden RichTextBox control (RichTextBox control could keep some original text formatted). After the process is finish, you can transfer the content of RichTextBox control to word application.
Hope this work
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
The sample you gave will only work for converting Word to PDF. It won't work the other way around.
I can't find any (free, anyway) components that will convert PDF to Word...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hope that component will release soon. Dave, how about the method to read the content of PDF and transfer it to hidden RichTextBox control (RichTextBox control could keep some original text formatted). After the process is finish, you can transfer the content of RichTextBox control to word application. Is this way could solve this problem? Have you use this method before?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I haven't read anything from a .PDF files because I've never had the need to. You could use a RichTextBox control, but you would have to read the .PDF and supply the code to parse it and reformat it in RTF markup. The RichTextBox control knows nothing of the .PDF format, so loading it into a RichTextBox control would do much of anything to solve the problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
HI all!
When designing a control, i embedded some pictures into the project.
But when i try to access them i get no joy!
the thing is the code i use works fine on just a standard project, but when i try it in the control, no stream is returned!
The namespace im using is correct, and ive even tried putting the resourses in both the usercontrol project and the test project!
Heres the code i use for standard projects:
Public Function GetEmbeddedImage(ByVal AppForm As Object, ByVal strImageName As String) As Bitmap<br />
Dim Exec_Assem As [Assembly] = AppForm.GetType.Assembly.GetEntryAssembly<br />
Dim myNameSpace As String = Exec_Assem.GetName.Name.ToString<br />
Dim PicStream As Stream<br />
Dim BMP As Bitmap<br />
<br />
PicStream = Exec_Assem.GetManifestResourceStream(myNameSpace + "." + strImageName)<br />
BMP = New Bitmap(PicStream)<br />
GetEmbeddedImage = BMP.Clone()<br />
<br />
BMP.Dispose()<br />
PicStream.Close()<br />
<br />
<br />
End Function<br />
<br />
the only differnce in code i use when calling from the usercontrol is :
GetEntryAssembly
Instead of which i use
GetExecuting Assembly
as this returns the user control assembly instead of the test project assembly.
Thanks for your help!
|
|
|
|
|
We can Add IExplorer component in Vb 6.0 ... How to Add The browser Control Of Internet Explorer in VB.Net..
|
|
|
|
|
On the toolbox, right-click anywhere and select "Customize toolbox"
Scroll down to reach "Microsoft Web Browser"
Check it and click Ok
A new browser control is added to the toolbox...just drag and drop it on your form and start working
|
|
|
|
|
Right click on the the toolbox, choose Add/Remove Items, go to COM Components Tab, and search for Microsoft Internet Browser (Path: ....\system32\shdocvw.dll)
|
|
|
|
|
Can someone please tell me the difference between these two statements
1 Public DataForm12 As New Form1
And
2 Dim DataForm12 As Form1
The first one is declared in a startup module, but when I try to access any of its controls from another form in the same app, I get no response. For instance: if I try to set a control on DataForm12 to enabled=false nothing happens.
The second one I just do not know about
Thanks
|
|
|
|
|
Public DataForm12 As New Form1
Declares the public member DataForm12 with the type Form1 and (because of New ) initializes it with a reference to a newly created Form1 object.
Dim DataForm12 As Form1
This DataForm12 however is valid in the code block in which it has been declared. Because there is no New operator this variable is initialized with Nothing . If you don't need two instances of Form1 you don't need the second variable anyway. Supposed you have got this code:
Module MyModule
Public DataForm12 As New Form1
End Module
Then you can access the member DataForm12 anywhere else in your project because a modul behaves like a static class.
MyModule.DataForm12.Show()
Best regards
Dennis
|
|
|
|
|
Hi Dennis
Thanks to you I finally saw what my problem was: I had not only declared the form in the module(Public), but I had declared it a couple other times(Dim) in other areas of the app also.
Thanks
|
|
|
|
|
Hi,
I'm sending mail using System.Web.Mail namespace. My email body is come from a rich text box (rtf property of richtextbox).
I also set the email body format to MailFormat.Html
But when sending mail successfully, the email body display all the format tag, not html format, like this
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}} \viewkind4\uc1\pard\b\f0\fs17 alo\b0 \par \par \ul\i ola\ulnone\i0\par }
How could my body have html format?
Please help me.
Thanks.
|
|
|
|
|
You have to convert the RTF formatted text to HTML yourself, wheather by your own code, or using a 3rd party component. There is nothing in the .NET Base Class Library (BCL) that will do this for you. Most commercial 3rd party components for this conversion aren't cheap either. But, you might want to check out the OpenSource sites, like SourceForge. I found DocFrac[^] there. I haven't used it, but it might do the job for you.
After you convert the RTF to HTML, all you have to do is assign the HTML string to the Body property...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|