|
Thanks alot man!!
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
|
Visual basic 2005 Express Edition:
I have a PrintDocument:
Private WithEvents mDoc As New PrintDocument()
I would like to convert it to a Bitmap, so that I can write it out to disk as a JPEG.
How do I convert a PrintDocument to a Bitmap?
|
|
|
|
|
At the end of each "PrintPage()" event you could save the graphics object passes in as a bitmap.
Bear in mind that the bitmap will be paper size (i.e. much bigger than a screen)
Alternatively allow it to print to pdf (using a pdf driver) or take the EMF spool file and preview that with the article/code I submitted to this site last year.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
I can open word document like this
Dim WordApp As New Word.Application<br />
WordApp.Documents.Add()<br />
WordApp.Visible = True
Does anyone know to get or create word documents’s TextChanged event.
Thank you
Regards,
Chatura Dilan
|
|
|
|
|
I am not sure. but I think there is not direct event available.
the only option is to get the file write date&Time (and will occur only when the file is saved) for this two ways
1 is FileSystemWatcher.. check that
2. is to get the lastwrite time .. put this in timer
'
BeforeTime = System.IO.File.GetLastWriteTime(FileName with fullpath)
msgbox (beforeTime)
Rizwan Bashir
|
|
|
|
|
Thanks Rizwan, I'll try
Regards,
Chatura Dilan
|
|
|
|
|
Hi,
Is there any way in .NET language to create a user control which I can use as a Image Editing Canvas? I want a page like canvas on which I can add Text, image, rotate it, resize it and then crop, etc. And finally save the contents of the canvas as an image. Could you please suggest me the approach or any source code?
Thanks
Regards
Anil
|
|
|
|
|
|
Thanks Rizwan. I will check out the information.
|
|
|
|
|
Hi,
I am trying to create a form builder similar to this
http://www.formassembly.com/form-builder.php
First it creates a form. And then it creates sections which are added to the form. And then it creates form elements (Questions) to the sections. I am thinking of doing this using object oriented approach. Is there a specific design pattern that I can follow to code this hierarchy. Please let me know.
Thanks,
Sridhar.
|
|
|
|
|
hi...i hav just one question to ask..
1. how to populate a repeater from array?
2. i had already tried to populate a repeater using arraylist but the prblem is the latest data will overlap the previous data which means in the repeater, it only shows one row of data that is the latest data inserted...
my Question is...how to let the previous data in the repeater remains and the new inserted data will not overlap the previous data and will be displayed below the previous data in the repeater
i hope dat i will get the example of coding..tq so much...
mada mada dane
|
|
|
|
|
Hello:
For past two weeks I am struggling with an issue.
I wrote a VB console application [VB 2005 express]
Every thing is working fine expect the last part
At the end the code suppose to restrict access to a registry key to the “SYSTEM” user
i.e HKEY_LOCAL_MACHINE\Software\ABC_application
DWORD value is “GO”
Data is 3 in hex
I want to restrict “SYSTEM” to ABC_application key, in another words deny access explicitly.
I am referring to ACL permission to registry key, [regedit -> rightclick on regkey…]
Appreciate you help
|
|
|
|
|
Why on earth would you want to do this??
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
This is to enforce security of the application. I don’t want any one to change the permission [except Administrator, domain or local].
Especially to prevent abuse from half smart users...
Thanks
|
|
|
|
|
That's nice... Your application won't be able to change anything under that key. This is because the app runs under the security context of the user that launched it.
If you restrict access to that key to only SYSTEM, noone else, including Admins and Domain Admins, will be able to change anything under that key. You will restrict access to the Kernel and only the Kernel! This is of course, unless you change the default restrictions on the Admin accounts.
Does that REALLY sound like a good idea to you?? And does your app's security REALLY need to be that tight?? I doubt it...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave thank you for replying:
My understanding is that a regkey will have full control allow to SYSTEM and Administrator. So, if I deny to SYSTEM, I still could change permission back to allow with admin access, ie if I log on as administrator.
Currently, to test my app, I am changing permission manually [regedit --> right click on regkey, permission... so on].
Do I need it?
Because of sensitivity data’s I am incline to this solution.
|
|
|
|
|
The changes are working because permissions are being inherited from the keys above the one you're modifying. Take that away, and you won't be able to recover the key, or even get at it.
If the data is that sensitive, encrypt it. Don't put Admin's through the hassle of fixing this when it breaks. Notice, I didn't say if it breaks! Supportibility is not optional.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks again for feedback.
Right now got a work around [segregate keys with unrelated destination and key_names].
Encryption is not in scope yet.. But I will keep it back of my mind [i am sure it will a whole new beast, especially with fs]
FYI The solution I am dancing around
http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.registryaccessrule.aspx
also
One of the issues that I am not getting handled on is “SetAccessControl” [Microsoft.Win32.RegistryKey]
Thanks
-- modified at 14:40 Friday 5th May, 2006
|
|
|
|
|
i want to inherit image class. but it's error
who can help me?????
|
|
|
|
|
svincoll4 wrote: i want to inherit image class. but it's error
who can help me?????
You should post your error on the forum.
-- modified at 21:43 Thursday 4th May, 2006
|
|
|
|
|
this is my code :
<br />
public class ImageData<br />
inherits System.Drawing.Image<br />
<br />
end class<br />
when i write it, a error show : "Class 'ImageData' must declare a 'Sub New' because its base class 'Image' does not have an accessible 'Sub New' that can be called with no arguments."
so, i wrote it then :
<br />
public class ImageData<br />
inherits System.Drawing.Image<br />
Sub New()<br />
end sub<br />
end class<br />
then, a error next: "First statement of this 'Sub New' must be a call to 'MyBase.New' or 'MyClass.New' because base class 'System.Drawing.Image' of 'ImageData' does not have an accessible 'Sub New' that can be called with no arguments."
then, i continue write :
<br />
public class ImageData<br />
inherits System.Drawing.Image<br />
Sub New()<br />
MyBase.New()<br />
end sub<br />
end class<br />
a error next again : "Overload resolution failed because no 'New' is accessible."
i don't understand it
|
|
|
|
|
As the Image class doesn't have any New method without parameters, you have to supply one or more parameters in the call.
Look to the reference to see what parameters you can use.
---
b { font-weight: normal; }
|
|
|
|
|
but Image class no contructor
|
|
|
|
|
You are right. I tried to do it myself, and I failed to find a way to inherit from Image.
The documentation mentions the Image class as providing functionality for the Bitmap and Metafile classes. Perhaps it's not meant to be expanded by other classes, e.g. having an internal constructor so that only classes in the same assembly can inherit from it.
---
b { font-weight: normal; }
|
|
|
|