|
Can you elaborate more on the problem?
What i understand is that you dont want to allow user to add new row to datagrid?
Lata
|
|
|
|
|
i want to add a picture for each user in active directory. but i've problem with matcing the type of property picture. I try to use a system.drawing.image to create this picture with the fromfile method. but i can't set the picture property with this object it returns error. I try to convert this object to byte() but they say it's not possible to convert system.drawing.image to a byte().
|
|
|
|
|
Can I ask why you would want to bloat ActiveDirectory with this? Synchronization is slow enough without pictures embedded in it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i 've to make a directory an enterprise who need to get a picture of
workers. this enterprise use AD for administrate the network, so they want to implement directory with AD
|
|
|
|
|
In that case, I would HIGHLY suggest doing an impact study on the performance of replication and the performance of administration after adding a 10KB (or whatever the size is) picture to every user object.
I don't think you'll like the results.
I'm still trying to come up with sample code, but so far, I can't find any.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm new to file handling in VB.NET as well as new to parsing Postscript so bear with me...
I am parsing large .ps files into smaller ones by detecting document breaks inserted into the Postscript code using comments. For example: On the first page of each document, there is a unique comment string followed by a file name. I use the file name to name the resulting parsed file. For those not familiar with Postscript, many of the print resources (i.e. images, fonts, etc.) as well as page layout, margins...you get the idea...are defined up front. Then, individual pages follow and finally a trailer section that wraps up the file with page counts and stuff.
My program scans through the Postscript code looking for the first page. It then saves the prefix section in a character array and jumps to about 1K from the end of the file and looks for the trailer (I do this because the files are large and I don't want to pass through the entire stream twice). I save the trailer in a second array and then jump back to where I left off after reading the prefix.
Finally, I start processing the individual pages. Each time I find the file name comment, I open a new text file, write out the prefix array, then loop through all of the pages until I find the next file name comment, writing out the pages as I go. When I've found the last page, I write out the trailer array (updating pages counts and such), close the file, open the file for the next document.
Works great...until...I came across a .ps file with a large image stored as a chunk of binary data embedded in the prefix section. So now to the details.
I was using a Filestream with a BinaryReader to read the input data. I was using the ReadChar method to return each character, store it in the array and move on. This was working great until the aformentioned file came into my life. When that file was processed I started getting the "Conversion buffer overflow" error that I've read so much about. It always happened on the same byte (containing x'FF'). The odd thing was that many other bytes around it contained the same data and it didn't have a problem. I tried switching the program to use a StreamReader and that got around the conversion buffer error but now I was having problems jumping around in the file due to buffering and I couldn't get the DisposeBufferedData method to work for me. So, I tried switching to using the ReadByte method of the base Filestream and the program is working BUT (hopefully you're still with me), something in the binary section is getting messed up because now Distiller can't process my Postscript code. My guess is that a conversion in the binary data is happening because I don't understand something low-level that is going on under the covers of the Filestream class.
So, to make a long story short (too late), can anyone point me in the right direction? Do I need to go back to using a BinaryReader and handle the data at a lower level? Postscript files are just text files and we have done similar things in VB6 without so much trouble. Anyone know a good book on file handling in VB.NET?
Any help, pointers, or direction would be appreciated.
Thanks,
Chris
|
|
|
|
|
Hey Chris,
I'll help you if I can, But Distiller can't prosess the embeded image anyway, so why don't you just find the start and end of the embedded Image code and throw it away?
progload
|
|
|
|
|
That's a good question...I was just using Distiller to test the validity of the Postscript files that my program is creating. In production, these .ps files will be converted to PDF using Ghostscript. The original file goes tot he printer, the individual PDF's are archived for on-line viewing and re-prints. I don't know if the embedded image is even needed (or what it is for for that matter, I'm coding this to help out another group). I should try these files through the Ghostscript program and see what happens.
Update...I was comparing the output of my program to the the original file and it appears that the data in the image block somehow was converted to double-byte characters. For example, when the input character was x'FF' in the output there is now x'C3BF'. I'm thinking it is because I'm using a StreamWriter to create the output files. Maybe I should use a BinaryWriter to create the output.
Any thoughts?
Thanks,
Chris
|
|
|
|
|
chris,
Ah, yes... I had a !clue! I knew it was either ghostscript or Radical eye.
Yes, you would have to use the Binary Reader/Writer.
progload
|
|
|
|
|
Not anything illegal or dodgy.
I want to start building in a product key authorisation into my application. Obviously, there's need to be some criteria to make it unique.
Does anyone know of anywhere that discusses this, practices or samples?
|
|
|
|
|
There are thousands of idea's & code all over the net, from gathering system statistics(hard drive ID's, Serial Numbers... ect...),to using date based algorithms, or both, so here a link to start you on your way...
It's in C# but I think it should give you an Idea or two.
http://www.codeproject.com/dotnet/LicenseKeyGeneration.asp[^]
|
|
|
|
|
I want to insert powerpoint slide into picturebox in vb.net.
Could anyone help me?
Thank you!!
|
|
|
|
|
You can't. The PictureBox doesn't know how to handle PowerPoint slides.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I need to insert existing powerpoint slide (already created presentation slide in powerpoint) into vb.net.
So how should i do ???
Thank you!!
|
|
|
|
|
That depends on what you want to show. If you want to show a simple static slide (with no movement at all), then you could take a screen shot of the slide and show that in a picture box.
If you want to show an active slide or slide show, then you have to embed PowerPoint into your application, just like Excel or Word, and use it to show the slides.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
but how?? Could you explain it in more details please.
Thank you!!
|
|
|
|
|
|
Hi,
I would like to know how can convert a string to integer with VBA
thx
|
|
|
|
|
i don't know VBA, but in VB.NET, you use Integer.Parse() or CInt()
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
VBA supports most of VBScript's built-in functions.
In this case I think you want CInt()
|
|
|
|
|
intValue = val(stringValue)
this val will not only convert string into integer but also covers the exceptions like the string is blank then it will make it 0.
|
|
|
|
|
I want to add a button control on winform by code.
How to do ?
Thanks!
|
|
|
|
|
pasts a control on your form. then go to the code and check the code which is generated. now same type of code can be written by you on any button click or any other event.
|
|
|
|
|
Dim myButton As New Button
myButton.Name = "whatEver"
myButton.Text = "Button Text"
myButton.Location = new Point(whatever, whatever)
myButton.Size = new Size(whatever, whatever)
AddHandler myButton.Click, AddressOf myButtonClickHandler
Me.Controls.Add(myButton)
.
.
.
Private Sub myButtonClickHandler(ByVal sender As Object, ByVal e As System.EventArgs)
' button click handler code goes here.
End Sub
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm working on a application in vb.net and I need to get the name (not the text) of the menus and submenus in running mode.
Please help me!
Luismi
|
|
|
|