|
hi, yes im using checkboxname.checked if you look at the code snippet above. however it saves as -1 and 0
.checkstate saves as 1 and 0
.checked gives minus 1? strange isnt it?
hence why im so perplexed by it!
|
|
|
|
|
SOLVED: setting the column to bit fixes it, that way SQL converts the numeric value on insert.
Also Mycheckbox.checked.ToString() will work too, though thats having vb do the conversion not SQL server.
|
|
|
|
|
To fully understand this you'd have to go to the site and look at this documentation.
http://www.sheltonblog.com/archive/2007/10/05/free-sharepoint-document-workflow-workshop---part-2-asp.net-workflow.aspx[^]
I have to convert this to VB. in C# it runs fine.
He deletes the default.aspx
Adds a folder.
Inside he creates his PageName.aspx as normal.
He then creates a Design_Page.aspx with NO code behind.
He copies out the Page Header from PageName and post it in Design_Page.aspx and now it will use the PageName.vb as its code behind as defined.
Fine with C#.
In C# he clicks on the buttons and it creates a click event.
In VB I do the same and it creates a click event. The problem is it says I need a WithEvents associated with it.
I didn't think it would work, but I would follow the error message and create WithEvents for them. Underlined errors disappear. Now Build error occur saying the handlers already have WithEvents defined for them.
What is going on????????
#2)
SPControl.GetContextWeb(Context).Web("Whatever") has a nullreference error pointing at Context.
In C# it just seems to ignore it because it continues to work despite Context not being assigned.
I can't contact the blog owner, because the forms won't let me. There is a login button, but there is no JOIN that I can see. I'd just like to ask him how to convert this because it is taking a lot longer than I anticipated.
I know the associations are right because again it works in C# and all I'm doing is converting. So the WithEvents issue is really confusing.
The nullreference might require me to go about it a different way in some degree because of the differences the two languages interpret null, nothing or not assigned.
|
|
|
|
|
I'll start by telling you what I have now...
My web page (using a Persits AspPDF.NET component - trial now expired) accepts PDF uploads and then processes those individual documents by stitching them together - forming a single PDF file. This works flawlessly and, in fact, is precisely what I was looking for - almost. You can view the page at: http://www.mulehide.com/downloads/data_sheets.aspx although the trial component that merges the PDF files is expired.
Now, what I want to do is, rather than the PDF's coming through as uploads, I want them to come through from a previous page and be posted to this page, then perform the stitch operation. Basically, I want to do the same thing but instead, select PDF's that are already on my web server, rather than off the clients machine. I tried a couple of different methods and failed miserably due to knowing absolutely nothing about VB code. And I mean nothing!
Ideally the previous page would have say, checkboxes, allowing the visitor to select the PDF files they would like to combine. These would then submit the page and create the stitched PDF. Even cooler would be to have everything on one page.
I'm not locked in to this Persits product. He refused to help at all with this issue even though it meant a multi-server sale for him and if another method of stitching PDF files is available, I'm open to it.
Any ideas out there? Code is below. Thanks!
Steve
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="Persits.PDF" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mule-Hide Data Sheets</title>
<script runat="server" language="vb">
Sub Page_Load(Source As Object, E As EventArgs)
txtResult.Text = ""
If Not IsPostBack Then Exit Sub
Dim objFile1 As HttpPostedFile = MyFile1.PostedFile
Dim objFile2 As HttpPostedFile = MyFile2.PostedFile
Dim objFile3 As HttpPostedFile = MyFile3.PostedFile
Dim objFile4 As HttpPostedFile = MyFile4.PostedFile
Dim objPdf As PdfManager = New PdfManager()
Dim FileBytes1 As Byte() = New Byte(objFile1.InputStream.Length){}
objFile1.InputStream.Read(FileBytes1, 0, FileBytes1.Length )
Dim FileBytes2 As Byte() = New Byte(objFile2.InputStream.Length){}
objFile2.InputStream.Read(FileBytes2, 0, FileBytes2.Length)
Dim FileBytes3 As Byte() = New Byte(objFile3.InputStream.Length){}
objFile3.InputStream.Read(FileBytes3, 0, FileBytes3.Length)
Dim FileBytes4 As Byte() = New Byte(objFile4.InputStream.Length){}
objFile4.InputStream.Read(FileBytes4, 0, FileBytes4.Length)
Try
Dim objMasterDoc As PdfDocument = objPdf.CreateDocument()
Dim objDoc1 As PdfDocument = objPdf.OpenDocument(FileBytes1)
Dim objDoc2 As PdfDocument = objPdf.OpenDocument(FileBytes2)
Dim objDoc3 As PdfDocument = objPdf.OpenDocument(FileBytes3)
Dim objDoc4 As PdfDocument = objPdf.OpenDocument(FileBytes4)
objMasterDoc.AppendDocument(objDoc1)
objMasterDoc.AppendDocument(objDoc2)
objMasterDoc.AppendDocument(objDoc3)
objMasterDoc.AppendDocument(objDoc4)
Dim strPath As String = Server.MapPath("datafiles") + "\\" + "MH_CustomPDF" + ".pdf"
Dim strFileName As String = objMasterDoc.Save(strPath, False)
txtResult.Text = "Success. Your PDF file " + strFileName + "can be downloaded <a TARGET=""_new"" href=""datafiles/" + strFileName + """>here</a>."
Catch es As Exception
txtResult.Text = es.Message
Exit Sub
End Try
End Sub
</script>
</head>
<body>
<table width="720" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#EEEEEE">
<tr>
<td>
<form runat="server" enctype="multipart/form-data" method="POST"><p>
<input type="file" id="MyFile1" runat="server" /><br />
<input type="file" id="MyFile2" runat="server" /><br />
<input type="file" id="MyFile3" runat="server" /><br />
<input type="file" id="MyFile4" runat="server" />
<br />
<br />
<input type="submit" name="button" id="button" value="Create Merged PDF" />
<br />
<asp:Label id="txtResult" Font-Bold= "true" runat="server"/></p>
</form></td>
</tr>
</table>
<p> </p>
</body>
</html>
|
|
|
|
|
If you're looking for a free PDF merger, I'd suggest PDFSharp[^].
|
|
|
|
|
smdevivo wrote: I'm not locked in to this Persits product. He refused to help at all with this issue even though it meant a multi-server sale for him and if another method of stitching PDF files is available, I'm open to it.
Considering your question has absolutely nothing to do with the product or stiching files together, I'm not surprised you're not getting support. Your question has to do with getting data from one page to another. You should be asking in the ASP.NET forum.
The previous page would have to be rewritten to put up a list of files available on the server, let the user select those files with a checkbox and clic a button. That button click would then send the list of files to another class that would do the combining and return the completed file.
If you want the details on this process, ask in the ASP.NET forum...
|
|
|
|
|
hello every one
I am having one project to be developed in vb 6.0 and i am new to it. I want to use Menu strip item & toolstrip menuitem in it i known in .net it is drag and drop method but how is it done in VB 6.0.I made one MDI form in that i want to use these both.
Please suggest.
Thank You.
|
|
|
|
|
Tools > Menu Editor when you are on MDI form.
For toolbar add reference to microsoft windows common controls.
Good to still see VB6 programmers
|
|
|
|
|
Enver Maroshi wrote: Good to still see VB6 programmers
Why is it ? Because it's good to know that there are people worse off than you ? VB6 was always crap, and it's been unsupported for some time. VB.NET would be a lot less like VB6 if a bunch of MVPs had not revolted, MS knew they had made a mess, and were looking for a clean slate.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Not really, just brings up memories. I don't have it installed at home pc at all anymore, but no matter what, VB6 was and i could say still is most complete of them all. .Net for me is far away from complete. Speed? VB6 is much faster, it might have simpler GDI, etc.. but speed is much better than in .Net (for controls, not it's actual computing speed), it was simple and anyone could use it, was perfect for learning. Since Vb1 for dos i was using it, it did not give all those fancy stuff like most other languages in that time did have, but, sure was better than delphi (or pascal, depending on era). It's just that it was compact, and runtimes ware small. And it always did his job.
Not only that, in VB6 a lot of times one would depend on APIs, now, with .Net, programers don't know what are APIs, they don't know there are windows dlls that give us some nice features, it's all managed now, so no one dares to subclass anymore. People underestimate VB (pre-.Net), it really was not that bad.
And IDE? .Net is so slow, while VB6 did have really fast IDE. Sure, it's much nicer to programm in .Net, it's nice to write OO code, also saves me hours of work with all built in functions. But, also, it makes me more ignorant, before i would write algorithams, now, if i need encrypton, i will just use the one built in, while in VB6 i wrote 10 algortihams by specifications, it was so much more fun. Servers? I now have a class with all this, but before when i was making SMTP or IRC server, i did not read MSDN, i would read specifications of windows API. So much more fun, now, it's only coding with what we have already inside, thats good, saves us time, but the fun factor is gone.
|
|
|
|
|
Enver Maroshi wrote: VB6 was and i could say still is most complete of them all. .Net for me is far away from complete.
If I were you, I wouldn't be smoking that stuff any more. It is imparing your judgement.
Enver Maroshi wrote: it makes me more ignorant, before i would write algorithams, now, if i need encrypton, i will just use the one built in
Seriously? You want to hand craft your own encryption algorithms? Personally, I have much better things to do with my time (and my company's time)
|
|
|
|
|
Colin Angus Mackay wrote: If I were you, I wouldn't be smoking that stuff any more. It is imparing your judgement.
By complete what i did mean is, you never know which classes will change, which was a problem from moving a 1.1 to 2.0, since half of them became depricated. Was not necessery to do it, but sure its what they suggested.
Oh, i will sue that cigarette company, i always knew they put some illegal substances in those cigarettes
Colin Angus Mackay wrote: I have much better things to do with my time (and my company's time)
Sure, everyone does, but you don't get to do cool stuff anymore, you are forced to use it, since it's alrady in there. There is no programming involved anymore, you just use the classes that are supplied with .Net framework. Where is fun in that? And you can not write your own, since boss will yell at you and tell you it would take to much time and would gain nothing.
|
|
|
|
|
Enver Maroshi wrote: By complete what i did mean is, you never know which classes will change
Well, you are right. VB 6 isn't going to change because Microsoft finally stopped supporting it last year.
Enver Maroshi wrote: was a problem from moving a 1.1 to 2.0, since half of them became depricated
I would suggest that is hyperbole. A small number of classes were deprecated. Nowhere near half. And you can still use these classes, just be aware that they won't necessariliy be supported in future releases. (Just as VB 6 is no longer supported)
Enver Maroshi wrote: Was not necessery to do it, but sure its what they suggested
I suspose they didn't have to tell us the classes were deprecated, but it should would be a shock to install a shiny new version of .NET to discover they weren't there any more.
Enver Maroshi wrote: but you don't get to do cool stuff anymore, you are forced to use it, since it's alrady in there.
I have a lift in my apartment building, I also have stairs. I'm not forced to use the lift, I can always take the stairs. However, I use the lift becuase I'm several storeys up and it is easier to carry my shopping that way. Just because you have encryption classes doesn't mean you are forced to use them, although you'll find things much easier if you do.
Enver Maroshi wrote: There is no programming involved anymore, you just use the classes that are supplied with .Net framework. Where is fun in that?
There is actually quite a lot of programming involved in a business application. Most of the fun is in delivering something that has value to the client.
Enver Maroshi wrote: And you can not write your own, since boss will yell at you and tell you it would take to much time and would gain nothing.
Your boss is correct.
|
|
|
|
|
I give up
But i can say for sure that writing code 10-15 years ago was much more fun than it is now.
So, you say that also no one should use c, assambler, etc... anymore?
|
|
|
|
|
Enver Maroshi wrote: So, you say that also no one should use c, assambler, etc... anymore?
VB6 is designed for writing business applications as is C# and VB.NET. If you are in that area then it is one of the good choices open to you.
C and assembler are designed for writing operating systems, hardware drivers and embedded systems. If you are in that space then VB6 or VB.NET are not good choices.
If you want to spend your time writing low level code then get a job doing that using C or assembler. If you want to write business applications then VB.NET, C# and Java are the kind of languages you should be looking at.
|
|
|
|
|
What i meant by referring to c and assembler is that they are also not supported, could nto be, it's just language, not a product, like VB6, but compilers for them which people use are in most cases 10 years old, and they still do the job. So, VB6, or basic language in its pre-OO age is still working and is funcitonal (well, maybe win7 does not support it). So, it is no more outdated than any other. But all of this are "complete", it's in stable state, and nothing changes.
Now, in .Net we have something predefined which can change at any time, while in old VB6 you did have commands, and that is about it, something which did never change, just new ware added up over years. While .Net brings a lot of classes with each release of new framework version.
I use .Net, and sure it's 10 times easier to write code in it, for a "real" project would not go to VB6, since its all much easier to be made in VB.Net.
Why did i mention VB6 in first place? Well, back then VB programmers did have it's language, IDE and good support. VB.Net? It's got nothing to do with VB, really nothing, it was MS evil plan to make C++ and VB programmers think same way, and so we do, anyone who can work in VB.Net can work in C#, and vice versa.
So, what happend is not that VB evolved, he is gone. Why did i say it's nice to see someone still using VB6? Well, if anyone wants to use, go for it, vb6 is not bad, never was, and it's last real basic
And those that did not work in VB6 might think that it sucked, but, my opinion is that it was maybe to simple for those that used C++ or something similiar. You could do all what one could do in C++, or C, except that it depended on runtime (but so did VC++).
Oh, that is a long post. What i want to say is, if someone wants to use VB6, don't tell him not to. I'm sure he does know that VB6 runtimes will not come with never versions of windows.
Btw, embeded systems? os? This is already possible using .Net (not all classes suported yet)
|
|
|
|
|
If you are developing a new application, why VB6? Ages before .Net was released and is quite powerful (which you already know).
|
|
|
|
|
hi,
i have a panel ,when i move the cursor on to the panel,i should get the cursor position i want to know the location of the cursor and place a control on the panel.
|
|
|
|
|
Which part are you stuck on ? Capture the mouse move event, then work from there.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Double click panel, choose mouse move event and click on it and you will get somethign like this
Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
' e.X and e.Y are available
End Sub
To add control inside use something like this
Dim NewBox As New TextBox
NewBox.Location = New System.Drawing.Point(e.X, e.Y)
Panel1.Controls.Add(NewBox)
Just put this add control stuff into mouse up or something, or add it on mouse down, move control as you move mouse and release it on mouse up
This is basic stuff, try to read a book or two.
|
|
|
|
|
I can added images on panel where ever i want.But now problem is one image is overriding other image .i don't want to be override .
modified on Saturday, June 27, 2009 1:58 AM
|
|
|
|
|
What exactly do you try to make? What is a role of this application?
Maybe there is some other control that suites you better, if you need to drag-and-drop images, why not do it in listview? There you would be able to drop images, also to re-arange them, make a preview of them, etc...
"But now problem is one image is overriding other image .i don't want to be override ."
Well, then you would need colision detection
What should happen next? If you try to release image on other existign one? Should cancel drop, or maybe move next to picture? Best you could do is loop through each image in panel and see if they positions match at any point.
|
|
|
|
|
we are developing Logistics application.we have to drag and drop different types of images and should not overrides each other . what is solution for this problem.
adv thank's
lavan
|
|
|
|
|
hi
i too have the same problem
but the problem is like this
i have two picture boxes and a panel.
one picture box has a image and another picture box image is none.
i can drag and drop the picturebox1 image onto the picturebox2
now i did the same drag and drop to panel with slight change
if i drag and drop picturebox1 image on to the panel at any place on the panel then at that location i should add the picturebox1 control
please any one can help
i think i m confused and didnt explained u clearly...
|
|
|
|
|
This sort of code is almost always improved by dropping the picture boxes and instead writing your own code to put the images on your form, where you want them.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|