|
Hidden in the MSDN documentation is the following:
"Opening and closing braces are interpreted as starting and ending a format item.
Consequently, you must use an escape sequence to display a literal opening brace or closing
brace. Specify two opening braces ("{{") in the fixed text to display one opening brace
("{"), or two closing braces ("}}") to display one closing brace ("}"). Braces in a format
item are interpreted sequentially in the order they are encountered. Interpreting nested
braces is not supported. "
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Thank you Luc Pattyn,
Sorry for the late reply. Thank you very much again. Yes it is not mentioned in MSDN. But it works.
Regards
Aftab Ahmed
.NET Developer
|
|
|
|
|
Aftab Sindhi wrote: Yes it is not mentioned in MSDN.
This is the source.[^]
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I really hope someone can shed some light on my problem. I have run out of ideas.
I have written a calculator application in VB.NET using VS2005. It uses an LCD font to display the result of calculations. I followed instructions at http://www.bobpowell.net/tipstricks.htm to created a private font collection with the LCD font as an embedded resource. On the form load I assign the font to the label control which displays the calculated results.
I created a deployment project and built an msi for my calculator. I have installed this calculator on 4 machines. On 2 of them the LCD font displays as required (as it does when debugging in VS 2005). On the other 2 it displays incorrect characters in some undeterminable font.
I have checked the version of .NET on the target machines and there doesnt seem to be any pattern. I also wondered if it was something to do with the version of windows installer (setup.exe) but that doesnt seem to be the case either.
Can anyone suggest any other avenue of enquiry please ? I feel really stuck
with this one.
TIA
Bob
|
|
|
|
|
On a a few related notes...
- Is there any nice way to use bitmap fonts in situations where they would be appropriate, either for specialized display purposes or for showing data very small? A 4x8 font isn't going to be terribly readable at normal screen resolutions, but if it's necessary to show a huge amount of data (e.g. debug information) such a font can be a lot more readable than any TrueType font I know when displayed t similar size.
- Are there any fonts which include multiple styles of type in different character ranges. For example, 32-255=normal; 256-511=IBM character set, normal (spare copy, but adds all of 0-31); 512-768=IBM character set, reverse; 768-1023=IBM character set bold; etc. Would there be any practical means to generate such a thing programatically?
|
|
|
|
|
Hello!
Thanks in advance to anyone that may post a response to this question.
I am trying to figure out how to do the following: Build a DLL in Fortran-PowerStation4.0 (FORTRAN 90) and then call it from Visual Basic 2005 Express Edition.
I have created the FORTRAN DLL and I am able to call it from Visual Basic. Here it is the code that I wrote.
The Fortran dll:
<br />
<br />
SUBROUTINE square(a)<br />
!MS$ATTRIBUTES DLLEXPORT, ALIAS:'Square'::Square<br />
real*4 a<br />
a = a*a<br />
END SUBROUTINE<br />
<br />
The Visual Basic code:
<br />
<br />
Public Class FortranLab<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim a As Single<br />
a = 4<br />
Call Square(a)<br />
TextBox1.Text = Str$(a) + vbLf + TextBox1.Text<br />
End Sub<br />
End Class<br />
<br />
<br />
Module Global1<br />
Declare Sub Square Lib "c:\FORTDLL\Debug\FORTDLL.dll" (ByVal a As Single)<br />
End Module<br />
<br />
THE PROBLEM!
However, the code fails on the call of Square(a), and gives the following error…
“Attempted to read or write protected memory. This is often an indication that other memory is corrupt.”
I have tried different data, e.g. using only integers, integer and single, ect… But I get always the same error. I have this idea that the error comes from an incompatibility of data types between Fortran and VB. I have looked for documentation on how to best interface data types between Fortran and VB …. without luck.
Stack trace for this error:
System.AccessViolationException was unhandled
Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Source="FortranLab"
StackTrace:
at WindowsApplication1.Global1.Square(Single a)
at WindowsApplication1.FortranLab.Button1_Click(Object sender, EventArgs e) in C:\FortranVB\VB-FORT.vb:line 10
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
|
|
|
|
|
Hi,
I have no experience with the combination of VB+Fortran, but from what you show I would
suspect a problem in the argument passing; AccessViolationException typically occurs when
a pointer is expected and an illegal address is obtained.
Hence you should try to define square as accepting abyref argument, not a byval.
This also can be seen from the Fortran code itself: if you do "a=a*a" how would the
caller ever get the result, unless it is actually the address of a that gets exchanged?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I think Luc has it nailed.
Module Global1
Declare Sub Square Lib "c:\FORTDLL\Debug\FORTDLL.dll" (ByVal a As Single)
End Module
should almost undoubtedly be
Module Global1
Declare Sub Square Lib "c:\FORTDLL\Debug\FORTDLL.dll" (ByRef a As Single)
End Module
since Fortran defaults to passing its args by reference rather than by value (as C does).
I'd like to know if this works for you. I need to convert some fortran functions into DLLs, and yours is a good template for me to use if it works.
Let us know.
David
---------
Empirical studies indicate that 20% of the people drink 80% of the beer. With C++ developers, the rule is that 80% of the developers understand at most 20% of the language. It is not the same 20% for different people, so don't count on them to understand each other's code.
http://yosefk.com/c++fqa/picture.html#fqa-6.6
---------
|
|
|
|
|
Hi! Yes it works perfectly. However I have not been able to pass characters and strings from Fortran90 to VisualBasic6. No luck on this one.
Here it is an upgraded version of the code.
Fortran code
SUBROUTINE square(a)
!MS$ATTRIBUTES DLLEXPORT, ALIAS:'Square'::Square
real*4 a
a = a*a
END SUBROUTINE
SUBROUTINE caracter(s)
!MS$ATTRIBUTES DLLEXPORT, ALIAS:'CARACTER'::CARACTER
character(2) s
s = 'T'
END SUBROUTINE
SUBROUTINE arraytest(arr)
!MS$ATTRIBUTES DLLEXPORT, ALIAS:'ARRAYTEST'::ARRAYTEST
real*4 arr(3,7)
integer i,j
do i=1,3
do j=1,7
arr(i,j) = 11*i+j-1*i
end do
end do
END SUBROUTINE
SUBROUTINE Simarray(arrs)
!MS$ATTRIBUTES DLLEXPORT, ALIAS:'SIMARRAY'::SIMARRAY
real*4 arrs(10)
integer i
arrs(1)=1
do i=2,10
arrs(i) = arrs(i-1)+1
end do
END SUBROUTINE
Visual Basic code
Vb-Fort.vb
Public Class FortranLab
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Single
a = 10
Call Square(a)
TextBox1.Text = Str$(a)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim i, j As Integer
Static arr(0 To 3, 0 To 7) As Single
Call ARRAYTEST(arr(1, 1))
For i% = 1 To 3
For j% = 1 To 7
TextBox1.Text = Str$(arr(i%, j%)) + TextBox1.Text
Next j%
Next i%
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim i As Integer
Static arr(0 To 10) As Single
Call SIMARRAY(arr(1))
For i% = 1 To 10
TextBox1.Text = Str$(arr(i%)) + TextBox1.Text
Next i%
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
TextBox1.Text = " "
End Sub
End Class
Golobal1.bas
Module Global1
Declare Sub ARRAYTEST Lib "c:\FORTDLL\Debug\FORTDLL.dll" (ByRef MyArray As Single)
Declare Sub SIMARRAY Lib "c:\FORTDLL\Debug\FORTDLL.dll" (ByRef MyArray As Single)
Declare Sub Square Lib "c:\FORTDLL\Debug\FORTDLL.dll" (ByRef a As Single)
End Module
|
|
|
|
|
Thanks a lot.
I have to use Compaq Visual Fortran, so I'm guessing the characters
!MS$ATTRIBUTES DLLEXPORT, ALIAS:'SIMARRAY'::SIMARRAY
may not work in my situation. I'll just have to try it, and do some research.
After using Fortran in college, when I was introduced to C, I immediately fell in love with it for it's simple elegance and consistency. Strings are just arrays of characters, and behave like any other array. In Fortran, strings are a native type, with their own set of unique operators. While I have not researched this greatly, my guess is that the Fortran90 standard merely specifies how those operators are to work, and not how a string's data is laid out internally. Thus, it would be completely up to the compiler implementor how to internally lay out string data. Thus, attempting to pass a string back and forth to VB is a lost cause UNLESS the compiler implementor has an interface specifically for this. What I'm saying is, try to find a chapter in a book about PowerStation on building DLLs (or some other suitable reference, perhaps their help system). Surely it would contain the info you need. I'm currently looking for the same thing for my compiler, and am reading their online help.
David
---------
Empirical studies indicate that 20% of the people drink 80% of the beer. With C++ developers, the rule is that 80% of the developers understand at most 20% of the language. It is not the same 20% for different people, so don't count on them to understand each other's code.
http://yosefk.com/c++fqa/picture.html#fqa-6.6
---------
|
|
|
|
|
Inspired by Beth Massi's excellent blog[^] post on generating Excel data using
an XML literal:
I am trying to generate XPS documents the same way.
The code I have is:-
Public Function SeatingAppointmentPage(ByVal ClientName As String, _<br />
ByVal Address1 As String, _<br />
ByVal Address2 As String, _<br />
ByVal Address3 As String, _<br />
ByVal Address4 As String, _<br />
ByVal AppointmentDate As Date, _<br />
ByVal Signatory As String) As <br />
XElement<br />
<br />
Dim _seatingAppointmentPage As XElement = <FixedPage Width="816" <br />
Height="1056" xmlns="http://schemas.microsoft.com/xps/2005/06" <br />
xml:lang="und"><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="166.56" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="185.44" <br />
Indices="94;8,88;49;68;80,90;72;8,88;96;3;3" UnicodeString=<%= ClientName <br />
%>/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="204.32" <br />
Indices="94;8,88;36,69;71;71;85;72;86,57;86;3;20;8;96;3" UnicodeString=<%= <br />
Address1 %>/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="223.2" <br />
Indices="94;8,88;36,69;71;71;85;72;86,57;86;21;8;96;3" UnicodeString=<%= <br />
Address2 %>/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="242.08" <br />
Indices="94;8,88;36,69;71;71;85;72;86,57;86;3;22;8;96;3" UnicodeString=<%= <br />
Address3 %>/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="260.96" <br />
Indices="94;8,88;36,69;71;71;85;72;86,57;86;3;23;8;96;3" UnicodeString=<%= <br />
Address4 %>/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="279.84" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="298.72" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="317.6" Indices="94;8,88;39;68;87;72;8;96;3" <br />
UnicodeString=<%= Date.Now %>/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="336.48" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="355.36" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="374.24" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="393.12" <br />
Indices="39;72;68;85,40;3;94;8,88;49;68;80;72;8;96;3;3" UnicodeString=<%= <br />
"Dear " & ClientName %>/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="411.52" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="429.92" <br />
Indices="36;81;3,29;68;83;83,57;82;76;81;87;80,85;72;81;87;3,29;75;68;86;3;69,57;72;72;81,57;3;68;85;85;68;81;74,55;72,57;71;3;73,29;82;85,34;3;92,49;82;88;3,29;87;82;3;86,51;72;72;3,29;94;8,88;48;72;80,85;69;72;85;3;50;73,29;3,29;54;87;68;73,30;73,29;8;96;3,27;68;87,29;3" <br />
UnicodeString="An appointment has been arranged for you to see {%Member Of <br />
Staff%} at "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="457.6" <br />
Indices="40;53;51;48,84;182;86,49;3;54,68;72;68;87,29;76;81,55;74;3;56;81;76;87;3;76,23;81;3;54;68,57;81;71;92,49;80,85;82;88;81;87,29;3;82;81;29,29;3" <br />
UnicodeString="ERPM's Seating Unit in Sandymount on: "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="485.76" Indices="3,301;3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ffff0000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="247.2" OriginY="485.76" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ffff0000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="514.08" Indices="3,301;3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="247.2" OriginY="514.08" <br />
Indices="94;8,88;36,69;83;83;82;76;81;87;80;72;81,62;87;3,27;39;68;87,34;72;8,88;96;3" <br />
UnicodeString=<%= AppointmentDate %>/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="542.4" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="199.2" OriginY="542.4" Indices="3,301;3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="570.24" <br />
Indices="38;68;81;3,29;92,49;82;88;3,29;83;79;72;68;86,51;72;3;87;72;79,23;72;83;75,57;82;81;72,57;3;80,84;72;3;87,29;82;3;70;82;81,57;73,29;76;85;80;3;87;75;76,23;86;3;68;83;83,57;82;76;81;87;80,85;72;81;87,29;17;3" <br />
UnicodeString="Can you please telephone me to confirm this appointment. "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="597.92" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="625.6" <br />
Indices="56;81;71;72,57;85;3,27;87;75,57;72;3;43;72;68,57;79;87,27;75,57;3;9;3;54;68,57;73,29;72;87;92,49;3,29;51;85;82;70;72;71;88,57;85;72;86;15;3;90,71;72,57;3;81;82;90;3,27;85;72;84;88;72;86,51;87;3;87;75;68,57;87;3;68;79,23;79;3;70;75;68;76;85;86;3;68;85,34;72;3" <br />
UnicodeString="Under the Health & Safety Procedures, we now request that <br />
all chairs are "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="653.28" <br />
Indices="70;79;72;68;81,57;72;71;3;83,57;85;76,21;82,57;85;3,27;87;82,57;3;68;86;86;72;86,51;86;80,84;72;81;87,29;3;18;3;73,29;76;87;87,29;76;81,55;74,55;15,29;3;68;86;3;90;82,55;85;78;3;70;68;81,57;81;82;87;3,29;69;72;3,29;70;68;85;85;76,21;72;71,57;3;82;88,57;87;3;82;81;3,29;71;76;85;87;92,49;3" <br />
UnicodeString="cleaned prior to assessment / fitting, as work cannot be <br />
carried out on dirty "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="680.96" <br />
Indices="70;75;68;76,23;85;86;17;3;3;3;58,100;72;3;90,71;82;88,57;79;71;3;69;72,57;3;74,55;85;68;87;72;73,30;88;79;3;76;73,29;3;92,49;82;88,57;3;90,71;82;88,57;79;71,55;3,29;70;82;80,84;83;79,23;92,49;3;90,71;76;87;75;3;87,29;75;76;86;3;85;72;84,55;88;72,57;86;87;17;3" <br />
UnicodeString="chairs. We would be grateful if you would comply with this <br />
request. "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="708.64" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="736.8" <br />
Indices="60,66;82;88;85;86;3;86,57;76;81;70;72;85,40;72;79;92,53;15;3" <br />
UnicodeString="Yours sincerely, "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="755.68" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="774.56" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="793.44" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="812.32" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="831.2" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="850.08" Indices="3" UnicodeString=" "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="868.96" <br />
Indices="66;66;66,57;66;66;66,57;66;66;66,57;66;66;66,57;66;66;66;66,57;66;66;66,57;66;3" <br />
UnicodeString="____________________ "/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="887.84" <br />
Indices="94;8,88;54;76,29;74;81;68;87;82;85;92,53;8,88;96;3" <br />
UnicodeString=<%= Signatory %>/><br />
<Glyphs <br />
Fill="#ff000000" FontRenderingEmSize="15.9697" StyleSimulations="None" <br />
OriginX="151.2" OriginY="906.72" Indices="3" UnicodeString=" "/><br />
</FixedPage><br />
<br />
Return _seatingAppointmentPage<br />
End Function
However I'd like to turn this into a function that returns a
System.Windows.Documents.FixedPage instead of an XElement - any ideas?
|
|
|
|
|
Can anyone point me to a free or open source framework or api that will allow me to scan a pdf document(s) searching for a phrase.
thanks in advance
|
|
|
|
|
|
Hi
I have a Problem in VB.net 2003 and Crystal Reports .
When I run my Application and Preview a Report and want to print it ,after press Print Button ,my computer restarts.
this problem is about some type of Printers ;
for Exaple : hp LaserJet 3020
but not about hp LaserJet 1200
please help me.
Tanks.
|
|
|
|
|
Sounds like you have a driver conflict on your system. Go to:
START > CONTROL PANEL > ADMINISTRATIVE TOOLS > COMPUTER MANAGEMENT > DEVICE MANAGER
Check to see if there is any hardware conflict with any devices. My guess is your HP 3020 has a driver conflict. Have you tried uninstalling the device, unplug it, reinstall drivers and re-plug it in?
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
With the help from Code Project site I have been successful in placeing various controls in grid. Now it has two three shortcomings (!) as of now.
1. If I use datatable as datasource to combobox placed in datagrid, assign "Name" and "Id" as Display and Value member respectively, In "SelectedValueChange" event it returns "Name" as Displaymember and "Id" as Valuemember instead of actual values.
The combobox shows proper values of "Name".
2. I tried to assign values of datagrid cell to datatable row element as follows but it did not work...
table.rows(1).Itemarray(1) = dgGrid(CurrentRowIndex,3)
above line is indicative, actual code has proper names for table, grid, etc. also put in a loop to iterate.
any solution to these issues are welcome.
thanks,
Madhav
|
|
|
|
|
for problem one can you paste your code your should have somthing like
ComboBox.DisplayMember = "table.colum"
ComboBox.ValueMember = "table.colum2"
Private Sub ComboBox_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox.SelectedValueChanged
TextBox.Text = ComboBox2.SelectedValue
End Sub
this should give you whatever record is in colum2 when colum one is selected
make sure you spell the table and colum values right or it WILL give you just the text a good trick is if you are setting programically get the values by setting in designer first then just copy and paste
|
|
|
|
|
Thanks a lot.
We misssed on SelectedValue property. It's working fine now.
thanks,
Madhav
|
|
|
|
|
I am developing a custom component in the form of a specialized panel. To this panel i have added another panel. When a user adds a control to the specialized panel i want it to capture this action and place the new control in the panel i have already in my control. I have therefore, overrident the OnControlAdded Sub and added the following:
MyBase.OnControlAdded(e)
For Each c As Control In Me.Controls
If c.Tag = "BottomPanel" Then
c.controls.add(e.control)
End If
Next
However when i tell it to do this i get an error from visual studio itself saying, "'child' is not a child of this parent."
|
|
|
|
|
Reckon you need to use a for loop ( not for each ) so you can remove items from the existing controls collection, on the basis that I doubt a control can exist in two at the same time.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
i have seen all the image that you have send , u thing you are getting error for Select Query, some "Object not found" error is coming , can you check the query again that wheather the table name correct or not !!!
|
|
|
|
|
I load an excel spreadsheet via oledb driver into a datatable. I fill in some blank fields. Now I want to save the changes. I tried using a commandbuilder and issuing myExcelAdapter.Update(myExcelDt) but I got an error that it couldn't generate an update command for a table with out a key field. No new records were added and none were deleted. I just want to overwrite or update the spreadsheet with the copy in the datatable as it has some fields that were blank filled in now. How is the best way to accomplish this?
|
|
|
|
|
It would seem if I want to update a record I will have to do it with a custom sql command for each record I want to update. As there is no key fields in the excel table I have no idea how to specify and update command either. I guess that is why the command builder couldn't come up with anything. I thought about deleting all the records in the excel database and writing back all the modified records from the datatable but then I read that the jet engine would not allow me to delete records from an excel db so I didn't even bother to try. My only choice now as far as I can see is remote control of excel or building another excel table and adding the records to that. I do not wish to do remote control of excel. It all would have been so much easier if I could have stayed connected to the excel spreadsheet read the record looked up the necessary data and written changes to the records then done a skip to get the next record and repeat.
|
|
|
|
|
hi
I lost my source code which was on my thumd drive now is it possible to get the source code from the exe file which is only pcs left from my project on my desktop. If so can someone please help
Thank you
steve Haris
|
|
|
|
|