 |
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
Hi All,
I am looking for expert advice on printing the pdf files at client machine.
I have created a sample project named ClientPrint as
Imports System.Drawing
Imports System.Drawing.Printing
Imports System.Runtime.InteropServices
Namespace ActiveX
Public Interface IActiveXPrintLib
Sub PrintFile(filePath As String)
End Interface
<ProgId("ActiveX.PrintFile")>
<ClassInterface(ClassInterfaceType.AutoDual)>
<ComVisible(True)>
Public Class ActiveXPrintLib
Implements IActiveXPrintLib
<ComVisible(True)>
Public Sub PrintFile(filePath As String) Implements IActiveXPrintLib.PrintFile
Dim AcroPdf As New AcroPDFLib.AcroPDF()
AcroPdf.LoadFile(filePath)
AcroPdf.printAll()
End Sub
End Class
End Namespace
I have created the dll and register the dll using regasm command on client machine.
Now at time of consuming the print method at client side using javascript as
<object id="myControl1" name="myControl1" classid="clsid:ActiveX.ActiveXPrintLib"> </object>
var axComponent = new ActiveXObject("ActiveX.ActiveXPrintLib");
alert(axComponent);
if (axComponent == null) {
alert('Probably not installed');
}
else {
yourAxComponent.PrintFile('<%= Page.ResolveUrl("~/PdfTemp/0d818b57-9384-4f52-ae89-8ef5868064b7.pdf") %>');
alert('yes');
}
I am getting the error that automation server can't create object, using IE I have enabled the active x and permisssions to download the activex. but it still gives me same error.
I am not sure whether my code is correct or not.
Any advice is really helpful.
Thanks in advance.
|
|
|
|
 |
Hello !
I have a login form .
When this login form is still open , i open my main form , and on the load event of main form i give the instruction to close the login form.
But i have a problem :
My idea is to close the login form when the main form is full loaded. ( On my main form i have some controls that should be filled from a database )
But when the login form is closed , my main form is not full loaded.Some controls are still filling with records , and after some second the form is full loaded.
I try to put the close command for the login form at the end of load event (or shown event ) of main form , but the result is the same and the login form is closed before the main form is full loaded.
What can i do ?
Thank you !
|
|
|
|
 |
dilkonika wrote: My idea is to close the login form when the main form is full loaded. Keep in mind that such won't work nicely with lazy-loading.
dilkonika wrote: What can i do ? How do you load the data? Close the form when that's done.
(how do you know when you're done loading all records? You'd need to select the count before executing your query)
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
 |
I load all the data in form's load event.
At the end of this sub I put the close instruction for the login form.
But the login form is closed before the main form is full loading and after the login form is closed , the controls on main form need some time to finish loading.
|
|
|
|
 |
dilkonika wrote: At the end of this sub I put the close instruction for the login form. Can you post that code here?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
 |
It sounds as though the WM_PAINT messages for the main form are not being processed because, well, you're loading data and setting control values, hogging the UI (startup) thread, preventing it from processing the incoming window messages.
Those messages won't get processed, and hence, the main window painted, until the Load method is done executing.
Really, I think you're nit-picking over something that's inconsequential to the functionality of the application.
|
|
|
|
 |
Do you have a solution ?
Because for me is important this thing.
|
|
|
|
 |
Guys, This time am struck with the below scenario please assist. Am copying few files to the below location using my script. %AppData%\Mozilla\Firefox\Profiles\6zejl8ne.default\ i need to copy files inside 6zejl8ne.default folder. But the issue is this folder name is not constant, folder name changes for every user. for e.g: user 1 will have: %AppData%\Mozilla\Firefox\Profiles\6zejl8ne.default\ user 2 will have: %AppData%\Mozilla\Firefox\Profiles\4qi4qup6.default\ please assist is ther anyway i have files to the above location. My script: appdata = objShell.ExpandEnvironmentStrings("%appdata%") tmp = objShell.ExpandEnvironmentStrings("%Temp%") Const OverwriteExisting = True
objFSO.CopyFile tmp & "\Files\*.xpi",appdata & "\Mozilla\Firefox\Profiles\6zejl8ne.default\extensions\" , OverwriteExisting where, 6zejl8ne.default folder will change for every user. is that we can assign that folder to constant so that i can run this script on every machine ?
Cheers,
|
|
|
|
 |
OK, so how are you going to determine what the folder name is?
Because once you have the folder name, the rest is very simple string manipulation to build the path.
|
|
|
|
 |
