.net - PDF Controls Render Text Differently?

Apr 5, 2011

I'm working on a website that creates pdfs dynamically.I've been playing around with two different pdf controls- wpcubed and abcpdf, and was surprised to see that they both appear to render text differently.

wpCubed:
abcpdf:

They are both using arial 25pt bold, so I was expecting them to look identical. Can anyone explain why they don't. Here are the full files: wpCubed , abcpdf

View 1 Replies


ADVERTISEMENT

Asp.net - Render .net Controls To String And Get Events To Fire

Jul 28, 2011

I have this issue where I'm trying to generate HTML to display on the page that is coming from the database in form of a template that has different curly brackets that get replaced with dynamic content at run time. For example curly bracket {Content} gets replaced with a few checkboxlists, radiobuttonlists, textboxes and a submit button. The way I'm doing this is by creating controls dynamically and rendering them as string and then outputting that string to the browser. But what this does is, it doesn't recognise the events assigned to the controls when they are generated. I may be taking a wrong approach to the issue, but I don't really see how else this can be achieved. I have put up some sample code below to show what I'm trying to achieve.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then

[Code]....

View 3 Replies

Multithreading - Render Text As Icons And Use These For Notification

Nov 4, 2011

I've got a timer which ticks every half a second. It calls a background process which renders text as icons and uses them for notification icons.

Public Shared DISCUS(9) As NotifyIcon
Private Sub BackgroundProcess2_DoWork() Handles BackgroundProcess2.DoWork
Try
For counter As Integer = 0 To My.Computer.FileSystem.Drives.Count - 1
Dim FontColor As Color
[Code] .....

Now for some reason, after a few minutes of the application being active, I get a JIT pop-up that doesn't render any text or buttons. Clicking on it causes the JIT debugger to crash, and I get the Windows "{App} has stopped responding." with error code CLR20R3. I'm not sure what this is all about, but I can provide any other details if needed. I've got everything nested in Try/Catch statements, all with code to write to a crash log but nothing gets written and I still get that error message.

View 1 Replies

C# - Enable Me To Render Rotated Text With The TextRenderer.DrawText Method?

Oct 6, 2010

I'm using some code to enable me to render rotated text with the TextRenderer.DrawText method. (By default, DrawText can only copy a straight forward x and y transform from a graphics object).

