|
Thanks Luc, I'll definitely give this a try.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi, I got a problem while trying to view a report in crystal application. When I try to open the report, it display this error message: Server has not yet been opened . My application is connect to sql server and when I try to add data or retrieve data from the database, it work fine. But when I try to view the report it display the above error message. Please let me know how to solve the problem.
|
|
|
|
|
Hi,
I was trying to take a screenshot of a web page through the web browser control using the drawtobitmap function and it was giving blank images for pages such as google.com . I finally found the reason as stated by someone here :
http://www.codeproject.com/useritems/Website_Thumbnails_in_C_.asp?df=100&forumid=359744&exp=0&select=2053785#xx2053785xx
I am now trying to convert the code given by the guy to vb.net, but am new to it and cant seem to implement the interface calls. Could anyone please help he port the code? Here it is (as given in the post):
"The only sure fire way round I found was to fall back to using the raw interfaces:
1) Add a reference to MSHTML.tlb
2) Create your own version of IHTMLElementRender which uses an IntPtr rather than _RemotableHandle:
[InterfaceType(1)]
[Guid("3050F669-98B5-11CF-BB82-00AA00BDCE0B")]
public interface IHTMLElementRender2
{
void DrawToDC(IntPtr hdc);
void SetDocumentPrinter(string bstrPrinterName, ref _RemotableHandle hdc);
}
2) Use this code to capture the initial web page image:
IHTMLDocument2 rawDoc = (IHTMLDocument2)hiddenWebBrowser.Document.DomDocument;
IHTMLElement rawBody = rawDoc.body;
IHTMLElementRender2 render = (IHTMLElementRender2)rawBody;
Bitmap screenCapture = new Bitmap(width, height);
Rectangle drawRectangle = new Rectangle(0, 0, width, height);
myWebBrowser.DrawToBitmap(screenCapture, drawRectangle);
Graphics graphics = Graphics.FromImage(screenCapture);
IntPtr graphicshdc = graphics.GetHdc();
render.DrawToDC(graphicshdc);
bmpg.ReleaseHdc();
bmpg.Dispose();"
Thanks!
Ahmad
|
|
|
|
|
There are web sites that convert C# to VB, and some CP articles also. There are also commercial products, that probably do a better job.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
try this link
http://converter.telerik.com/
|
|
|
|
|
Hi,
Thanks alot for the link and help guys! Its converting the code fine, but VB doesnt seem to recognise InterfaceType(1) in the follwing code snippet (I am pasting it as member of a form class):
<interfacetype(1)> _
<guid("3050f669-98b5-11cf-bb82-00aa00bdce0b")> _
Public Interface IHTMLElementRender2
Sub DrawToDC(ByVal hdc As IntPtr)
Sub SetDocumentPrinter(ByVal bstrPrinterName As String, ByRef hdc As _RemotableHandle)
End Interface
I have added the reference too. It says "Type 'InterfaceType' is not defined". Am i missing out on something?
Thanks!
Ahmad
|
|
|
|
|
hi all
i still not able to move the toolstrip on the form
i put it in the toolstripcontainer
but the problem not solve
|
|
|
|
|
since I can't mail you the example project here is how to made it (brief but should be enough)
on a empty form:
add toolstrip
add toolstripcontainer (upper right corner of toolstrip)
toolstripcontainer dock property = fill
add second toolstrip (next to the first one)
add statusbar (will not be docked properly but we'll solve that later)
add you're ruler
add you're rich text box
add everything else you want on the form (in the toolstripcontainer)
now that that is done let's place verything
to do this in an easy way open the 'document outline' window (located under 'view -- other windows -- document outline) this is a very handy window for docking
when you click the '-' next to the toolstripcontainer1 you should have the following order of controls (if this isn't the case you can just replace them by drag and drop in the document oultine window:
toolstripcontainer1
statustrip
now lets look at the toolstripcontainer1 (click the '+' next to it)
now you have 5 main groups (don't change these the are added by designer for the toolstripcontainer)
first group ToolStripContainer1.ContentPanel:
ruler1 (must be the first if you want you're ruler to be docked)
richtextbox1
...
the second (left),third (right), and fifth (bottom) group don't contain anything
the fourth group (top):
toolstrip1
toolstrip2
(order doesn't mather)
now it should work (you can drag the toolstrip1 and 2 to the left, right and bottom edge of the form at run time)
hope this helps
|
|
|
|
|
when i set the
toolstripcontainer dock property = fill
then the toolstripcontainer occupy the whole form and other elements are hide behind the toolstripcontainer
what's going worng
|
|
|
|
|
that's beceause you're other controls are on the form and not on the toolstripcontainer
use the document outline window to drag the controls into the first group of the toolstripcontainer (those 5 groups described in previous post)
the toolstripcontainer acts as container of panels (5 of them top,left,bottem,right,content)
you need to add your controls to its content panel
|
|
|
|
|
that's also not working
i move all elements on to the toolstripcontainer
|
|
|
|
|
can you send me the designer code that way I have a better idea of what is going on
|
|
|
|
|
plz send me your e mail address i will send the whole code
|
|
|
|
|
|
|
|
this is not the right place for say hi.
by the way good evening
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
hi
but y r u saying this to me
i just not understand what u r thinking about
|
|
|
|
|
first off all you have you're toolstrips visible property set to false (then it is normal you don't see you're toolbars even at design time (only when selected will they become visible) so for design purposes set it to true) then here is what I did to get it working (everything done in the document outline window)
put the 2 toolbars back on the form
delete BOTH toolstripcontainers (you only need one wich we will recreate)
make sure ts1 is the first one in the list under form1
select ts1
(not done in document outline)
choose embed in toolstripcontainer
put 'dock' property from toolstripcontainer1 to fill
(back in document outline)
drag both ts1 and ts2 to the 'ToolStripContainer1.TopToolStripPanel'
this should do it
now you can put the visible properties back to false
to make sure order of controls in document outline:
toolstripcontainer1
ms1
statustrip1
everything else
|
|
|
|
|
their's menu bar is the only thing i can see on the form
what's worng
i done exactly as u said
|
|
|
|
|
that's normal since your visible property is set to false
for testing set it to true that way you are sure it is displayed if you still don't see the toolstripbars then I suggest you make a new form and all you do is add the toolstrip and the container, test it a bit untill you are sure you can implement it with other controls
I got it working with you're form so it is possible (I can't send it back to you beceause I had to delete a control and alot of code to get it to build (don't have all you're dll's and custom controls))
|
|
|
|
|
plz can u send me the form and the code
that will help me a lot
plz
|
|
|
|
|
I'v send the entire project in a reply to the mail I got from you so normally you should get it (I hope)
|
|
|
|
|
had to adjust the mail a bit
apperenatly you're virus scanner didn't accept it because there was an exe in the zip file
I hope it works now (just send you my 2 forms (you'rs and my example))
|
|
|
|
|
Hi,
I am having the multipage document. i want to print pages one by one. when first page finishes printing it must show me the message, then ask me whether i want to continue.If yes then go for next page and same process.
I tried lot but i don't find answer.
Please help me.
|
|
|
|