I have the following sttring arrays and I would like to use IEnumerator.moveNext in order to move to the next string. Here is my code below it always in position -1. I need to start at 0 until HighLeveBenefitHeader
Dim HighLeveBenefitHeader() As String = {"Health Center Information", "", "", "", "", ""}
Dim myHighLeveBenefitEnum As IEnumerator = HighLeveBenefitHeader.GetEnumerator()
Dim HeaderHighLevelBenefit As Row = CreateTableHeaderRow(currentRow)
For Each value As String In HighLeveBenefitHeader
CreateTextTableCell(HeaderHighLevelBenefit, myHighLeveBenefitEnum.MoveNext, value.ToString, currentRow, 182, True)
Next
sheetData.AppendChild(HeaderHighLevelBenefit)
|
|
|
|
 |
The MoveNext[^] returns a boolean, not the current value of the enumerator. It does move to the next string, it just doesn't return it. MoveNext before you CreateTextTableCell and use the Current property to retrieve the string.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
 |
if i have database contain list of Autocad Architectural elements
simple(like cornice) and
complex(like window,door,column)
and i received new design for cornice and i want to check if this new cornice is available in my database
there is any way to make the compare using programming languages ??
|
|
|
|
 |
The only way to check, would be to compare every property of each object.
|
|
|
|
 |
Hello !
I'm using vb.net with Entity framework.
I have this situation :
I have 2 tables related to each other : Table1(Id,vl1,vl2,vl3,vl4 ) and Table2 (id,nm1,nm2,nm3,Table1ID)
I'm creating a query step by step like this :
Query=From t in context.Table1 select t
If condition1 then query=query.Where(Function(t2) t2.vl1>10)
If condition2 then Query=query.Where(Function(t2) t2.vl2<4)
.....
Now , if Condition3 is true I want to select all records from Table1 where vl3=0 and I want to filter the nested table Table2 where nm1="x".
If condition3 then query=query.where(Function(t2) t2.vl3=0) ???????????????
How can I filter the table2 in my query ?
Thank you !
|
|
|
|
 |
Hello friends, how is the day going? Please I need someone to show me the way forward of this problem. I wrote a 2d shooting game with vb6.0 which is working fine but there is something missing. I want the character to jump up on botton press and bounce on heating the ground before it stands firm. The formal code i used is not ok to my satisfaction the following is the code <code>if keycode = vbkeyup then army.top = army.top + spd</code> where spd is a value. Please any help is welcome!
|
|
|
|
 |
Otekpo Emmanuel wrote: there is something missing Yes; an upgrade to VB.NET.
Give it a try, and if you get stuck post a new message here
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
 |
Hi all,
I have a dll that communicate with access control hardware which stores all transactions in its memory
unfortunately, all docs are in c# which I note able to manage since I know vb6 only
the main structure (Type as in vb6) has the following:
Public Structure sysReply
' Fields
_
Public nsysNumber As Short
_
Public nType As Integer
_
Public sBuffer As Char()
End Structur
the sbuffer array is the union of all events
what I understand that there is no union in vb6 but is UDT
so there is many UDT's thats is related to the sbuffer according to the nType in the sysReply structure
my question is how to deal with the above in vb6?
I did the following
Public type sysReply
nsysNumber As integer
nType as integer
sBuffer() As Byte
end type
public sReply as sysReply
there is other structures that is related to the nType
and use copymemory to copy the sysRply to every udt
like:
Dim bytcommstatus As sysReplyCommStatus
CopyMemory ByVal VarPtr(bytcommstatus), ByVal VarPtr(sReply), LenB(bytcommstatus)
With bytcommstatus
debug.print .status
debug.print .error_no
end with
I get get data but I face two problems
- data are not in same order as udt
- application crashes
can someone show me example?
regards
|
|
|
|
 |
idegyptsys wrote: can someone show me example?
Not using VB6.
If you "know" VB6, then you can program in VB.NET - syntax is roughly the same. Put your C# code in a C# to VB.NET translator and it may look a bit more recognizable.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
 |
I want to convert Audio(mp3,mp4,wav,wma,dat,flv,gp) file to text file in vb.net
|
|
|
|
 |
Fine, start by researching the various speech to text libraries that are available.
|
|
|
|
 |
That's not a question. That's a statement of what you want to do and the only logical response to it is to say "Permission granted! Please, proceed."
|
|
|
|
 |
Hello !
How can I detect if a messagebox is shown ?
I have a situation where I need this.
Thank you !
modified 22-May-14 7:46am.
|
|
|
|
 |
Based on the criteria of "message box" really you can't.
A message box window is no different than any other application window, so looking for a "special" window isn't going to work.
You can search for a particular caption message (text in the window title bar) in a window and find out that way, but you have to make sure that the caption you're looking for is unique system-wide.
|
|
|
|
 |