The code (C#) is from: connect.microsoft.com. See below for a VB conversion.The code takes a graphics object, creates a device context and copies the transform matrix from the graphics object. It works, but I'd like, also, to set the TextRenderingHint, so I tried:

<DllImport("gdiplus.dll", CharSet:=CharSet.Unicode, SetLastError:=True, ExactSpelling:=True)> _
Public Shared Function GdipSetTextRenderingHint(ByVal graphics As HandleRef, ByVal textRenderingHint As System.Drawing.Text.TextRenderingHint) As Integer End Function And then after the SetClip statement, I place: GdipSetTextRenderingHint(hDC, someHint) This gives me a memory access violation error, so I think I should be using something other than hDC as the argument.

I can get it to work by creating the device context from the original graphics object, and then creating another graphics object from the device context. I then set the hint on the new graphics object. This seems a bit convoluted so I was wondering if it was possible through interop.

[Code]...

View 1 Replies

Instantly Render Large Amounts Of Multi-colored Text?

Dec 18, 2009

I need to constantly display large amounts of colored text in WPF or Silverlight, and I need the user to percieve it as showing up instantly.

Currently I'm doing this using a canvas and textblocks, one textblock per 80-character line, with multiple runs to a textblock to handle the different colors. There can often be 20+ runs to a line.

In a 45x80 grid of text, this gets a framerate of about 12 in Silverlight, which is sluggish. Oddly enough, it's even slower in WPF... I can only speculate that this has something to do with my dev machine's lousy video card. Maybe it's trying to hardware accelerate and actually slowing down because of it?

View 1 Replies

[2005] Making A Custom Render - Allows The End User To Format The Text

Mar 6, 2009

I'd like to make a custom control that allows the end user to format the text, similar to an HTML or RichText control. The idea is that it will be static like a label, but allow end user to specify certain tags around words to make them bold, italic, underline, hyperlink, etc, either at design time or runtime. My question more specifically is how to best approach this. My intention is to use GDI+ methods, like DrawString, etc. But my concern is the inefficiency of having to parse the text each Paint cycle to determine which tags are present in order to use the correct font style, etc. I'm not really asking HOW to do this, but more of a hint on which architectural approach to take on this. Maybe there is already some examples of this out there?

View 2 Replies

Error Functions Differently From Vb6

Oct 4, 2010

I've been working on learning VB.Net from VB6 and for some reason when I use On Error Goto handlers, or On Error Resume Next the program still procs an exception and ask to continue or close.I don't really understand what I am missing, everything I've read said it's the same as VB6 with a few extra options.

View 9 Replies

Images Display Differently On Other PC's?

Jun 8, 2011

When I view images on my development PC they look fine, but when I view them on other PC's, the images are sized differently and often get cut off. I've tested this on multiple PC's and the images always get cut off.I've attached the images from my PC and another PC to this post, the image that is cut off if from a Windows XP PC.I'm using VS 2010 on Windows 7 64-bit.

View 7 Replies

.net - Control ID Rendering Differently Between Environments?

Jul 4, 2009

I have a web application that works in our stage/test environment fine but once we moved it to our production environment something weird happens. All the control ids change. a label went from ctl00_cphMainContent_lblPetName to _ctl0_cphMainContent_lblPetName. Why would this happen? What could cause something like this to happen. The only two differences I know of are the production environment has HTTPS and I've disabled debugging.

View 3 Replies

C++ - Why Do C# And VB.NET Implicitly Marshal Char* Differently

May 22, 2010

What is the most timers you have used in an application? I think the most I have ever used is 2.In another forum this question was asked. "I have a Timer ... I have a situation where I want to run the code in the Tick event ONLY ONCE not on the interval i have the timer set too."

I responded with Timer1_Tick(New Object, New System.EventArgs) Which led to this "The 'sender' object is VERY important when you have more than one Timer being handled by the Tick event procedure. This is because in a multi-timer tick event procedure, the only way your program knows which timer just fired is by querying the 'sender' object.When you use code like this you are putting nothing into the 'sender' object, so that if you were ever going to query it a 'kaboom' is going to happen.""...this 9 timer Tick event handler job done. Remember, all that is required is the correct timer name gets put into the ListBox." "The need for multi-timers to be handled by a single Tick event handler happens all the time. How would a real life programmer handle this? "Oh, to test the "kaboom" theory I wrote this and ran it overnight successfully:

[code]...

View 33 Replies

GetHostEntry Works Differently In Win 7 And Winxp?

Sep 4, 2011

msgbox(System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList(0).ToString())

is showing Ip address in Win XP but in Windows 7 it is not showing.

View 7 Replies

Why Do The Division (/) Operators Behave Differently In .NET And C#

Dec 23, 2009

If you create new projects in C# and VB.NET, then go directly in the Immediate Window and type this:

? 567 / 1000

C# will return 0, while VB.NET will return 0.567.To get the same result in C#, you need to type

? 567 / 1000.0

Why is there this difference? Why does C# require the explicit decimal point after 1000?

View 5 Replies

Addressing A Textual Array Of Controls - Controls("FuelBoxMin_" & IntLoop.ToString & .Text)?

Aug 20, 2011

I cannot work out the correct formatting of the above type addressing for a textbox in a (sort of) array of textboxes such as

textbox_1
textbox_2
textbox_3
etc.

The controls are on Tabs but I don't think I need to include the Tab as a container control, just refer directly to the textbox on the form, but I cannot work out how this is done in VB .NET format. In VB6 it was relatively straightforward but VB .NEt seems it is different. Can anyone help me with the correct way to formulate

[Code]...

View 1 Replies

Com Interop - Equal Strings Sometimes Behave Differently?

Dec 30, 2009

Example:

Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C: empcatalog.zip"
Dim sf As Object = Sh32.NameSpace(path)

-> does not work, sf = Nothing

Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C: empcatalog.zip"
Dim sf As Object = Sh32.NameSpace(path.ToString)

Clearly path = path.ToString, but they behave differently when used as COM parameters.

View 1 Replies

DataGridView - Formatting One Column Differently On Form

Feb 25, 2011

I have a datagridview I am displaying on a form and would like to format one of the columns differently then the available formats. I have a column that is a decimal(18,2) (in the table) named "MyDecimalField". In asp.net I could do this, in the "template field" of a datagrid.
math.round(MyDecimalField / 60 , 2)

In VB.net forms I cant figure out how to do that. Basically I need to divide the cell by 60 and round that to 2 decimal places.
IE
the Cell contains this: 1283.93
I want the user to see this: 21.40
1283.93 / 60 = 21.3988333 then round it to 21.40

View 1 Replies

Filling DataGridView Goes Differently On Subsequent Runs?

Jan 3, 2011

I have written some code in a form which is shown via ShowDialog from a different form. This code fills a DataGridView with data from two tables in a dataset, one through data binding, and one through more manual means. The latter part runs, or more accurately, fails to run in the same way if I call this form in the same way subsequently but without stopping debugging.

View 2 Replies

Printform Print Differently On Different Screen Sizes?

Jul 22, 2009

I am creating a program that I would like to distribute. I am using printform in VB 2008 to print my form. My form is the size of my computer screen...15 in. If the program is run on a different computer with a different screen size, will it affect the appearance of the form on the screen or the printing of the form? If the form is run on a laptop, for example, with a smaller screen, will it cut off my form and thus cut off the form during printing? Will a bigger screen increase the size of the form and not allow it to fit correctly when printed? I was just curious and wondering.

View 6 Replies

VS 2010 Webbrowser Returns Page Differently Than IE Alone?

Apr 3, 2011

When I use IE8, it displays the page fine, but when I use the web browser control in VS 2010, it shows the page differently (in a bad way).

View 12 Replies

Process.Start Acts Differently With Windows XP Or Vista?

Aug 12, 2009

I have a small VB. app in VS2008 that opens a windows folder in maximized view.I am using the following code:

Dim startInfo As New ProcessStartInfo("explorer.exe")
startInfo.WindowStyle = ProcessWindowStyle.Maximized
startInfo.Arguments = "C:\Program Files\123 Systems\ExcelFolders\TechTimeSheet"
Process.Start(startInfo)

When using my app with windows xp it works well. It opens a single folder as if going through the "my computer" to open it. Attached is a screen shot "folder" to show the desired way.However when using the same code with Vista it opens my folder as if I right clicked on the start menu and selected "explore", also a screen shot named "explore" is attached showing what I do NOT want. What should I change to get both vista and XP to work the same, that is opening a single folder.

View 1 Replies

Random Numbers Behave Differently In Debugging Mode?

Oct 15, 2011

I use some random number generators in a piece of VB.net code to simulate Gene reproduction. It works as followed:

- I generate a male chromosome that contains 46 random chromosomes which I put in the Arraylist: MaleChromosomes.

- I generate a female chromosome that contains 46 random chromosomes which I put in the Arraylist: FemaleChromosomes.

- Then I have a piece of code that randomly picks 23 chromosomes from the female arraylist and randomly picks 23 chromosomes from the male chromosomes ( Very simple simulation of reproduction ) and put these in the arraylist: Child

- I repeat this for the second child ( Arraylist: Child2.)

- Now I have piece of code that compares these arraylist to see how many chromosomes the two children share.

View 1 Replies

Shell Command Launches An App Differently Than Running The Executable

Sep 1, 2009

I have a legacy vb6 application that uses a shell command to launch a newer .net application. It's a very simple command, just launches an app. Here's the problem. When I run the .net app through the shell command, it tries to connect to a database that is not referenced in it. If I double-click the .net executable, it runs just fine and connects the way it is supposed to. Normal, no problems. Only when I run it from the shell command do I have problems. I have checked everything I can think of and simply can not come up with a reason why the app would behave differently when launched from a shell command.

View 3 Replies

Carriage Return Behaves Differently In RichTextbox - LineFeed VS 2008

Jul 8, 2009

I have project that communicates with an embedded device via Telnet and displays the data string in a RichTextbox. Here is the (weird) problem: every time I send a command, the device responds, at the end of the response there is a prompt on a NEW LINE. However, when I ASCII encode the bytes received and display the string, the prompt is on the same line as the response in the text box. So I looked at the bytes for several different commands and the response always starts with a 13,10,13 which is CR, LF, CR, that puts the response on a new line, also displayed on a new line in the text box.

However, at the end of the response, there is always a 13,13,10 (CR,CR,LF) followed by the prompt, but in the text box the prompt is NOT on a new line it is merely a couple of spaces after the response. The funny thing is that this behavior is absolutely not present in Hyper Terminal, or Tera Term applications, when I connect to the device using Tera Term, the prompt is always on a new line. Even the VS IDE shows this correctly in the Output window, every prompt is on a new line. I can not for the life of me figure out why this behaves differently in my RichTextbox. I have experimented with different settings for the textbox, but so far nothing worked.

View 7 Replies

Write Controls Text Into A .txt File And Read Them Form .txt File To Controls Again?

Jan 16, 2012

I have a form. And some controls(such as TextBox,ComboBox,etc.) on the form.Now,I want to store the controls' Text into a .txt file(or any other formarts).Then I want to read the text in the .txt file to my controls.

View 10 Replies

.net - Label Control Behaves Differently At Design Time Versus Runtime?

Jul 8, 2009

I am creating a custom Label control (by simply Inheriting the standard Label control and re-painting the background and text) because I need a very specific background and border. In the constructor of the control, I set the AutoSize property to false so I can have a standard default size for the new label.

Public Sub New()
/*Set the default size of the control to 75x24*/
Me.Height = 24

[code]....

In my application that uses this control, if I create the new custom label at run time (in code), the AutoSize property stays False, and it works properly.If I try to add the new custom label to my form at design time, it comes in with the AutoSize property set to True, and I have to manually set it to False in the properties window. It's not a huge problem, but I don't understand why the behavior is different.

View 4 Replies

Make A Group Box's Text Bold But Not The Text Of Controls Contained In It?

Feb 17, 2012

I went and created a tab containing a good amount of controls, most of which are contained within what I'll just call the top-level group box. Now I decide I'd like the text of the top-level group box to be bold, but nothing else. When I set the top-level group box's font to bold, however, all of the controls contained within it become bolded as well, which is what I don't want. I can set each individual control's bold property to false, but it seems like there should be an easier way to do this.

View 2 Replies

DataGridView's RowValidating Event Fires Differently When Closing A Modal Vs NonModal Form

Mar 24, 2011

Based on our tests primarily done in VB.NET in VS2010 it seems that when you close a WinForm the "RowValidating" event of the DataGridView on that form behaves differently depending on whether the form is MODAL or NON-MODAL. What we did was open the form (MODAL and NONMODAL) and changed a value of a cell and then immediately clicked the "X" to close the form. It looks like the "RowValidating" event DOESN'T fire if the grid is on a MODAL form but it DOES fire when the grid is on a NON-MODAL form. We can't figure out why that is... Is this a known bug in .NET?

[Code]...

View 3 Replies

Tell The Control To Render With Ie9?

Aug 12, 2011

I have a web browser integrated into a project. the web site uses jquery and runs best with ie9. The WebBrowser control in my vb.net form runs the web page as ie6 and none of the jquery works. Is there a way to tell the control to render with ie9?

View 1 Replies

.net - Render Section Within Using.BegingForm()?

Jun 20, 2012

I'm trying to render a custom section within a form in VB.NET MVC3? the section is in the master layout, and is defaulted - but id like to create a custom one when in a particular view

[Code]...

View 2 Replies

.net - Render SSRS .RDL To PDF And Just Open It?

Apr 23, 2010

We have a report that has to be called from an ASP.NET application, it could be a simple button. Through the code-behind, I gotta pass in a paramater, render the report, and don't save it anywhere, just open it to the user, as a .pdf file so he could save or print it.

EDIT:Now I've got the report done, I just need to know the best aproach to call it.It can't be done directly from an URL because that allows the user to save or close the pdf file, which is not what I want.

I'm starting to think that the best aproach to achieve this would be the following:I render the PDF programatically, and create the .PDF file in a temporary folder inside my app structure, then start a new thread to open the file, and wait for the user to close it, when he does, I delete the file and the thread is dead.

View 2 Replies

Asp.net - ReportViewer Parameters, Render Pdf?

Aug 30, 2011

I want to render a report directly to pdf. I have an objectdatasource with 2 parameters. I obtain these parameters from a hiddenfield on the webform and from the datakeyname on a gridview. The report works when I load it in report viewer without rendering to pdf. When I place the code to render the report as pdf the parameters dont load i.e. the report renders as pdf but there are no details on the report. My code is below,. I placed the code in gridview_selectedindexchanged:

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved